|
@@ -168,8 +168,7 @@
|
|
|
|
|
|
<el-table
|
|
<el-table
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
- v-myscroll
|
|
|
|
- :data="basicForm.puDemandItemList.slice(0, over)"
|
|
|
|
|
|
+ :data="basicForm.puDemandItemList"
|
|
fit
|
|
fit
|
|
border
|
|
border
|
|
highlight-current-row
|
|
highlight-current-row
|
|
@@ -183,12 +182,14 @@
|
|
:cell-class-name="cellClassName"
|
|
:cell-class-name="cellClassName"
|
|
:row-key="getRowKeys"
|
|
:row-key="getRowKeys"
|
|
ref="table"
|
|
ref="table"
|
|
|
|
+ v-el-table-infinite-scroll="load"
|
|
|
|
+ :infinite-scroll-disabled="loadDisabled"
|
|
>
|
|
>
|
|
<el-table-column show-overflow-tooltip type="selection" :reserve-selection="true"/>
|
|
<el-table-column show-overflow-tooltip type="selection" :reserve-selection="true"/>
|
|
<el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
|
|
<el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
|
|
<el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
|
|
<el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ scope.$index + 1 + '0' }}
|
|
|
|
|
|
+ {{ scope.row.rowNo = scope.$index + 1 + "0" }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purOrgName" width="200px"/>
|
|
<el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purOrgName" width="200px"/>
|
|
@@ -212,7 +213,7 @@
|
|
<el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="150px" :render-header="addRedStar">
|
|
<el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="150px" :render-header="addRedStar">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :show-message="false" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
|
|
<el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :show-message="false" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
|
|
- <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)"/>
|
|
|
|
|
|
+ <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)" @paste.native="pasteMe($event, scope, scope.$index)"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -526,7 +527,11 @@ import {addDemand,getDemandDetail, getDemandSonDetail, editDemand, submitDemand,
|
|
import {getRefer} from '@/api/purchase/basic.js'
|
|
import {getRefer} from '@/api/purchase/basic.js'
|
|
// 明细行选择物料参照
|
|
// 明细行选择物料参照
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
import popDialog from '@/components/PopDialog/index.vue'
|
|
|
|
+import ElTableInfiniteScroll from "el-table-infinite-scroll";
|
|
export default {
|
|
export default {
|
|
|
|
+ directives: {
|
|
|
|
+ "el-table-infinite-scroll": ElTableInfiniteScroll,
|
|
|
|
+ },
|
|
name: 'addDemandList',
|
|
name: 'addDemandList',
|
|
props: ['pageStu','row', 'disable'],
|
|
props: ['pageStu','row', 'disable'],
|
|
dicts: ['sys_processing_mode', 'sys_plan_type', 'sys_status', 'sys_bill_source', 'sys_business','sys_reserve_ratio', 'sys_period_unit', 'sys_price_type'],
|
|
dicts: ['sys_processing_mode', 'sys_plan_type', 'sys_status', 'sys_bill_source', 'sys_business','sys_reserve_ratio', 'sys_period_unit', 'sys_price_type'],
|
|
@@ -625,7 +630,117 @@ export default {
|
|
contactsPhone: '',
|
|
contactsPhone: '',
|
|
address: ''
|
|
address: ''
|
|
},
|
|
},
|
|
- purchaseManOptions: []
|
|
|
|
|
|
+ purchaseManOptions: [],
|
|
|
|
+ sonModel: {
|
|
|
|
+ rowNo: null,
|
|
|
|
+ contacts: null,
|
|
|
|
+ id: null,
|
|
|
|
+ demandId: null,
|
|
|
|
+ status: null,
|
|
|
|
+ materialCategory: null,
|
|
|
|
+ buyer: null,
|
|
|
|
+ buyerName: null,
|
|
|
|
+ mateiralClassifyOne: null,
|
|
|
|
+ materialClassifyOneName: null,
|
|
|
|
+ materialClassifyTwo: null,
|
|
|
|
+ materialClassifyTwoName: null,
|
|
|
|
+ materialClassifyThree: null,
|
|
|
|
+ materialClassifyThreeName: null,
|
|
|
|
+ materialClassifyFour: null,
|
|
|
|
+ materialClassifyFourName: null,
|
|
|
|
+ materialCode: null,
|
|
|
|
+ material: null,
|
|
|
|
+ materialName: null,
|
|
|
|
+ classifyId: null,
|
|
|
|
+ specification: null,
|
|
|
|
+ unit: null,
|
|
|
|
+ unitName: null,
|
|
|
|
+ manufacturerName: null,
|
|
|
|
+ registrant: null,
|
|
|
|
+ puPeriod: null,
|
|
|
|
+ expiryUnit: null,
|
|
|
|
+ expiry: null,
|
|
|
|
+ minPackage: null,
|
|
|
|
+ minOrderQty: null,
|
|
|
|
+ minBatch: null,
|
|
|
|
+ safeStock: null,
|
|
|
|
+ averageQtyMonth: null,
|
|
|
|
+ qty: null,
|
|
|
|
+ adjustmentPersonal: null,
|
|
|
|
+ adjustmentTime: null,
|
|
|
|
+ manualRegulation: null,
|
|
|
|
+ updateCause: null,
|
|
|
|
+ reservedProportion: null,
|
|
|
|
+ reservedPeriod: null,
|
|
|
|
+ reservedQty: null,
|
|
|
|
+ demandPeriod: null,
|
|
|
|
+ forecastClassify: null,
|
|
|
|
+ onemonthAvgVolume: null,
|
|
|
|
+ threemonthAvgVolume: null,
|
|
|
|
+ puFreight: null,
|
|
|
|
+ deliveryDate: null,
|
|
|
|
+ isUrgency: 'N',
|
|
|
|
+ isReplenishment: 'N',
|
|
|
|
+ isBatchLock: 'N',
|
|
|
|
+ isCustomerSpecified: '',
|
|
|
|
+ remark: null,
|
|
|
|
+ puRemark: null,
|
|
|
|
+ lastWarehouseQty: null,
|
|
|
|
+ resDemandQty: null,
|
|
|
|
+ lastWarehouse: null,
|
|
|
|
+ lastWarehouseName: null,
|
|
|
|
+ deliveryWarehouse: null,
|
|
|
|
+ deliveryWarehouseName: null,
|
|
|
|
+ lastAllocation: null,
|
|
|
|
+ lastAllocationName: null,
|
|
|
|
+ deliveryAllocation: null,
|
|
|
|
+ deliveryAllocationName: null,
|
|
|
|
+ passageOn: null,
|
|
|
|
+ puOrg: null,
|
|
|
|
+ purOrgName: null,
|
|
|
|
+ lastStockQty: null,
|
|
|
|
+ superiorCenterQty: null,
|
|
|
|
+ superiorAllotQty: null,
|
|
|
|
+ availableQty: null,
|
|
|
|
+ statusAllot: 'N',
|
|
|
|
+ additionalSupplier: null,
|
|
|
|
+ additionalSupplierName: null,
|
|
|
|
+ periodUnit: null,
|
|
|
|
+ demandCustomer: null,
|
|
|
|
+ demandCustomerName: null,
|
|
|
|
+ lastStockOrg: null,
|
|
|
|
+ lastStockOrgName: null,
|
|
|
|
+ superiorStockOrg: null,
|
|
|
|
+ superiorStockOrgName: null,
|
|
|
|
+ allotCode: null,
|
|
|
|
+ deliveryAddress: null,
|
|
|
|
+ deliveryAddressName: null,
|
|
|
|
+ contacts: null,
|
|
|
|
+ contactsPhone: null,
|
|
|
|
+ address: null,
|
|
|
|
+ source: null,
|
|
|
|
+ priceType: 'order',
|
|
|
|
+ puManagerApprover: null,
|
|
|
|
+ puManagerApproverName: null,
|
|
|
|
+ processTime: null,
|
|
|
|
+ affirmer: null,
|
|
|
|
+ tenantId: null,
|
|
|
|
+ revision: null,
|
|
|
|
+ createBy: null,
|
|
|
|
+ createByName: null,
|
|
|
|
+ createTime: null,
|
|
|
|
+ updateBy: null,
|
|
|
|
+ updateByName: null,
|
|
|
|
+ updateTime: null,
|
|
|
|
+ delFlag: 0,
|
|
|
|
+ // 新增字段
|
|
|
|
+ model: null,
|
|
|
|
+ storageCondition: null,
|
|
|
|
+ transportationCondition: null,
|
|
|
|
+ },
|
|
|
|
+ loadDisabled: true,
|
|
|
|
+ page: 0,
|
|
|
|
+ total: 5,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -643,6 +758,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ load() {
|
|
|
|
+ if (this.loadDisabled) return;
|
|
|
|
+
|
|
|
|
+ this.page++;
|
|
|
|
+ if (this.page <= this.total) {
|
|
|
|
+ this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.concat(this.basicForm.puDemandItemList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (this.page === this.total) {
|
|
|
|
+ this.loadDisabled = true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 改变单据日期时清空子表的调拨日期
|
|
// 改变单据日期时清空子表的调拨日期
|
|
changeDemandDate() {
|
|
changeDemandDate() {
|
|
this.basicForm.puDemandItemList.forEach(item => {
|
|
this.basicForm.puDemandItemList.forEach(item => {
|
|
@@ -844,116 +971,11 @@ export default {
|
|
},
|
|
},
|
|
// 增行
|
|
// 增行
|
|
addLine() {
|
|
addLine() {
|
|
- const newLine = {
|
|
|
|
- contacts: null,
|
|
|
|
- id: null,
|
|
|
|
- demandId: null,
|
|
|
|
- status: null,
|
|
|
|
- businessDept: null,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- materialCategory: null,
|
|
|
|
- buyer: null,
|
|
|
|
- buyerName: null,
|
|
|
|
- mateiralClassifyOne: null,
|
|
|
|
- materialClassifyOneName: null,
|
|
|
|
- materialClassifyTwo: null,
|
|
|
|
- materialClassifyTwoName: null,
|
|
|
|
- materialClassifyThree: null,
|
|
|
|
- materialClassifyThreeName: null,
|
|
|
|
- materialClassifyFour: null,
|
|
|
|
- materialClassifyFourName: null,
|
|
|
|
- materialCode: null,
|
|
|
|
- material: null,
|
|
|
|
- materialName: null,
|
|
|
|
- classifyId: null,
|
|
|
|
- specification: null,
|
|
|
|
- unit: null,
|
|
|
|
- unitName: null,
|
|
|
|
- manufacturerName: null,
|
|
|
|
- registrant: null,
|
|
|
|
- puPeriod: null,
|
|
|
|
- expiryUnit: null,
|
|
|
|
- expiry: null,
|
|
|
|
- minPackage: null,
|
|
|
|
- minOrderQty: null,
|
|
|
|
- minBatch: null,
|
|
|
|
- safeStock: null,
|
|
|
|
- averageQtyMonth: null,
|
|
|
|
- qty: null,
|
|
|
|
- adjustmentPersonal: null,
|
|
|
|
- adjustmentTime: null,
|
|
|
|
- manualRegulation: null,
|
|
|
|
- updateCause: null,
|
|
|
|
- reservedProportion: null,
|
|
|
|
- reservedPeriod: null,
|
|
|
|
- reservedQty: null,
|
|
|
|
- demandPeriod: null,
|
|
|
|
- forecastClassify: null,
|
|
|
|
- onemonthAvgVolume: null,
|
|
|
|
- threemonthAvgVolume: null,
|
|
|
|
- puFreight: null,
|
|
|
|
- deliveryDate: null,
|
|
|
|
- isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
|
- isReplenishment: this.basicForm.billType == 'BDXQ'? 'Y': 'N',
|
|
|
|
- isBatchLock: 'N',
|
|
|
|
- isCustomerSpecified: '',
|
|
|
|
- remark: null,
|
|
|
|
- puRemark: null,
|
|
|
|
- lastWarehouseQty: null,
|
|
|
|
- resDemandQty: null,
|
|
|
|
- lastWarehouse: null,
|
|
|
|
- lastWarehouseName: null,
|
|
|
|
- deliveryWarehouse: null,
|
|
|
|
- deliveryWarehouseName: null,
|
|
|
|
- lastAllocation: null,
|
|
|
|
- lastAllocationName: null,
|
|
|
|
- deliveryAllocation: null,
|
|
|
|
- deliveryAllocationName: null,
|
|
|
|
- passageOn: null,
|
|
|
|
- puOrg: null,
|
|
|
|
- purOrgName: null,
|
|
|
|
- lastStockQty: null,
|
|
|
|
- superiorCenterQty: null,
|
|
|
|
- superiorAllotQty: null,
|
|
|
|
- availableQty: null,
|
|
|
|
- statusAllot: 'N',
|
|
|
|
- additionalSupplier: null,
|
|
|
|
- additionalSupplierName: null,
|
|
|
|
- periodUnit: null,
|
|
|
|
- demandCustomer: this.basicForm.customer,
|
|
|
|
- demandCustomerName: this.basicForm.customerName,
|
|
|
|
- businessDept: this.basicForm.demandDept,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- lastStockOrg: null,
|
|
|
|
- lastStockOrgName: null,
|
|
|
|
- superiorStockOrg: null,
|
|
|
|
- superiorStockOrgName: null,
|
|
|
|
- allotCode: null,
|
|
|
|
- deliveryAddress: null,
|
|
|
|
- deliveryAddressName: null,
|
|
|
|
- contacts: null,
|
|
|
|
- contactsPhone: null,
|
|
|
|
- address: null,
|
|
|
|
- source: null,
|
|
|
|
- priceType: 'order',
|
|
|
|
- puManagerApprover: null,
|
|
|
|
- puManagerApproverName: null,
|
|
|
|
- processTime: null,
|
|
|
|
- affirmer: null,
|
|
|
|
- tenantId: null,
|
|
|
|
- revision: null,
|
|
|
|
- createBy: null,
|
|
|
|
- createByName: null,
|
|
|
|
- createTime: null,
|
|
|
|
- updateBy: null,
|
|
|
|
- updateByName: null,
|
|
|
|
- updateTime: null,
|
|
|
|
- delFlag: 0,
|
|
|
|
- // 新增字段
|
|
|
|
- model: null,
|
|
|
|
- storageCondition: null,
|
|
|
|
- transportationCondition: null,
|
|
|
|
- }
|
|
|
|
|
|
+ const newLine = {...this.sonModel}
|
|
|
|
+ newLine.isUrgency = (this.basicForm.billType == 'JJXQ' ? 'Y' : 'N')
|
|
|
|
+ newLine.isReplenishment = (this.basicForm.billType == 'BDXQ' ? 'Y' : 'N')
|
|
|
|
+ newLine.demandCustomer = this.basicForm.customer
|
|
|
|
+ newLine.demandCustomerName = this.basicForm.customerName
|
|
this.basicForm.puDemandItemList.push(newLine)
|
|
this.basicForm.puDemandItemList.push(newLine)
|
|
// 补单需求状态改变
|
|
// 补单需求状态改变
|
|
if (this.basicForm.billType == 'BDXQ') {
|
|
if (this.basicForm.billType == 'BDXQ') {
|
|
@@ -1170,176 +1192,98 @@ export default {
|
|
e.preventDefault() //阻止默认粘贴事件
|
|
e.preventDefault() //阻止默认粘贴事件
|
|
let source = e.clipboardData.getData("Text");
|
|
let source = e.clipboardData.getData("Text");
|
|
console.log('scope', scope.column.property)
|
|
console.log('scope', scope.column.property)
|
|
- console.log('eee:', source)
|
|
|
|
// 首先对源头进行解析
|
|
// 首先对源头进行解析
|
|
let rows = source.split("\r\n"); // 拆成一个数组
|
|
let rows = source.split("\r\n"); // 拆成一个数组
|
|
// 数组去除空字符串
|
|
// 数组去除空字符串
|
|
rows = rows.filter(item => {
|
|
rows = rows.filter(item => {
|
|
return item && item.trim()
|
|
return item && item.trim()
|
|
})
|
|
})
|
|
- console.log('复制的数组',rows);
|
|
|
|
- console.log('列表的数组',this.basicForm.puDemandItemList)
|
|
|
|
|
|
+
|
|
if (rows.length < 100) {
|
|
if (rows.length < 100) {
|
|
- await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- let rowList = res.rows
|
|
|
|
- let newLine = []
|
|
|
|
- for (let i = 0; i<rowList.length; i++) {
|
|
|
|
- let line = {
|
|
|
|
- contacts: null,
|
|
|
|
- id: null,
|
|
|
|
- demandId: null,
|
|
|
|
- status: null,
|
|
|
|
- businessDept: null,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- materialCategory: null,
|
|
|
|
- buyer: null,
|
|
|
|
- buyerName: null,
|
|
|
|
- mateiralClassifyOne: null,
|
|
|
|
- materialClassifyOneName: null,
|
|
|
|
- materialClassifyTwo: null,
|
|
|
|
- materialClassifyTwoName: null,
|
|
|
|
- materialClassifyThree: null,
|
|
|
|
- materialClassifyThreeName: null,
|
|
|
|
- materialClassifyFour: null,
|
|
|
|
- materialClassifyFourName: null,
|
|
|
|
- materialCode: null,
|
|
|
|
- material: null,
|
|
|
|
- materialName: null,
|
|
|
|
- classifyId: null,
|
|
|
|
- specification: null,
|
|
|
|
- unit: null,
|
|
|
|
- unitName: null,
|
|
|
|
- manufacturerName: null,
|
|
|
|
- registrant: null,
|
|
|
|
- puPeriod: null,
|
|
|
|
- expiryUnit: null,
|
|
|
|
- expiry: null,
|
|
|
|
- minPackage: null,
|
|
|
|
- minOrderQty: null,
|
|
|
|
- minBatch: null,
|
|
|
|
- safeStock: null,
|
|
|
|
- averageQtyMonth: null,
|
|
|
|
- qty: null,
|
|
|
|
- adjustmentPersonal: null,
|
|
|
|
- adjustmentTime: null,
|
|
|
|
- manualRegulation: null,
|
|
|
|
- updateCause: null,
|
|
|
|
- reservedProportion: null,
|
|
|
|
- reservedPeriod: null,
|
|
|
|
- reservedQty: null,
|
|
|
|
- demandPeriod: null,
|
|
|
|
- forecastClassify: null,
|
|
|
|
- onemonthAvgVolume: null,
|
|
|
|
- threemonthAvgVolume: null,
|
|
|
|
- puFreight: null,
|
|
|
|
- deliveryDate: null,
|
|
|
|
- isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
|
- isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
|
|
|
|
- isBatchLock: 'N',
|
|
|
|
- isCustomerSpecified: '',
|
|
|
|
- remark: null,
|
|
|
|
- puRemark: null,
|
|
|
|
- lastWarehouseQty: null,
|
|
|
|
- resDemandQty: null,
|
|
|
|
- lastWarehouse: null,
|
|
|
|
- lastWarehouseName: null,
|
|
|
|
- deliveryWarehouse: null,
|
|
|
|
- deliveryWarehouseName: null,
|
|
|
|
- lastAllocation: null,
|
|
|
|
- lastAllocationName: null,
|
|
|
|
- deliveryAllocation: null,
|
|
|
|
- deliveryAllocationName: null,
|
|
|
|
- passageOn: null,
|
|
|
|
- puOrg: null,
|
|
|
|
- purOrgName: null,
|
|
|
|
- lastStockQty: null,
|
|
|
|
- superiorCenterQty: null,
|
|
|
|
- superiorAllotQty: null,
|
|
|
|
- availableQty: null,
|
|
|
|
- statusAllot: 'N',
|
|
|
|
- additionalSupplier: null,
|
|
|
|
- additionalSupplierName: null,
|
|
|
|
- periodUnit: null,
|
|
|
|
- demandCustomer: this.basicForm.customer,
|
|
|
|
- demandCustomerName: this.basicForm.customerName,
|
|
|
|
- businessDept: this.basicForm.demandDept,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- lastStockOrg: null,
|
|
|
|
- lastStockOrgName: null,
|
|
|
|
- superiorStockOrg: null,
|
|
|
|
- superiorStockOrgName: null,
|
|
|
|
- allotCode: null,
|
|
|
|
- deliveryAddress: null,
|
|
|
|
- deliveryAddressName: null,
|
|
|
|
- contacts: null,
|
|
|
|
- contactsPhone: null,
|
|
|
|
- address: null,
|
|
|
|
- source: null,
|
|
|
|
- priceType: 'order',
|
|
|
|
- puManagerApprover: null,
|
|
|
|
- puManagerApproverName: null,
|
|
|
|
- processTime: null,
|
|
|
|
- affirmer: null,
|
|
|
|
- tenantId: null,
|
|
|
|
- revision: null,
|
|
|
|
- createBy: null,
|
|
|
|
- createByName: null,
|
|
|
|
- createTime: null,
|
|
|
|
- updateBy: null,
|
|
|
|
- updateByName: null,
|
|
|
|
- updateTime: null,
|
|
|
|
- delFlag: 0,
|
|
|
|
- // 新增字段
|
|
|
|
- model: null,
|
|
|
|
- storageCondition: null,
|
|
|
|
- transportationCondition: null,
|
|
|
|
|
|
+
|
|
|
|
+ if(scope.column.property == 'materialCode') {
|
|
|
|
+ await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ let rowList = res.rows
|
|
|
|
+ let newLine = []
|
|
|
|
+ for (let i = 0; i<rowList.length; i++) {
|
|
|
|
+ let line = {...this.sonModel}
|
|
|
|
+ line.isUrgency = (this.basicForm.billType == 'JJXQ' ? 'Y' : 'N')
|
|
|
|
+ line.isReplenishment = (this.basicForm.billType == 'BDXQ' ? 'Y' : 'N')
|
|
|
|
+ line.demandCustomer = this.basicForm.customer
|
|
|
|
+ line.demandCustomerName = this.basicForm.customerName
|
|
|
|
+ line.materialCode = rowList[i].code
|
|
|
|
+ line.material = rowList[i].id
|
|
|
|
+ line.materialName = rowList[i].name
|
|
|
|
+ line.classifyId = rowList[i].classifyId
|
|
|
|
+ line.materialClassifyOneName = rowList[i].oneClass
|
|
|
|
+ line.materialClassifyTwoName = rowList[i].twoClass
|
|
|
|
+ line.materialClassifyThreeName = rowList[i].threeClass
|
|
|
|
+ line.materialClassifyFourName = rowList[i].fourClass
|
|
|
|
+ line.specification = rowList[i].specification
|
|
|
|
+ line.model = rowList[i].model
|
|
|
|
+ line.unit = rowList[i].unitId
|
|
|
|
+ line.unitName = rowList[i].unitIdName
|
|
|
|
+ line.registrant = rowList[i].registrant
|
|
|
|
+ line.manufacturerName = rowList[i].manufacturerIdName
|
|
|
|
+ line.puPeriod = rowList[i].deliveryPeriod
|
|
|
|
+ line.expiry = rowList[i].usefulLife
|
|
|
|
+ line.expiryUnit = rowList[i].expiryUnitIdName
|
|
|
|
+ // line.minPackage = rowList[i].usefulLife
|
|
|
|
+ line.minPackage = rowList[i].minPackQty
|
|
|
|
+ line.minOrderQty = rowList[i].minOrderQty
|
|
|
|
+ line.minBatch = rowList[i].minBatchQty
|
|
|
|
+ line.safeStock = rowList[i].safeStock
|
|
|
|
+ line.purOrgName = rowList[i].purchasingOrganizationName
|
|
|
|
+ line.puOrg = rowList[i].purchasingOrganization
|
|
|
|
+ // 物料存储条件和运输条件
|
|
|
|
+ line.transportationCondition = rowList[i].transportationCondition
|
|
|
|
+ line.storageCondition = rowList[i].storageCondition
|
|
|
|
+ newLine.push(line)
|
|
|
|
+ console.log('临时数组', newLine)
|
|
|
|
+ }
|
|
|
|
+ // 删除指定下标
|
|
|
|
+ this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
|
|
|
|
+ this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
|
|
}
|
|
}
|
|
- line.businessDept = rowList[i].businessDepartment
|
|
|
|
- line.businessDeptName = rowList[i].businessDepartmentName
|
|
|
|
- line.materialCode = rowList[i].code
|
|
|
|
- line.material = rowList[i].id
|
|
|
|
- line.materialName = rowList[i].name
|
|
|
|
- line.classifyId = rowList[i].classifyId
|
|
|
|
- line.materialClassifyOneName = rowList[i].oneClass
|
|
|
|
- line.materialClassifyTwoName = rowList[i].twoClass
|
|
|
|
- line.materialClassifyThreeName = rowList[i].threeClass
|
|
|
|
- line.materialClassifyFourName = rowList[i].fourClass
|
|
|
|
- line.specification = rowList[i].specification
|
|
|
|
- line.model = rowList[i].model
|
|
|
|
- line.unit = rowList[i].unitId
|
|
|
|
- line.unitName = rowList[i].unitIdName
|
|
|
|
- line.registrant = rowList[i].registrant
|
|
|
|
- line.manufacturerName = rowList[i].manufacturerIdName
|
|
|
|
- line.puPeriod = rowList[i].deliveryPeriod
|
|
|
|
- line.expiry = rowList[i].usefulLife
|
|
|
|
- line.expiryUnit = rowList[i].expiryUnitIdName
|
|
|
|
- // line.minPackage = rowList[i].usefulLife
|
|
|
|
- line.minPackage = rowList[i].minPackQty
|
|
|
|
- line.minOrderQty = rowList[i].minOrderQty
|
|
|
|
- line.minBatch = rowList[i].minBatchQty
|
|
|
|
- line.safeStock = rowList[i].safeStock
|
|
|
|
- line.purOrgName = rowList[i].purchasingOrganizationName
|
|
|
|
- line.puOrg = rowList[i].purchasingOrganization
|
|
|
|
- // 物料存储条件和运输条件
|
|
|
|
- line.transportationCondition = rowList[i].transportationCondition
|
|
|
|
- line.storageCondition = rowList[i].storageCondition
|
|
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$refs.table.doLayout()
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }else if(scope.column.property == 'qty') {
|
|
|
|
+ console.log('复制内容:', rows)
|
|
|
|
+ let newLine = []
|
|
|
|
+ if(this.basicForm.puDemandItemList.length <= 1) {
|
|
|
|
+ for (let i = 0; i<rows.length; i++) {
|
|
|
|
+ let line = {...this.sonModel}
|
|
|
|
+ line.isUrgency = (this.basicForm.billType == 'JJXQ' ? 'Y' : 'N')
|
|
|
|
+ line.isReplenishment = (this.basicForm.billType == 'BDXQ' ? 'Y' : 'N')
|
|
|
|
+ line.demandCustomer = this.basicForm.customer
|
|
|
|
+ line.demandCustomerName = this.basicForm.customerName
|
|
|
|
+ line.qty = rows[i]
|
|
newLine.push(line)
|
|
newLine.push(line)
|
|
- console.log('临时数组', newLine)
|
|
|
|
}
|
|
}
|
|
// 删除指定下标
|
|
// 删除指定下标
|
|
- this.basicForm.puDemandItemList.splice(index,1,...newLine)
|
|
|
|
- this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
|
|
|
|
|
|
+ this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
|
|
|
|
+ this.$modal.notifySuccess("共粘贴" + rows.length + '条数据');
|
|
|
|
+ this.$refs.table.doLayout()
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ } else {
|
|
|
|
+ this.basicForm.puDemandItemList.forEach(item => {
|
|
|
|
+ for (let i = 0; i<rows.length; i++) {
|
|
|
|
+ item.qty = rows[i]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- }).then(() => {
|
|
|
|
- this.$refs.table.doLayout()
|
|
|
|
- }).catch(err => {
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- })
|
|
|
|
- this.$modal.closeLoading();
|
|
|
|
- console.log('列表', this.basicForm.puDemandItemList)
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.$modal.notifyWarning("复制长度不能超过100!");
|
|
this.$modal.notifyWarning("复制长度不能超过100!");
|
|
|
|
+ this.$modal.closeLoading();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 明细行选择物料编码带出数据
|
|
// 明细行选择物料编码带出数据
|
|
@@ -1392,8 +1336,6 @@ export default {
|
|
this.basicForm.puDemandItemList[this.tableIndex].buyerName = res.rows[0].buyerName
|
|
this.basicForm.puDemandItemList[this.tableIndex].buyerName = res.rows[0].buyerName
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].businessDepartment
|
|
|
|
- this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].businessDepartmentName
|
|
|
|
this.basicForm.puDemandItemList[this.tableIndex].materialCode = selection[0].code
|
|
this.basicForm.puDemandItemList[this.tableIndex].materialCode = selection[0].code
|
|
this.basicForm.puDemandItemList[this.tableIndex].material = selection[0].id
|
|
this.basicForm.puDemandItemList[this.tableIndex].material = selection[0].id
|
|
this.basicForm.puDemandItemList[this.tableIndex].materialName = selection[0].name
|
|
this.basicForm.puDemandItemList[this.tableIndex].materialName = selection[0].name
|
|
@@ -1426,116 +1368,11 @@ export default {
|
|
console.log('xxxxx', selection)
|
|
console.log('xxxxx', selection)
|
|
let newLine = []
|
|
let newLine = []
|
|
for (let i = 0;i<selection.length;i++) {
|
|
for (let i = 0;i<selection.length;i++) {
|
|
- let line = {
|
|
|
|
- contacts: null,
|
|
|
|
- id: null,
|
|
|
|
- demandId: null,
|
|
|
|
- status: null,
|
|
|
|
- businessDept: null,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- materialCategory: null,
|
|
|
|
- buyer: null,
|
|
|
|
- buyerName: null,
|
|
|
|
- mateiralClassifyOne: null,
|
|
|
|
- materialClassifyOneName: null,
|
|
|
|
- materialClassifyTwo: null,
|
|
|
|
- materialClassifyTwoName: null,
|
|
|
|
- materialClassifyThree: null,
|
|
|
|
- materialClassifyThreeName: null,
|
|
|
|
- materialClassifyFour: null,
|
|
|
|
- materialClassifyFourName: null,
|
|
|
|
- materialCode: null,
|
|
|
|
- material: null,
|
|
|
|
- materialName: null,
|
|
|
|
- classifyId: null,
|
|
|
|
- specification: null,
|
|
|
|
- unit: null,
|
|
|
|
- unitName: null,
|
|
|
|
- manufacturerName: null,
|
|
|
|
- registrant: null,
|
|
|
|
- puPeriod: null,
|
|
|
|
- expiryUnit: null,
|
|
|
|
- expiry: null,
|
|
|
|
- minPackage: null,
|
|
|
|
- minOrderQty: null,
|
|
|
|
- minBatch: null,
|
|
|
|
- safeStock: null,
|
|
|
|
- averageQtyMonth: null,
|
|
|
|
- qty: null,
|
|
|
|
- adjustmentPersonal: null,
|
|
|
|
- adjustmentTime: null,
|
|
|
|
- manualRegulation: null,
|
|
|
|
- updateCause: null,
|
|
|
|
- reservedProportion: null,
|
|
|
|
- reservedPeriod: null,
|
|
|
|
- reservedQty: null,
|
|
|
|
- demandPeriod: null,
|
|
|
|
- forecastClassify: null,
|
|
|
|
- onemonthAvgVolume: null,
|
|
|
|
- threemonthAvgVolume: null,
|
|
|
|
- puFreight: null,
|
|
|
|
- deliveryDate: null,
|
|
|
|
- isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
|
|
|
|
- isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
|
|
|
|
- isBatchLock: 'N',
|
|
|
|
- isCustomerSpecified: '',
|
|
|
|
- remark: null,
|
|
|
|
- puRemark: null,
|
|
|
|
- lastWarehouseQty: null,
|
|
|
|
- resDemandQty: null,
|
|
|
|
- lastWarehouse: null,
|
|
|
|
- lastWarehouseName: null,
|
|
|
|
- deliveryWarehouse: null,
|
|
|
|
- deliveryWarehouseName: null,
|
|
|
|
- lastAllocation: null,
|
|
|
|
- lastAllocationName: null,
|
|
|
|
- deliveryAllocation: null,
|
|
|
|
- deliveryAllocationName: null,
|
|
|
|
- passageOn: null,
|
|
|
|
- puOrg: null,
|
|
|
|
- purOrgName: null,
|
|
|
|
- lastStockQty: null,
|
|
|
|
- superiorCenterQty: null,
|
|
|
|
- superiorAllotQty: null,
|
|
|
|
- availableQty: null,
|
|
|
|
- statusAllot: 'N',
|
|
|
|
- additionalSupplier: null,
|
|
|
|
- additionalSupplierName: null,
|
|
|
|
- periodUnit: null,
|
|
|
|
- demandCustomer: this.basicForm.customer,
|
|
|
|
- demandCustomerName: this.basicForm.customerName,
|
|
|
|
- businessDept: this.basicForm.demandDept,
|
|
|
|
- businessDeptName: null,
|
|
|
|
- lastStockOrg: null,
|
|
|
|
- lastStockOrgName: null,
|
|
|
|
- superiorStockOrg: null,
|
|
|
|
- superiorStockOrgName: null,
|
|
|
|
- allotCode: null,
|
|
|
|
- deliveryAddress: null,
|
|
|
|
- deliveryAddressName: null,
|
|
|
|
- contacts: null,
|
|
|
|
- contactsPhone: null,
|
|
|
|
- address: null,
|
|
|
|
- source: null,
|
|
|
|
- priceType: 'order',
|
|
|
|
- puManagerApprover: null,
|
|
|
|
- puManagerApproverName: null,
|
|
|
|
- processTime: null,
|
|
|
|
- affirmer: null,
|
|
|
|
- tenantId: null,
|
|
|
|
- revision: null,
|
|
|
|
- createBy: null,
|
|
|
|
- createByName: null,
|
|
|
|
- createTime: null,
|
|
|
|
- updateBy: null,
|
|
|
|
- updateByName: null,
|
|
|
|
- updateTime: null,
|
|
|
|
- delFlag: 0,
|
|
|
|
- // 新增字段
|
|
|
|
- model: null,
|
|
|
|
- storageCondition: null,
|
|
|
|
- transportationCondition: null,
|
|
|
|
- }
|
|
|
|
|
|
+ let line = {...this.sonModel}
|
|
|
|
+ line.isUrgency = (this.basicForm.billType == 'JJXQ' ? 'Y' : 'N')
|
|
|
|
+ line.isReplenishment = (this.basicForm.billType == 'BDXQ' ? 'Y' : 'N')
|
|
|
|
+ line.demandCustomer = this.basicForm.customer
|
|
|
|
+ line.demandCustomerName = this.basicForm.customerName
|
|
// 通过选择物料查询采购员
|
|
// 通过选择物料查询采购员
|
|
queryMan(selection[i].id).then(res => {
|
|
queryMan(selection[i].id).then(res => {
|
|
if (res.code === 200 && res.rows.length !== 0) {
|
|
if (res.code === 200 && res.rows.length !== 0) {
|
|
@@ -1543,8 +1380,6 @@ export default {
|
|
line.buyerName = res.rows[0].buyerName
|
|
line.buyerName = res.rows[0].buyerName
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- line.businessDept = selection[i].businessDepartment
|
|
|
|
- line.businessDeptName = selection[i].businessDepartmentName
|
|
|
|
line.materialCode = selection[i].code
|
|
line.materialCode = selection[i].code
|
|
line.material = selection[i].id
|
|
line.material = selection[i].id
|
|
line.materialName = selection[i].name
|
|
line.materialName = selection[i].name
|