|
@@ -11,7 +11,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="订单类型">
|
|
|
- <el-select v-model="basicForm.billType" size="small" style="width: 200px" clearable>
|
|
|
+ <el-select v-model="basicForm.billType" :disabled="sonDisable" size="small" style="width: 200px" clearable>
|
|
|
<el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -22,6 +22,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -32,6 +33,7 @@
|
|
|
<el-date-picker
|
|
|
v-model="basicForm.billDate"
|
|
|
size="small"
|
|
|
+ :disabled="sonDisable"
|
|
|
type="date"
|
|
|
clearable
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -41,13 +43,10 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="调拨方式">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.allotType"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select v-model="basicForm.allotType" disabled size="small" style="width: 200px" clearable>
|
|
|
+ <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -55,7 +54,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.deliveryCode"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -66,7 +65,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.storageCode"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -118,6 +117,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.onRouteAffilliation"
|
|
|
size="small"
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -128,7 +128,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.qty"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -139,7 +139,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.accountPath"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -150,7 +150,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.customer"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -161,7 +161,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.storageWarehouse"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -172,7 +172,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.deliveryWarehouse"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -180,7 +180,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="物流项目组">
|
|
|
- <el-select v-model="basicForm.materialProject" size="small" style="width: 200px" clearable>
|
|
|
+ <el-select v-model="basicForm.materialProject" :disabled="sonDisable" size="small" style="width: 200px" clearable>
|
|
|
<el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -205,7 +205,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.remark"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ :disabled="sonDisable"
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -224,7 +224,7 @@
|
|
|
<el-tabs style="margin-top: 10px;" type="border-card">
|
|
|
<el-tab-pane label="物料信息">
|
|
|
<div class="btn_grooup">
|
|
|
- <el-button type="primary" size="small" @click="addLine">增行</el-button>
|
|
|
+ <el-button type="primary" size="small" v-if="!sonDisable" @click="addLine">增行</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="materialInfo"
|
|
@@ -429,7 +429,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -440,7 +440,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -451,7 +451,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -462,7 +462,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -477,7 +477,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.createByName"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -488,7 +488,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -499,7 +499,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.updateByName"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -510,7 +510,7 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.code"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
+ disabled
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -540,13 +540,15 @@
|
|
|
<script>
|
|
|
import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
|
|
|
import Refers from '@/components/Refers/refers.vue'
|
|
|
+// 用于回显参照框数据
|
|
|
+import { getRefer } from '@/api/purchase/basic.js'
|
|
|
import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
|
// 明细行选择物料参照
|
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'addOder',
|
|
|
- dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status'],
|
|
|
+ dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status', 'sys_to_type'],
|
|
|
props: ['pageStu','row', 'disable'],
|
|
|
components: {
|
|
|
Refers,
|
|
@@ -672,10 +674,39 @@ export default {
|
|
|
getOrderDetail(row.id).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.basicForm = res.data
|
|
|
- // this.materialInfo = res.data.stAllotMaterialList
|
|
|
- // this.receiveInfo = res.data.stAllotReceiveDeliverList
|
|
|
- // this.priceList = res.data.stAllotReceiveExecuteList
|
|
|
- // this.resultList = res.data.stAllotReceiveExpenseList
|
|
|
+ this.materialInfo = res.data.stAllotMaterialList
|
|
|
+ this.receiveInfo = res.data.stAllotReceiveDeliverList
|
|
|
+ this.priceList = res.data.stAllotReceiveExecuteList
|
|
|
+ this.resultList = res.data.stAllotReceiveExpenseList
|
|
|
+ if(this.basicForm.deliveryInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.deliveryInventoryOrg, '调出库存组织') }
|
|
|
+ if(this.basicForm.storageInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.storageInventoryOrg, '调入库存组织') }
|
|
|
+ if(this.basicForm.businessPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.businessPersonal) }
|
|
|
+ if(this.basicForm.deliveryDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.deliveryDept) }
|
|
|
+ if(this.basicForm.currency) { this.reBackRefer('CURRENCY_PARAM', this.basicForm.currency) }
|
|
|
+ if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 回显参照框
|
|
|
+ reBackRefer(type, id, title) {
|
|
|
+ getRefer({ type: type, id: id, title: title }).then(res => {
|
|
|
+ if (type == 'ORG_PARAM' && title == '调出库存组织') {
|
|
|
+ this.chuOrgOptions = res.rows
|
|
|
+ }
|
|
|
+ if (type == 'ORG_PARAM' && title == '调入库存组织') {
|
|
|
+ this.ruOrgOptions = res.rows
|
|
|
+ }
|
|
|
+ if (type == 'CONTACTS_PARAM') {
|
|
|
+ this.manOptions = res.rows
|
|
|
+ }
|
|
|
+ if (type == 'DEPT_PARAM') {
|
|
|
+ this.deptOptions = res.rows
|
|
|
+ }
|
|
|
+ if (type == 'CURRENCY_PARAM') {
|
|
|
+ this.currencyOptions = res.rows
|
|
|
+ }
|
|
|
+ if (type == 'LIACENTER_PARAM') {
|
|
|
+ this.liacenterOptions = res.rows
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -741,6 +772,12 @@ export default {
|
|
|
this.basicForm.storageInventoryOrg = selection[0].id
|
|
|
this.basicForm.storageInventoryOrgName = selection[0].name
|
|
|
this.basicForm.onRouteAffilliation = selection[0].name
|
|
|
+ // 选择调入库存组织时判断调拨方式
|
|
|
+ if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
|
|
|
+ this.basicForm.allotType = '4'
|
|
|
+ } else {
|
|
|
+ this.basicForm.allotType = '2'
|
|
|
+ }
|
|
|
}
|
|
|
if (this.referCondition.title == '调出业务员') {
|
|
|
this.manOptions = selection
|