|
|
@ -113,10 +113,19 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">备注</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder=""/></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">采购人</div> |
|
|
|
<el-form-item> |
|
|
|
<span class="addinputInfo" v-if="formobj.purchaseTypeValue == '代理库'">{{ formobj.purchasingAgent }}</span> |
|
|
|
<el-select class="addinputInfo" v-else v-model="formobj.purchasingAgentSid" placeholder="请选择" @change="purchasingAgentChange" clearable filterable> |
|
|
|
<el-option v-for="item in purchasingAgent_list" :key="item.sid" :label="item.name" :value="item.sid"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">预计到货日期</div> |
|
|
|
<el-form-item><el-date-picker class="addinputInfo" v-model="formobj.deliveryDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期" /></el-form-item> |
|
|
@ -247,7 +256,7 @@ |
|
|
|
<script> |
|
|
|
import req from '@/api/purchase/procurement' |
|
|
|
import uploadImg from '@/components/uploadFile/uploadImg' |
|
|
|
import { typeValues, getOrgSidByPath, choiceSupplierInfo } from '@/api/Common/dictcommons' |
|
|
|
import { typeValues, getOrgSidByPath, choiceSupplierInfo, selAllByOrgSidPath } from '@/api/Common/dictcommons' |
|
|
|
import chooseproducts from './relation/chooseproducts' |
|
|
|
|
|
|
|
export default { |
|
|
@ -265,6 +274,7 @@ export default { |
|
|
|
index: 0, |
|
|
|
accept: '.jpg,.jpeg,.png', |
|
|
|
procurementType_list: [], |
|
|
|
purchasingAgent_list: [], |
|
|
|
operateBrand_list: [], |
|
|
|
procurementReason_list: [], |
|
|
|
paymentMethod_list: [], |
|
|
@ -285,6 +295,8 @@ export default { |
|
|
|
purchaseTypeValue: '', |
|
|
|
purchaseReasonKey: '', |
|
|
|
purchaseReasonValue: '', |
|
|
|
purchasingAgent: '', |
|
|
|
purchasingAgentSid: '', |
|
|
|
payTypeKey: '', |
|
|
|
payTypeValue: '', |
|
|
|
errorAmount: '', |
|
|
@ -307,6 +319,7 @@ export default { |
|
|
|
nodeState: '', |
|
|
|
taskId: '', |
|
|
|
finishTime: '', |
|
|
|
orgPath: '', |
|
|
|
useOrgSid: '', |
|
|
|
useOrgName: '', |
|
|
|
createOrgSid: '', |
|
|
@ -441,6 +454,11 @@ export default { |
|
|
|
this.supplier_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
selAllByOrgSidPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.purchasingAgent_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.viewTitle = '【新增】采购单' |
|
|
@ -499,6 +517,14 @@ export default { |
|
|
|
} else { |
|
|
|
this.formobj.purchaseTypeKey = '' |
|
|
|
} |
|
|
|
if (this.formobj.purchaseTypeValue === '代理库') { |
|
|
|
// 采购人 = 申请人 |
|
|
|
this.formobj.purchasingAgent = this.formobj.createByName |
|
|
|
this.formobj.purchasingAgentSid = this.formobj.createBySid |
|
|
|
} else { |
|
|
|
this.formobj.purchasingAgent = '' |
|
|
|
this.formobj.purchasingAgentSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
operateBrandChange(value) { |
|
|
|
const choose = this.operateBrand_list.filter((item) => item.dictValue === value) |
|
|
@ -550,6 +576,14 @@ export default { |
|
|
|
this.formobj.manufacturersOrderTypeValue = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
purchasingAgentChange(value) { |
|
|
|
const choose = this.purchasingAgent_list.filter((item) => item.sid === value) |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
|
this.formobj.purchasingAgent = choose[0].name |
|
|
|
} else { |
|
|
|
this.formobj.purchasingAgent = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
isInvoicingChange(val) { |
|
|
|
if (val === '1') { |
|
|
|
const choose = this.supplier_list.filter((item) => item.sid === this.formobj.supplierSid) |
|
|
@ -673,6 +707,8 @@ export default { |
|
|
|
purchaseTypeValue: '', |
|
|
|
purchaseReasonKey: '', |
|
|
|
purchaseReasonValue: '', |
|
|
|
purchasingAgent: '', |
|
|
|
purchasingAgentSid: '', |
|
|
|
payTypeKey: '', |
|
|
|
payTypeValue: '', |
|
|
|
errorAmount: '', |
|
|
@ -695,6 +731,7 @@ export default { |
|
|
|
nodeState: '', |
|
|
|
taskId: '', |
|
|
|
finishTime: '', |
|
|
|
orgPath: '', |
|
|
|
useOrgSid: '', |
|
|
|
useOrgName: '', |
|
|
|
createOrgSid: '', |
|
|
|