|
|
@ -20,6 +20,7 @@ |
|
|
<el-form-item :label="' '" > |
|
|
<el-form-item :label="' '" > |
|
|
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button> |
|
|
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button> |
|
|
<el-button @click="addSupplier()" type="primary" style="margin-left: 2px">新增</el-button> |
|
|
<el-button @click="addSupplier()" type="primary" style="margin-left: 2px">新增</el-button> |
|
|
|
|
|
<el-button @click="handleTestCurrentLoginSite" type="primary" style="margin-left: 2px">测试</el-button> |
|
|
<!-- <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>--> |
|
|
<!-- <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>--> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
@ -367,7 +368,8 @@ import { |
|
|
createSrmSupplier, |
|
|
createSrmSupplier, |
|
|
updateSrmSupplier, |
|
|
updateSrmSupplier, |
|
|
deleteSrmSupplier, |
|
|
deleteSrmSupplier, |
|
|
listSupplierDocTypeBySite |
|
|
|
|
|
|
|
|
listSupplierDocTypeBySite, |
|
|
|
|
|
testCurrentLoginSite |
|
|
} from '@/api/srm/srmSupplier.js' |
|
|
} from '@/api/srm/srmSupplier.js' |
|
|
import excel from '@/utils/excel-util.js' |
|
|
import excel from '@/utils/excel-util.js' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
@ -1604,6 +1606,18 @@ export default { |
|
|
this.$message.error('删除失败: ' + error.message) |
|
|
this.$message.error('删除失败: ' + error.message) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleTestCurrentLoginSite () { |
|
|
|
|
|
testCurrentLoginSite({}).then(({ data }) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
const site = data.site || '' |
|
|
|
|
|
this.$message.success(`当前登录工厂(site): ${site || '(空)'}`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$message.error((data && data.msg) || '获取当前登录工厂失败') |
|
|
|
|
|
}).catch((error) => { |
|
|
|
|
|
this.$message.error('获取当前登录工厂失败: ' + error.message) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|