|
@@ -25,12 +25,8 @@
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="需求处理方式">
|
|
|
- <el-select v-model="basicForm.demandBusinessType" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ <el-select v-model="basicForm.demandBusinessType" size="small" style="width: 200px">
|
|
|
+ <el-option v-for="dict in dict.type.sys_processing_mode" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -39,11 +35,7 @@
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="单据状态">
|
|
|
<el-select v-model="basicForm.status" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -51,43 +43,26 @@
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="需求客户">
|
|
|
- <el-input v-model="basicForm.customer" size="small" style="width: 200px">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="chooseCustomer"></el-button>
|
|
|
- </el-input>
|
|
|
+ <el-select size="small" v-model="basicForm.customer" :disabled="disable" @focus="chooseCustomer" style="width: 200px">
|
|
|
+ <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="需求客户名称">
|
|
|
- <el-select v-model="basicForm.customerName" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-input v-model="basicForm.customerName" size="small" style="width: 200px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="客户负责人">
|
|
|
- <el-select v-model="basicForm.customerPrincipal" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-input v-model="basicForm.customerPrincipal" size="small" style="width: 200px"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="需求人员">
|
|
|
- <!-- <el-input v-model="basicForm.demandPersonal" size="small" style="width: 200px">
|
|
|
- <el-button slot="append" icon="el-icon-more" @click="choosePerson"></el-button>
|
|
|
- </el-input> -->
|
|
|
<el-select size="small" v-model="basicForm.demandPersonal" :disabled="disable" @focus="choosePerson" style="width: 200px">
|
|
|
<el-option v-for="item in personOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
@@ -109,61 +84,46 @@
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="需求日期">
|
|
|
- <el-input
|
|
|
+ <el-date-picker
|
|
|
v-model="basicForm.demandDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
style="width: 200px"
|
|
|
- />
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="单据来源">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.source"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select v-model="basicForm.source" size="small" style="width: 200px">
|
|
|
+ <el-option v-for="dict in dict.type.sys_bill_source" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="供应仓库">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.warehouse"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select size="small" v-model="basicForm.warehouse" :disabled="disable" @focus="chooseHouse" style="width: 200px">
|
|
|
+ <el-option v-for="item in houseOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="供应货位">
|
|
|
- <el-select v-model="basicForm.goodsAllocation" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
+ <el-select size="small" v-model="basicForm.goodsAllocation" :disabled="disable" @focus="chooseGoods" style="width: 200px">
|
|
|
+ <el-option v-for="item in goodsOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="业务类型">
|
|
|
- <el-select v-model="basicForm.billType" size="small" style="width: 200px" clearable placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ <el-select v-model="basicForm.billType" size="small" style="width: 200px">
|
|
|
+ <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -171,13 +131,10 @@
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="是否客户指定">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.isSpeical"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select v-model="basicForm.isSpeical" size="small" style="width: 200px">
|
|
|
+ <el-option v-for=" item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -502,10 +459,12 @@
|
|
|
import Reserved from './reserved.vue'
|
|
|
import Refers from './refers.vue'
|
|
|
import {addDemand,getDemandDetail, getDemandSonDetail, editDemand} from '@/api/purchase/purchaseDemand.js'
|
|
|
+// 用于回显参照框数据
|
|
|
import {getRefer} from '@/api/purchase/basic.js'
|
|
|
export default {
|
|
|
name: 'addDemandList',
|
|
|
props: ['pageStu','row', 'disable'],
|
|
|
+ dicts: ['sys_processing_mode', 'sys_status', 'sys_bill_source', 'sys_business'],
|
|
|
components: {
|
|
|
Reserved,
|
|
|
Refers
|
|
@@ -541,9 +500,9 @@ export default {
|
|
|
puDemandItemList: []
|
|
|
},
|
|
|
options: [{
|
|
|
- value: '1', label: '是',
|
|
|
+ value: '0', label: '是',
|
|
|
}, {
|
|
|
- value: '0', label: '否'
|
|
|
+ value: '2', label: '否'
|
|
|
}],
|
|
|
basicRules: {},
|
|
|
tableList: [],
|
|
@@ -554,7 +513,10 @@ export default {
|
|
|
title: '选择组织'
|
|
|
},
|
|
|
orgOptions: [],
|
|
|
- personOptions: []
|
|
|
+ personOptions: [],
|
|
|
+ customerOptions: [],
|
|
|
+ houseOptions: [],
|
|
|
+ goodsOptions: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -711,6 +673,7 @@ export default {
|
|
|
reciveForm.puDemandItemList = res.rows
|
|
|
console.log('reciveForm',reciveForm)
|
|
|
this.basicForm = reciveForm
|
|
|
+ this.reBackRefer({type: 'ORG_PARAM', search: this.basicForm.org, isPage: false})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -725,6 +688,12 @@ export default {
|
|
|
updateReserved (val) {
|
|
|
this.dialog.config = val
|
|
|
},
|
|
|
+ // 回显参照框
|
|
|
+ reBackRefer(val) {
|
|
|
+ getRefer(val).then(res => {
|
|
|
+ console.log("🚀 ~ file: add.vue:706 ~ getRefer ~ res:", res)
|
|
|
+ })
|
|
|
+ },
|
|
|
chooseOrg() {
|
|
|
this.referCondition.type = 'ORG_PARAM'
|
|
|
this.referCondition.search = ''
|
|
@@ -746,6 +715,20 @@ export default {
|
|
|
this.referCondition.title = '需求人员'
|
|
|
this.$refs.refer.init(this.referCondition)
|
|
|
},
|
|
|
+ chooseHouse() {
|
|
|
+ this.referCondition.type = 'WAREHOUSE_PARAM'
|
|
|
+ this.referCondition.search = ''
|
|
|
+ this.referCondition.isPage = true
|
|
|
+ this.referCondition.title = '供应仓库'
|
|
|
+ this.$refs.refer.init(this.referCondition)
|
|
|
+ },
|
|
|
+ chooseGoods() {
|
|
|
+ this.referCondition.type = 'ALLOCATION_PARAM'
|
|
|
+ this.referCondition.search = ''
|
|
|
+ this.referCondition.isPage = true
|
|
|
+ this.referCondition.title = '供应货位'
|
|
|
+ this.$refs.refer.init(this.referCondition)
|
|
|
+ },
|
|
|
selectionsToInput(selection) {
|
|
|
console.log("🚀 ~ file: add.vue:732 ~ selectionsToInput ~ selection:", selection)
|
|
|
if(this.referCondition.type == 'ORG_PARAM') {
|
|
@@ -756,6 +739,14 @@ export default {
|
|
|
this.personOptions = selection
|
|
|
this.basicForm.demandPersonal = selection[0].id
|
|
|
}
|
|
|
+ if(this.referCondition.type == 'WAREHOUSE_PARAM') {
|
|
|
+ this.houseOptions = selection
|
|
|
+ this.basicForm.warehouse = selection[0].id
|
|
|
+ }
|
|
|
+ if(this.referCondition.type == 'ALLOCATION_PARAM') {
|
|
|
+ this.goodsOptions = selection
|
|
|
+ this.basicForm.goodsAllocation = selection[0].id
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|