|
@@ -28,7 +28,7 @@
|
|
|
@focus="chooseTreeRefer('MATERIALCLASSIFY_PARAM', false, '选择品类')"
|
|
|
style="width: 200px"
|
|
|
>
|
|
|
- <el-option v-for="item in classOptions" :key="item.id" :label="item.name" :value="item.name" />
|
|
|
+ <el-option v-for="item in classOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -123,27 +123,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
- <el-form-item label="转请购时间">
|
|
|
- <el-select v-model="queryParams.ywlx" size="mini" style="width: 200px" clearable>
|
|
|
- <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> -->
|
|
|
</el-row>
|
|
|
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="物料编码">
|
|
|
- <el-input clearable size="mini" v-model="queryParams.names" @clear="queryParams.materialCode = ''" @focus="chooseMaterial" style="width: 200px">
|
|
|
+ <el-input clearable size="mini" v-model="queryParams.names" @clear="clearMaterial" style="width: 200px" @paste.native="pasteMe($event)">
|
|
|
<el-button size="mini" slot="append" icon="el-icon-more" @click="chooseMaterial"></el-button>
|
|
|
</el-input>
|
|
|
- <el-input v-show="false" v-model="queryParams.materialCode"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -191,6 +178,31 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-form-item label="是否客户指定">
|
|
|
+ <el-select clearable v-model="queryParams.isCustomerSpecified" size="mini" 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>
|
|
|
+
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-form-item label="是否紧急需求">
|
|
|
+ <el-select clearable v-model="queryParams.isUrgency" size="mini" 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>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</CollapseTransition>
|
|
@@ -354,6 +366,8 @@ import Refers from '@/components/Refers/refers.vue'
|
|
|
import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
|
import CollapseTransition from '@/components/MyCollapse/collapse.vue'
|
|
|
+// 用于物料参照框数据
|
|
|
+import {getRefer} from '@/api/purchase/basic.js'
|
|
|
import {getSummaryList, auditSummary, confirmSummary , cancelSummary , shutDownSummary, editSummaryList, exportList, exportItems } from '@/api/purchase/DemandSummary.js'
|
|
|
export default {
|
|
|
name: 'demandSummary',
|
|
@@ -444,11 +458,13 @@ export default {
|
|
|
customer: '',
|
|
|
lastWarehouse: '',
|
|
|
lastAllocation: '',
|
|
|
- materialCode: '',
|
|
|
+ materialCodeList: [],
|
|
|
names: '',
|
|
|
purchaseOrg: '',
|
|
|
demandDate: '',
|
|
|
approverFinishTime: '',
|
|
|
+ isCustomerSpecified: '',
|
|
|
+ isUrgency: '',
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
},
|
|
@@ -542,11 +558,13 @@ export default {
|
|
|
customer: '',
|
|
|
lastWarehouse: '',
|
|
|
lastAllocation: '',
|
|
|
- materialCode: '',
|
|
|
+ materialCodeList: [],
|
|
|
names: '',
|
|
|
purchaseOrg: '',
|
|
|
demandDate: '',
|
|
|
approverFinishTime: '',
|
|
|
+ isCustomerSpecified: '',
|
|
|
+ isUrgency: '',
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
}
|
|
@@ -774,7 +792,7 @@ export default {
|
|
|
},
|
|
|
selectionsToInput2(selection) {
|
|
|
this.classOptions.push(selection)
|
|
|
- this.queryParams.materialClassifyFour = selection.name
|
|
|
+ this.queryParams.materialClassifyFour = selection.id
|
|
|
},
|
|
|
// 搜索区物料编码
|
|
|
chooseMaterial() {
|
|
@@ -782,8 +800,37 @@ export default {
|
|
|
},
|
|
|
selectMaterial(selection) {
|
|
|
console.log('选择的物料', selection)
|
|
|
- this.queryParams.materialCode = selection[0].code
|
|
|
- this.queryParams.names = selection[0].name
|
|
|
+ this.queryParams.materialCodeList = selection.map(item => {return item.code})
|
|
|
+ console.log(this.queryParams.materialCodeList)
|
|
|
+ this.queryParams.names = (selection.map(item => {return item.name})).join(',')
|
|
|
+ },
|
|
|
+ // 清空物料搜索框
|
|
|
+ clearMaterial() {
|
|
|
+ this.queryParams.names = ''
|
|
|
+ this.queryParams.materialCodeList = []
|
|
|
+ },
|
|
|
+ // 粘贴来的数据
|
|
|
+ async pasteMe(e) {
|
|
|
+ this.$modal.loading("正在粘贴数据...");
|
|
|
+ e.preventDefault() //阻止默认粘贴事件
|
|
|
+ let source = e.clipboardData.getData("Text");
|
|
|
+ // 首先对源头进行解析
|
|
|
+ let rows = source.split("\r\n"); // 拆成一个数组
|
|
|
+ // 数组去除空字符串
|
|
|
+ rows = rows.filter(item => {
|
|
|
+ return item && item.trim()
|
|
|
+ })
|
|
|
+ await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
|
|
|
+ this.$modal.closeLoading();
|
|
|
+ if (res.code === 200) {
|
|
|
+ let rowList = res.rows
|
|
|
+ console.log('粘贴的', rowList)
|
|
|
+ this.queryParams.materialCodeList = rowList.map(item => {return item.code})
|
|
|
+ this.queryParams.names = (rowList.map(item => {return item.name})).join(',')
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.$modal.closeLoading();
|
|
|
+ })
|
|
|
},
|
|
|
// 明细行选择业务部门参照带出业务部门数据
|
|
|
chooseSon(index, type, isPage, title) {
|