|
|
|
@ -2,24 +2,15 @@ |
|
|
|
<div ref="pageRoot" class="customer-css supplier-part-moq-price"> |
|
|
|
<el-form :inline="true" label-position="top" class="pi-search-form"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(520, 'search')"><a href="javascript:void(0)">供应商编号</a></span> |
|
|
|
<span slot="label" style="" @click="getBaseList(520, 'search')"><a href="javascript:void(0)">供应商简称</a></span> |
|
|
|
<el-input |
|
|
|
v-model="searchData.supplierNo" |
|
|
|
placeholder="选择或输入编号" |
|
|
|
v-model="searchData.supplierShortName" |
|
|
|
placeholder="选择或输入供应商简称" |
|
|
|
style="width: 180px" |
|
|
|
clearable |
|
|
|
@keyup.enter.native="searchSupplierPartList" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="产品编码"> |
|
|
|
<el-input |
|
|
|
v-model="searchData.partNo" |
|
|
|
placeholder="产品编码" |
|
|
|
style="width: 160px" |
|
|
|
clearable |
|
|
|
@keyup.enter.native="searchSupplierPartList" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="Item"> |
|
|
|
<el-input |
|
|
|
v-model="searchData.item" |
|
|
|
@ -38,15 +29,6 @@ |
|
|
|
@keyup.enter.native="searchSupplierPartList" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料名称"> |
|
|
|
<el-input |
|
|
|
v-model="searchData.partDesc" |
|
|
|
placeholder="物料名称" |
|
|
|
style="width: 180px" |
|
|
|
clearable |
|
|
|
@keyup.enter.native="searchSupplierPartList" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="是否在用"> |
|
|
|
<el-select v-model="searchData.active" style="width: 120px" clearable> |
|
|
|
<el-option label="在用" value="Y" /> |
|
|
|
@ -81,12 +63,12 @@ |
|
|
|
<el-table-column prop="supplierCode" label="供应商编号" min-width="120" header-align="center" align="center" /> |
|
|
|
<el-table-column prop="supplierName" label="供应商名称" min-width="180" header-align="center" align="left" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="supplierShortName" label="供应商简称" min-width="120" header-align="center" align="left" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="currency" label="币种" min-width="90" header-align="center" align="center" /> |
|
|
|
<!-- <el-table-column prop="currency" label="币种" min-width="90" header-align="center" align="center" />--> |
|
|
|
<!-- <el-table-column prop="currencyDesc" label="币种描述" min-width="110" header-align="center" align="center" show-overflow-tooltip />--> |
|
|
|
<el-table-column prop="partNo" label="产品编码" min-width="140" header-align="center" align="center" /> |
|
|
|
<!-- <el-table-column prop="partNo" label="产品编码" min-width="140" header-align="center" align="center" />--> |
|
|
|
<el-table-column prop="item" label="Item" min-width="120" header-align="center" align="center" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="sku" label="SKU" min-width="120" header-align="center" align="center" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="partDesc" label="物料名称" min-width="200" header-align="center" align="left" show-overflow-tooltip /> |
|
|
|
<!-- <el-table-column prop="partDesc" label="物料名称" min-width="200" header-align="center" align="left" show-overflow-tooltip />--> |
|
|
|
<el-table-column prop="moqColor" label="MOQ/COLOR" min-width="120" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
<el-table-column prop="moq" label="QTY/PO" min-width="110" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
<el-table-column prop="qtyCarton" label="QTY/CARTON" min-width="120" header-align="center" align="right" :formatter="formatNumberCell" /> |
|
|
|
@ -587,6 +569,7 @@ import { |
|
|
|
ossUploadNoSaveOSSForYJY, |
|
|
|
downLoadObjectFile |
|
|
|
} from '@/api/oss/oss' |
|
|
|
import { fetchSupplierDetail, resolveSupplierShortFieldsFromDetail } from '@/utils/supplierChooselistHelper' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'SupplierPartMoqPrice', |
|
|
|
@ -602,6 +585,7 @@ export default { |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
supplierNo: '', |
|
|
|
supplierShortName: '', |
|
|
|
partNo: '', |
|
|
|
item: '', |
|
|
|
sku: '', |
|
|
|
@ -748,7 +732,19 @@ export default { |
|
|
|
}, |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 520 && this.tagType === 'search') { |
|
|
|
this.searchData.supplierNo = val.supplier_no || '' |
|
|
|
// 选择后输入框展示供应商简称(Chooselist 520 不返回简称,需回查主数据);无简称时回退编码; |
|
|
|
// 同时保留 supplierNo 作为真实编码供新增预填,查询按 supplierShortName 下发(后端按简称模糊匹配)- rqrq |
|
|
|
const code = val.supplier_no || '' |
|
|
|
this.searchData.supplierNo = code |
|
|
|
this.searchData.supplierShortName = code |
|
|
|
if (code) { |
|
|
|
fetchSupplierDetail(code, this.$store.state.user.site).then(detail => { |
|
|
|
const { shortNpc } = resolveSupplierShortFieldsFromDetail(detail) |
|
|
|
if (shortNpc && this.searchData.supplierNo === code) { |
|
|
|
this.searchData.supplierShortName = shortNpc |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.tagNo === 520 && this.tagType === 'add') { |
|
|
|
this.addForm.supplierCode = val.supplier_no || '' |
|
|
|
@ -765,6 +761,7 @@ export default { |
|
|
|
this.searchData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
supplierNo: '', |
|
|
|
supplierShortName: '', |
|
|
|
partNo: '', |
|
|
|
item: '', |
|
|
|
sku: '', |
|
|
|
@ -784,7 +781,7 @@ export default { |
|
|
|
this.topLoading = true |
|
|
|
const inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
supplierCode: (this.searchData.supplierNo || '').trim(), |
|
|
|
supplierCode: (this.searchData.supplierShortName || '').trim(), |
|
|
|
partNo: (this.searchData.partNo || '').trim(), |
|
|
|
item: (this.searchData.item || '').trim(), |
|
|
|
sku: (this.searchData.sku || '').trim(), |
|
|
|
@ -923,7 +920,12 @@ export default { |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.searchData.supplierNo = inData.supplierCode |
|
|
|
this.addDialogVisible = false |
|
|
|
this.searchSupplierPartList() |
|
|
|
// 查询按供应商简称过滤,回填该编码对应简称后再刷新 - rqrq |
|
|
|
fetchSupplierDetail(inData.supplierCode, this.$store.state.user.site).then(detail => { |
|
|
|
const { shortNpc } = resolveSupplierShortFieldsFromDetail(detail) |
|
|
|
this.searchData.supplierShortName = shortNpc || '' |
|
|
|
this.searchSupplierPartList() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert((data && data.msg) || '新增失败', '错误', { confirmButtonText: '确定' }) |
|
|
|
} |
|
|
|
|