Commit 38089a51eaf448e38fe1805f7b567732c9a37ca7

Authored by gesilong
1 parent 0d09d791

commit:开票品名汇总 逻辑修改

@@ -140,15 +140,9 @@ @@ -140,15 +140,9 @@
140 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 140 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
141 </template> 141 </template>
142 </uni-list-item> 142 </uni-list-item>
143 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
144 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
145 - <template v-slot:body>  
146 - <view class="item-title"><text>历史备注</text></view>  
147 - </template>  
148 - </uni-list-item>  
149 <uni-list-item title="备注"> 143 <uni-list-item title="备注">
150 <template v-slot:footer> 144 <template v-slot:footer>
151 - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000"/> 145 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
152 </template> 146 </template>
153 </uni-list-item> 147 </uni-list-item>
154 <view class="quality"> 148 <view class="quality">
@@ -233,7 +227,7 @@ @@ -233,7 +227,7 @@
233 import SingleSelectSheet from '@/components/single-select/index.vue' 227 import SingleSelectSheet from '@/components/single-select/index.vue'
234 import RelateSelectSheet from '@/components/relate-select/index.vue' 228 import RelateSelectSheet from '@/components/relate-select/index.vue'
235 import ProductRel from './productRel.vue' 229 import ProductRel from './productRel.vue'
236 -import { getRetailCodeApi, createContractApi, getCustomerRemarks, getCustomerSpecificQualityRequirements, getDeptApi, getContractApi } from '@/api/contract' 230 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
237 import { getDicByCodes } from '@/utils/dic' 231 import { getDicByCodes } from '@/utils/dic'
238 import { formatCurrencyToChinese } from '@/utils/common' 232 import { formatCurrencyToChinese } from '@/utils/common'
239 import { workshopQueryApi } from '@/api/devManage' 233 import { workshopQueryApi } from '@/api/devManage'
@@ -295,10 +289,7 @@ export default { @@ -295,10 +289,7 @@ export default {
295 totalAmountIncludingTax: 0, 289 totalAmountIncludingTax: 0,
296 productLineList: [], 290 productLineList: [],
297 productList: [], 291 productList: [],
298 - customerRemarks: [],  
299 - defaultRemark: '',  
300 regionOptions: [], 292 regionOptions: [],
301 - qualityReqSeq: 0,  
302 } 293 }
303 }, 294 },
304 onLoad(query) { 295 onLoad(query) {
@@ -319,45 +310,6 @@ export default { @@ -319,45 +310,6 @@ export default {
319 if (this.copyId) this.loadCopyDetail(this.copyId) 310 if (this.copyId) this.loadCopyDetail(this.copyId)
320 }, 311 },
321 watch: { 312 watch: {
322 - 'form.buyer': {  
323 - handler(newVal, oldVal) {  
324 - if (newVal) {  
325 - getCustomerRemarks(newVal).then(res => {  
326 - const remarksData = res.data || [];  
327 - this.customerRemarks = remarksData.map((item, index) => ({  
328 - label: `客户备注${index + 1}`,  
329 - value: item,  
330 - }));  
331 - if (remarksData.length > 0) {  
332 - this.defaultRemark = this.customerRemarks[0].label || '';  
333 - this.form.remarks = remarksData[0];  
334 - } else {  
335 - this.form.remarks = '';  
336 - this.defaultRemark = '';  
337 - }  
338 - })  
339 - this.getHistory()  
340 - }  
341 - }  
342 - },  
343 - productLineList: {  
344 - deep: true,  
345 - handler(newVal, oldVal) {  
346 - const n = Array.isArray(newVal) ? newVal : []  
347 - const o = Array.isArray(oldVal) ? oldVal : []  
348 - const changed = []  
349 - for (let i = 0; i < n.length; i++) {  
350 - const ni = n[i] && n[i].productId  
351 - const oi = o[i] && o[i].productId  
352 - if (ni !== oi && ni !== undefined) changed.push(ni)  
353 - }  
354 - console.log('changed', changed)  
355 - if (changed.length && this.form.buyer) {  
356 - const id = changed.join('')  
357 - this.fetchCustomerQualityRequirements(id)  
358 - }  
359 - }  
360 - },  
361 }, 313 },
362 methods: { 314 methods: {
363 async loadCopyDetail(id) { 315 async loadCopyDetail(id) {
@@ -454,47 +406,6 @@ export default { @@ -454,47 +406,6 @@ export default {
454 } 406 }
455 }) 407 })
456 }, 408 },
457 - getHistory() {  
458 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
459 - return;  
460 - }  
461 - const id = this.productLineList.map(it => it.productId).join('')  
462 - this.fetchCustomerQualityRequirements(id)  
463 - },  
464 - async fetchCustomerQualityRequirements(id) {  
465 - if (!this.form.buyer || !id) {  
466 - return;  
467 - }  
468 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
469 - const seq = this.qualityReqSeq  
470 - try {  
471 - const result = await getCustomerSpecificQualityRequirements({  
472 - customerId: this.form.buyer,  
473 - productIdList:id,  
474 - });  
475 - if (seq !== this.qualityReqSeq) return  
476 - this.updateFormData(result.data || {});  
477 - } catch (error) {  
478 - if (seq !== this.qualityReqSeq) return  
479 - console.error('获取客户质量要求失败:', error);  
480 - // 可以根据需要添加错误提示逻辑  
481 - this.$message.error('获取历史数据失败,请稍后重试');  
482 - }  
483 - },  
484 - // 提取公共的字段更新方法  
485 - updateFormData(result) {  
486 - const fields = [  
487 - 'component',  
488 - 'packaging',  
489 - 'performance',  
490 - 'pieceWeightHead',  
491 - 'surface',  
492 - 'tolerance',  
493 - ];  
494 - fields.forEach((field) => {  
495 - this.form[field] = result[field] != null ? String(result[field]) : ''  
496 - });  
497 - },  
498 onProductsChange(products) { 409 onProductsChange(products) {
499 const list = Array.isArray(products) ? products : [] 410 const list = Array.isArray(products) ? products : []
500 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) 411 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0)
@@ -572,8 +483,6 @@ export default { @@ -572,8 +483,6 @@ export default {
572 setSheet('单价中是否已包含包装费', this.yesNoList) 483 setSheet('单价中是否已包含包装费', this.yesNoList)
573 } else if (field === 'includesTransportFee') { 484 } else if (field === 'includesTransportFee') {
574 setSheet('单价中是否已包含运费', this.yesNoList) 485 setSheet('单价中是否已包含运费', this.yesNoList)
575 - } else if (field === 'historyRemarks') {  
576 - setSheet('历史备注', this.customerRemarks)  
577 }else if (field === 'region') { 486 }else if (field === 'region') {
578 setSheet('区域', this.regionOptions) 487 setSheet('区域', this.regionOptions)
579 } 488 }
@@ -582,13 +491,8 @@ export default { @@ -582,13 +491,8 @@ export default {
582 const field = this.sheet.field 491 const field = this.sheet.field
583 if (!field) return 492 if (!field) return
584 const v = (value === undefined || value === null) ? '' : value 493 const v = (value === undefined || value === null) ? '' : value
585 - if (field === 'historyRemarks') {  
586 - this.defaultRemark = label || ''  
587 - this.form.remarks = v  
588 - }else{  
589 - this.form[field] = v  
590 - this.form[field + 'Name'] = label || ''  
591 - } 494 + this.form[field] = v
  495 + this.form[field + 'Name'] = label || ''
592 }, 496 },
593 openRelate(fieldKey) { 497 openRelate(fieldKey) {
594 let config = {} 498 let config = {}
@@ -143,12 +143,6 @@ @@ -143,12 +143,6 @@
143 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 143 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
144 </template> 144 </template>
145 </uni-list-item> 145 </uni-list-item>
146 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
147 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
148 - <template v-slot:body>  
149 - <view class="item-title"><text>历史备注</text></view>  
150 - </template>  
151 - </uni-list-item>  
152 <uni-list-item title="备注"> 146 <uni-list-item title="备注">
153 <template v-slot:footer> 147 <template v-slot:footer>
154 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 148 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -236,7 +230,7 @@ @@ -236,7 +230,7 @@
236 import SingleSelectSheet from '@/components/single-select/index.vue' 230 import SingleSelectSheet from '@/components/single-select/index.vue'
237 import RelateSelectSheet from '@/components/relate-select/index.vue' 231 import RelateSelectSheet from '@/components/relate-select/index.vue'
238 import ProductRel from './productRel.vue' 232 import ProductRel from './productRel.vue'
239 -import { getRetailCodeApi, createContractApi, getCustomerSpecificQualityRequirements, getCustomerRemarks, getDeptApi, getContractApi } from '@/api/contract' 233 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
240 import { getDicByCodes } from '@/utils/dic' 234 import { getDicByCodes } from '@/utils/dic'
241 import { formatCurrencyToChinese } from '@/utils/common' 235 import { formatCurrencyToChinese } from '@/utils/common'
242 import { workshopQueryApi } from '@/api/devManage' 236 import { workshopQueryApi } from '@/api/devManage'
@@ -297,10 +291,7 @@ export default { @@ -297,10 +291,7 @@ export default {
297 totalAmountIncludingTax: 0, 291 totalAmountIncludingTax: 0,
298 productLineList: [], 292 productLineList: [],
299 productList: [], 293 productList: [],
300 - customerRemarks: [],  
301 - defaultRemark: '',  
302 regionOptions: [], 294 regionOptions: [],
303 - qualityReqSeq: 0,  
304 } 295 }
305 }, 296 },
306 onLoad(query) { 297 onLoad(query) {
@@ -321,45 +312,6 @@ export default { @@ -321,45 +312,6 @@ export default {
321 if (this.copyId) this.loadCopyDetail(this.copyId) 312 if (this.copyId) this.loadCopyDetail(this.copyId)
322 }, 313 },
323 watch: { 314 watch: {
324 - 'form.buyer': {  
325 - handler(newVal, oldVal) {  
326 - if (newVal) {  
327 - getCustomerRemarks(newVal).then(res => {  
328 - const remarksData = res.data || [];  
329 - this.customerRemarks = remarksData.map((item, index) => ({  
330 - label: `客户备注${index + 1}`,  
331 - value: item,  
332 - }));  
333 - if (remarksData.length > 0) {  
334 - this.defaultRemark = this.customerRemarks[0].label || '';  
335 - this.form.remarks = remarksData[0];  
336 - } else {  
337 - this.form.remarks = '';  
338 - this.defaultRemark = '';  
339 - }  
340 - })  
341 - this.getHistory()  
342 - }  
343 - }  
344 - },  
345 - productLineList: {  
346 - deep: true,  
347 - handler(newVal, oldVal) {  
348 - const n = Array.isArray(newVal) ? newVal : []  
349 - const o = Array.isArray(oldVal) ? oldVal : []  
350 - const changed = []  
351 - for (let i = 0; i < n.length; i++) {  
352 - const ni = n[i] && n[i].productId  
353 - const oi = o[i] && o[i].productId  
354 - if (ni !== oi && ni !== undefined) changed.push(ni)  
355 - }  
356 - console.log('changed', changed)  
357 - if (changed.length && this.form.buyer) {  
358 - const id = changed.join('')  
359 - this.fetchCustomerQualityRequirements(id)  
360 - }  
361 - }  
362 - },  
363 }, 315 },
364 methods: { 316 methods: {
365 async loadCopyDetail(id) { 317 async loadCopyDetail(id) {
@@ -455,49 +407,6 @@ export default { @@ -455,49 +407,6 @@ export default {
455 } 407 }
456 }) 408 })
457 }, 409 },
458 - getHistory() {  
459 - console.log('this.productLineList', this.productLineList[0].productId)  
460 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
461 - return;  
462 - }  
463 - const id = this.productLineList.map(it => it.productId).join('')  
464 - this.fetchCustomerQualityRequirements(id)  
465 - },  
466 - async fetchCustomerQualityRequirements(id) {  
467 - if (!this.form.buyer || !id) {  
468 - return;  
469 - }  
470 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
471 - const seq = this.qualityReqSeq  
472 - try {  
473 - const result = await getCustomerSpecificQualityRequirements({  
474 - customerId: this.form.buyer,  
475 - productIdList:id,  
476 - });  
477 - if (seq !== this.qualityReqSeq) return  
478 - this.updateFormData(result.data || {});  
479 - } catch (error) {  
480 - if (seq !== this.qualityReqSeq) return  
481 - console.error('获取客户质量要求失败:', error);  
482 - // 可以根据需要添加错误提示逻辑  
483 - this.$message.error('获取历史数据失败,请稍后重试');  
484 - }  
485 - },  
486 - // 提取公共的字段更新方法  
487 - updateFormData(result) {  
488 - console.log('result', result)  
489 - const fields = [  
490 - 'component',  
491 - 'packaging',  
492 - 'performance',  
493 - 'pieceWeightHead',  
494 - 'surface',  
495 - 'tolerance',  
496 - ];  
497 - fields.forEach((field) => {  
498 - this.form[field] = result[field] != null ? String(result[field]) : ''  
499 - });  
500 - },  
501 onProductsChange(products) { 410 onProductsChange(products) {
502 const list = Array.isArray(products) ? products : [] 411 const list = Array.isArray(products) ? products : []
503 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) 412 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0)
@@ -575,9 +484,7 @@ export default { @@ -575,9 +484,7 @@ export default {
575 setSheet('单价中是否已包含包装费', this.yesNoList) 484 setSheet('单价中是否已包含包装费', this.yesNoList)
576 } else if (field === 'includesTransportFee') { 485 } else if (field === 'includesTransportFee') {
577 setSheet('单价中是否已包含运费', this.yesNoList) 486 setSheet('单价中是否已包含运费', this.yesNoList)
578 - } else if (field === 'historyRemarks') {  
579 - setSheet('历史备注', this.customerRemarks)  
580 - }else if (field === 'region') { 487 + } else if (field === 'region') {
581 setSheet('区域', this.regionOptions) 488 setSheet('区域', this.regionOptions)
582 } 489 }
583 }, 490 },
@@ -585,13 +492,8 @@ export default { @@ -585,13 +492,8 @@ export default {
585 const field = this.sheet.field 492 const field = this.sheet.field
586 if (!field) return 493 if (!field) return
587 const v = (value === undefined || value === null) ? '' : value 494 const v = (value === undefined || value === null) ? '' : value
588 - if (field === 'historyRemarks') {  
589 - this.defaultRemark = label || ''  
590 - this.form.remarks = v  
591 - }else{  
592 - this.form[field] = v  
593 - this.form[field + 'Name'] = label || ''  
594 - } 495 + this.form[field] = v
  496 + this.form[field + 'Name'] = label || ''
595 }, 497 },
596 openRelate(fieldKey) { 498 openRelate(fieldKey) {
597 let config = {} 499 let config = {}
@@ -141,12 +141,6 @@ @@ -141,12 +141,6 @@
141 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 141 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
142 </template> 142 </template>
143 </uni-list-item> 143 </uni-list-item>
144 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
145 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
146 - <template v-slot:body>  
147 - <view class="item-title"><text>历史备注</text></view>  
148 - </template>  
149 - </uni-list-item>  
150 <uni-list-item title="备注"> 144 <uni-list-item title="备注">
151 <template v-slot:footer> 145 <template v-slot:footer>
152 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 146 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -234,7 +228,7 @@ @@ -234,7 +228,7 @@
234 import SingleSelectSheet from '@/components/single-select/index.vue' 228 import SingleSelectSheet from '@/components/single-select/index.vue'
235 import RelateSelectSheet from '@/components/relate-select/index.vue' 229 import RelateSelectSheet from '@/components/relate-select/index.vue'
236 import ProductRel from './productRel.vue' 230 import ProductRel from './productRel.vue'
237 -import { getRetailCodeApi, createContractApi, getCustomerRemarks, getCustomerSpecificQualityRequirements, getDeptApi, getContractApi } from '@/api/contract' 231 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
238 import { getDicByCodes } from '@/utils/dic' 232 import { getDicByCodes } from '@/utils/dic'
239 import { formatCurrencyToChinese } from '@/utils/common' 233 import { formatCurrencyToChinese } from '@/utils/common'
240 import { workshopQueryApi } from '@/api/devManage' 234 import { workshopQueryApi } from '@/api/devManage'
@@ -295,10 +289,7 @@ export default { @@ -295,10 +289,7 @@ export default {
295 totalAmountIncludingTax: 0, 289 totalAmountIncludingTax: 0,
296 productLineList: [], 290 productLineList: [],
297 productList: [], 291 productList: [],
298 - customerRemarks: [],  
299 - defaultRemark: '',  
300 regionOptions: [], 292 regionOptions: [],
301 - qualityReqSeq: 0,  
302 } 293 }
303 }, 294 },
304 onLoad(query) { 295 onLoad(query) {
@@ -319,44 +310,6 @@ export default { @@ -319,44 +310,6 @@ export default {
319 if (this.copyId) this.loadCopyDetail(this.copyId) 310 if (this.copyId) this.loadCopyDetail(this.copyId)
320 }, 311 },
321 watch: { 312 watch: {
322 - 'form.buyer': {  
323 - handler(newVal, oldVal) {  
324 - if (newVal) {  
325 - getCustomerRemarks(newVal).then(res => {  
326 - const remarksData = res.data || [];  
327 - this.customerRemarks = remarksData.map((item, index) => ({  
328 - label: `客户备注${index + 1}`,  
329 - value: item,  
330 - }));  
331 - if (remarksData.length > 0) {  
332 - this.defaultRemark = this.customerRemarks[0].label || '';  
333 - this.form.remarks = remarksData[0];  
334 - } else {  
335 - this.form.remarks = '';  
336 - this.defaultRemark = '';  
337 - }  
338 - })  
339 - this.getHistory()  
340 - }  
341 - }  
342 - },  
343 - productLineList: {  
344 - deep: true,  
345 - handler(newVal, oldVal) {  
346 - const n = Array.isArray(newVal) ? newVal : []  
347 - const o = Array.isArray(oldVal) ? oldVal : []  
348 - const changed = []  
349 - for (let i = 0; i < n.length; i++) {  
350 - const ni = n[i] && n[i].productId  
351 - const oi = o[i] && o[i].productId  
352 - if (ni !== oi && ni !== undefined) changed.push(ni)  
353 - }  
354 - if (changed.length && this.form.buyer) {  
355 - const id = changed.join('')  
356 - this.fetchCustomerQualityRequirements(id)  
357 - }  
358 - }  
359 - },  
360 }, 313 },
361 methods: { 314 methods: {
362 async loadCopyDetail(id) { 315 async loadCopyDetail(id) {
@@ -453,49 +406,6 @@ export default { @@ -453,49 +406,6 @@ export default {
453 } 406 }
454 }) 407 })
455 }, 408 },
456 - getHistory() {  
457 - console.log('this.productLineList', this.productLineList[0].productId)  
458 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
459 - return;  
460 - }  
461 - const id = this.productLineList.map(it => it.productId).join('')  
462 - this.fetchCustomerQualityRequirements(id)  
463 - },  
464 - async fetchCustomerQualityRequirements(id) {  
465 - if (!this.form.buyer || !id) {  
466 - return;  
467 - }  
468 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
469 - const seq = this.qualityReqSeq  
470 - try {  
471 - const result = await getCustomerSpecificQualityRequirements({  
472 - customerId: this.form.buyer,  
473 - productIdList:id,  
474 - });  
475 - if (seq !== this.qualityReqSeq) return  
476 - this.updateFormData(result.data || {});  
477 - } catch (error) {  
478 - if (seq !== this.qualityReqSeq) return  
479 - console.error('获取客户质量要求失败:', error);  
480 - // 可以根据需要添加错误提示逻辑  
481 - this.$message.error('获取历史数据失败,请稍后重试');  
482 - }  
483 - },  
484 - // 提取公共的字段更新方法  
485 - updateFormData(result) {  
486 - console.log('result', result)  
487 - const fields = [  
488 - 'component',  
489 - 'packaging',  
490 - 'performance',  
491 - 'pieceWeightHead',  
492 - 'surface',  
493 - 'tolerance',  
494 - ];  
495 - fields.forEach((field) => {  
496 - this.form[field] = result[field] != null ? String(result[field]) : ''  
497 - });  
498 - },  
499 onProductsChange(products) { 409 onProductsChange(products) {
500 const list = Array.isArray(products) ? products : [] 410 const list = Array.isArray(products) ? products : []
501 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) 411 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0)
@@ -573,9 +483,7 @@ export default { @@ -573,9 +483,7 @@ export default {
573 setSheet('单价中是否已包含包装费', this.yesNoList) 483 setSheet('单价中是否已包含包装费', this.yesNoList)
574 } else if (field === 'includesTransportFee') { 484 } else if (field === 'includesTransportFee') {
575 setSheet('单价中是否已包含运费', this.yesNoList) 485 setSheet('单价中是否已包含运费', this.yesNoList)
576 - } else if (field === 'historyRemarks') {  
577 - setSheet('历史备注', this.customerRemarks)  
578 - }else if (field === 'region') { 486 + } else if (field === 'region') {
579 setSheet('区域', this.regionOptions) 487 setSheet('区域', this.regionOptions)
580 } 488 }
581 }, 489 },
@@ -583,13 +491,8 @@ export default { @@ -583,13 +491,8 @@ export default {
583 const field = this.sheet.field 491 const field = this.sheet.field
584 if (!field) return 492 if (!field) return
585 const v = (value === undefined || value === null) ? '' : value 493 const v = (value === undefined || value === null) ? '' : value
586 - if (field === 'historyRemarks') {  
587 - this.defaultRemark = label || ''  
588 - this.form.remarks = v  
589 - }else{  
590 - this.form[field] = v  
591 - this.form[field + 'Name'] = label || ''  
592 - } 494 + this.form[field] = v
  495 + this.form[field + 'Name'] = label || ''
593 }, 496 },
594 openRelate(fieldKey) { 497 openRelate(fieldKey) {
595 let config = {} 498 let config = {}
@@ -143,12 +143,6 @@ @@ -143,12 +143,6 @@
143 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 143 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
144 </template> 144 </template>
145 </uni-list-item> 145 </uni-list-item>
146 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
147 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
148 - <template v-slot:body>  
149 - <view class="item-title"><text>历史备注</text></view>  
150 - </template>  
151 - </uni-list-item>  
152 <uni-list-item title="备注"> 146 <uni-list-item title="备注">
153 <template v-slot:footer> 147 <template v-slot:footer>
154 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 148 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -237,7 +231,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue' @@ -237,7 +231,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue'
237 import RelateSelectSheet from '@/components/relate-select/index.vue' 231 import RelateSelectSheet from '@/components/relate-select/index.vue'
238 import ProductRel from './productRel.vue' 232 import ProductRel from './productRel.vue'
239 import CitySelector from '@/components/city-selector/index.vue' 233 import CitySelector from '@/components/city-selector/index.vue'
240 -import { getRetailCodeApi, createContractApi, getCustomerRemarks, getCustomerSpecificQualityRequirements, getDeptApi, getContractApi } from '@/api/contract' 234 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
241 import { getDicByCodes } from '@/utils/dic' 235 import { getDicByCodes } from '@/utils/dic'
242 import { formatCurrencyToChinese } from '@/utils/common' 236 import { formatCurrencyToChinese } from '@/utils/common'
243 import { workshopQueryApi } from '@/api/devManage' 237 import { workshopQueryApi } from '@/api/devManage'
@@ -300,13 +294,10 @@ export default { @@ -300,13 +294,10 @@ export default {
300 totalAmountIncludingTax: 0, 294 totalAmountIncludingTax: 0,
301 productLineList: [], 295 productLineList: [],
302 productList: [], 296 productList: [],
303 - customerRemarks: [],  
304 - defaultRemark: '',  
305 regionOptions: [], 297 regionOptions: [],
306 rawToProdRatioList: [], 298 rawToProdRatioList: [],
307 rawProductList: [], 299 rawProductList: [],
308 rawProductGradeList: [], 300 rawProductGradeList: [],
309 - qualityReqSeq: 0,  
310 } 301 }
311 }, 302 },
312 onLoad(query) { 303 onLoad(query) {
@@ -332,44 +323,6 @@ export default { @@ -332,44 +323,6 @@ export default {
332 }) 323 })
333 }, 324 },
334 watch: { 325 watch: {
335 - 'form.buyer': {  
336 - handler(newVal, oldVal) {  
337 - if (newVal) {  
338 - getCustomerRemarks(newVal).then(res => {  
339 - const remarksData = res.data || [];  
340 - this.customerRemarks = remarksData.map((item, index) => ({  
341 - label: `客户备注${index + 1}`,  
342 - value: item,  
343 - }));  
344 - if (remarksData.length > 0) {  
345 - this.defaultRemark = this.customerRemarks[0].label || '';  
346 - this.form.remarks = remarksData[0];  
347 - } else {  
348 - this.form.remarks = '';  
349 - this.defaultRemark = '';  
350 - }  
351 - })  
352 - this.getHistory()  
353 - }  
354 - }  
355 - },  
356 - productLineList: {  
357 - deep: true,  
358 - handler(newVal, oldVal) {  
359 - const n = Array.isArray(newVal) ? newVal : []  
360 - const o = Array.isArray(oldVal) ? oldVal : []  
361 - const changed = []  
362 - for (let i = 0; i < n.length; i++) {  
363 - const ni = n[i] && n[i].rawProductId  
364 - const oi = o[i] && o[i].rawProductId  
365 - if (ni !== oi && ni !== undefined) changed.push(ni)  
366 - }  
367 - if (changed.length && this.form.buyer) {  
368 - const id = changed.join('')  
369 - this.fetchCustomerQualityRequirements(id)  
370 - }  
371 - }  
372 - },  
373 }, 326 },
374 methods: { 327 methods: {
375 async loadCopyDetail(id) { 328 async loadCopyDetail(id) {
@@ -489,49 +442,6 @@ export default { @@ -489,49 +442,6 @@ export default {
489 } 442 }
490 }) 443 })
491 }, 444 },
492 - getHistory() {  
493 - console.log('this.productLineList', this.productLineList[0].rawProductId)  
494 - if (!this.productLineList.length || !this.productLineList[0].rawProductId) {  
495 - return;  
496 - }  
497 - const id = this.productLineList.map(it => it.rawProductId).join('')  
498 - this.fetchCustomerQualityRequirements(id)  
499 - },  
500 - async fetchCustomerQualityRequirements(id) {  
501 - if (!this.form.buyer || !id) {  
502 - return;  
503 - }  
504 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
505 - const seq = this.qualityReqSeq  
506 - try {  
507 - const result = await getCustomerSpecificQualityRequirements({  
508 - customerId: this.form.buyer,  
509 - productIdList:id,  
510 - });  
511 - if (seq !== this.qualityReqSeq) return  
512 - this.updateFormData(result.data || {});  
513 - } catch (error) {  
514 - if (seq !== this.qualityReqSeq) return  
515 - console.error('获取客户质量要求失败:', error);  
516 - // 可以根据需要添加错误提示逻辑  
517 - this.$message.error('获取历史数据失败,请稍后重试');  
518 - }  
519 - },  
520 - // 提取公共的字段更新方法  
521 - updateFormData(result) {  
522 - console.log('result', result)  
523 - const fields = [  
524 - 'component',  
525 - 'packaging',  
526 - 'performance',  
527 - 'pieceWeightHead',  
528 - 'surface',  
529 - 'tolerance',  
530 - ];  
531 - fields.forEach((field) => {  
532 - this.form[field] = result[field] != null ? String(result[field]) : ''  
533 - });  
534 - },  
535 onProductsChange(products) { 445 onProductsChange(products) {
536 const list = Array.isArray(products) ? products : [] 446 const list = Array.isArray(products) ? products : []
537 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.productQuantity) || 0), 0) 447 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.productQuantity) || 0), 0)
@@ -618,8 +528,6 @@ export default { @@ -618,8 +528,6 @@ export default {
618 setSheet('单价中是否已包含包装费', this.yesNoList) 528 setSheet('单价中是否已包含包装费', this.yesNoList)
619 } else if (field === 'includesTransportFee') { 529 } else if (field === 'includesTransportFee') {
620 setSheet('单价中是否已包含运费', this.yesNoList) 530 setSheet('单价中是否已包含运费', this.yesNoList)
621 - } else if (field === 'historyRemarks') {  
622 - setSheet('历史备注', this.customerRemarks)  
623 }else if (field === 'region') { 531 }else if (field === 'region') {
624 setSheet('区域', this.regionOptions) 532 setSheet('区域', this.regionOptions)
625 } 533 }
@@ -628,13 +536,8 @@ export default { @@ -628,13 +536,8 @@ export default {
628 const field = this.sheet.field 536 const field = this.sheet.field
629 if (!field) return 537 if (!field) return
630 const v = (value === undefined || value === null) ? '' : value 538 const v = (value === undefined || value === null) ? '' : value
631 - if (field === 'historyRemarks') {  
632 - this.defaultRemark = label || ''  
633 - this.form.remarks = v  
634 - }else{  
635 - this.form[field] = v  
636 - this.form[field + 'Name'] = label || ''  
637 - } 539 + this.form[field] = v
  540 + this.form[field + 'Name'] = label || ''
638 }, 541 },
639 openRelate(fieldKey) { 542 openRelate(fieldKey) {
640 let config = {} 543 let config = {}
@@ -139,12 +139,6 @@ @@ -139,12 +139,6 @@
139 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 139 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
140 </template> 140 </template>
141 </uni-list-item> 141 </uni-list-item>
142 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
143 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
144 - <template v-slot:body>  
145 - <view class="item-title"><text>历史备注</text></view>  
146 - </template>  
147 - </uni-list-item>  
148 <uni-list-item title="备注"> 142 <uni-list-item title="备注">
149 <template v-slot:footer> 143 <template v-slot:footer>
150 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 144 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -233,7 +227,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue' @@ -233,7 +227,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue'
233 import RelateSelectSheet from '@/components/relate-select/index.vue' 227 import RelateSelectSheet from '@/components/relate-select/index.vue'
234 import ProductRel from './productRel.vue' 228 import ProductRel from './productRel.vue'
235 import CitySelector from '@/components/city-selector/index.vue' 229 import CitySelector from '@/components/city-selector/index.vue'
236 -import { getRetailCodeApi, createContractApi, getCustomerRemarks, getCustomerSpecificQualityRequirements, getDeptApi, getContractApi } from '@/api/contract' 230 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
237 import { getDicByCodes } from '@/utils/dic' 231 import { getDicByCodes } from '@/utils/dic'
238 import { formatCurrencyToChinese } from '@/utils/common' 232 import { formatCurrencyToChinese } from '@/utils/common'
239 import { workshopQueryApi } from '@/api/devManage' 233 import { workshopQueryApi } from '@/api/devManage'
@@ -295,10 +289,7 @@ export default { @@ -295,10 +289,7 @@ export default {
295 totalAmountIncludingTax: 0, 289 totalAmountIncludingTax: 0,
296 productLineList: [], 290 productLineList: [],
297 productList: [], 291 productList: [],
298 - customerRemarks: [],  
299 - defaultRemark: '',  
300 regionOptions: [], 292 regionOptions: [],
301 - qualityReqSeq: 0,  
302 } 293 }
303 }, 294 },
304 onLoad(query) { 295 onLoad(query) {
@@ -324,45 +315,6 @@ export default { @@ -324,45 +315,6 @@ export default {
324 }) 315 })
325 }, 316 },
326 watch: { 317 watch: {
327 - 'form.buyer': {  
328 - handler(newVal, oldVal) {  
329 - if (newVal) {  
330 - getCustomerRemarks(newVal).then(res => {  
331 - const remarksData = res.data || [];  
332 - this.customerRemarks = remarksData.map((item, index) => ({  
333 - label: `客户备注${index + 1}`,  
334 - value: item,  
335 - }));  
336 - if (remarksData.length > 0) {  
337 - this.defaultRemark = this.customerRemarks[0].label || '';  
338 - this.form.remarks = remarksData[0];  
339 - } else {  
340 - this.form.remarks = '';  
341 - this.defaultRemark = '';  
342 - }  
343 - })  
344 - this.getHistory()  
345 - }  
346 - }  
347 - },  
348 - productLineList: {  
349 - deep: true,  
350 - handler(newVal, oldVal) {  
351 - const n = Array.isArray(newVal) ? newVal : []  
352 - const o = Array.isArray(oldVal) ? oldVal : []  
353 - const changed = []  
354 - for (let i = 0; i < n.length; i++) {  
355 - const ni = n[i] && n[i].productId  
356 - const oi = o[i] && o[i].productId  
357 - if (ni !== oi && ni !== undefined) changed.push(ni)  
358 - }  
359 - console.log('changed', changed)  
360 - if (changed.length && this.form.buyer) {  
361 - const id = changed.join('')  
362 - this.fetchCustomerQualityRequirements(id)  
363 - }  
364 - }  
365 - },  
366 }, 318 },
367 methods: { 319 methods: {
368 async loadCopyDetail(id) { 320 async loadCopyDetail(id) {
@@ -460,49 +412,6 @@ export default { @@ -460,49 +412,6 @@ export default {
460 } 412 }
461 }) 413 })
462 }, 414 },
463 - getHistory() {  
464 - console.log('this.productLineList', this.productLineList[0].productId)  
465 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
466 - return;  
467 - }  
468 - const id = this.productLineList.map(it => it.productId).join('')  
469 - this.fetchCustomerQualityRequirements(id)  
470 - },  
471 - async fetchCustomerQualityRequirements(id) {  
472 - if (!this.form.buyer || !id) {  
473 - return;  
474 - }  
475 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
476 - const seq = this.qualityReqSeq  
477 - try {  
478 - const result = await getCustomerSpecificQualityRequirements({  
479 - customerId: this.form.buyer,  
480 - productIdList:id,  
481 - });  
482 - if (seq !== this.qualityReqSeq) return  
483 - this.updateFormData(result.data || {});  
484 - } catch (error) {  
485 - if (seq !== this.qualityReqSeq) return  
486 - console.error('获取客户质量要求失败:', error);  
487 - // 可以根据需要添加错误提示逻辑  
488 - this.$message.error('获取历史数据失败,请稍后重试');  
489 - }  
490 - },  
491 - // 提取公共的字段更新方法  
492 - updateFormData(result) {  
493 - console.log('result', result)  
494 - const fields = [  
495 - 'component',  
496 - 'packaging',  
497 - 'performance',  
498 - 'pieceWeightHead',  
499 - 'surface',  
500 - 'tolerance',  
501 - ];  
502 - fields.forEach((field) => {  
503 - this.form[field] = result[field] != null ? String(result[field]) : ''  
504 - });  
505 - },  
506 onProductsChange(products) { 415 onProductsChange(products) {
507 const list = Array.isArray(products) ? products : [] 416 const list = Array.isArray(products) ? products : []
508 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) 417 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0)
@@ -594,8 +503,6 @@ export default { @@ -594,8 +503,6 @@ export default {
594 setSheet('单价中是否已包含包装费', this.yesNoList) 503 setSheet('单价中是否已包含包装费', this.yesNoList)
595 } else if (field === 'includesTransportFee') { 504 } else if (field === 'includesTransportFee') {
596 setSheet('单价中是否已包含运费', this.yesNoList) 505 setSheet('单价中是否已包含运费', this.yesNoList)
597 - } else if (field === 'historyRemarks') {  
598 - setSheet('历史备注', this.customerRemarks)  
599 }else if (field === 'region') { 506 }else if (field === 'region') {
600 setSheet('区域', this.regionOptions) 507 setSheet('区域', this.regionOptions)
601 } 508 }
@@ -604,13 +511,8 @@ export default { @@ -604,13 +511,8 @@ export default {
604 const field = this.sheet.field 511 const field = this.sheet.field
605 if (!field) return 512 if (!field) return
606 const v = (value === undefined || value === null) ? '' : value 513 const v = (value === undefined || value === null) ? '' : value
607 - if (field === 'historyRemarks') {  
608 - this.defaultRemark = label || ''  
609 - this.form.remarks = v  
610 - }else{  
611 - this.form[field] = v  
612 - this.form[field + 'Name'] = label || ''  
613 - } 514 + this.form[field] = v
  515 + this.form[field + 'Name'] = label || ''
614 }, 516 },
615 openRelate(fieldKey) { 517 openRelate(fieldKey) {
616 let config = {} 518 let config = {}
@@ -137,12 +137,6 @@ @@ -137,12 +137,6 @@
137 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 137 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
138 </template> 138 </template>
139 </uni-list-item> 139 </uni-list-item>
140 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
141 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
142 - <template v-slot:body>  
143 - <view class="item-title"><text>历史备注</text></view>  
144 - </template>  
145 - </uni-list-item>  
146 <uni-list-item title="备注"> 140 <uni-list-item title="备注">
147 <template v-slot:footer> 141 <template v-slot:footer>
148 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 142 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -231,7 +225,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue' @@ -231,7 +225,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue'
231 import RelateSelectSheet from '@/components/relate-select/index.vue' 225 import RelateSelectSheet from '@/components/relate-select/index.vue'
232 import ProductRel from './productRel.vue' 226 import ProductRel from './productRel.vue'
233 import CitySelector from '@/components/city-selector/index.vue' 227 import CitySelector from '@/components/city-selector/index.vue'
234 -import { getRetailCodeApi, createContractApi,getCustomerRemarks,getCustomerSpecificQualityRequirements, getDeptApi,getContractApi } from '@/api/contract' 228 +import { getRetailCodeApi, createContractApi, getDeptApi,getContractApi } from '@/api/contract'
235 import { getDicByCodes } from '@/utils/dic' 229 import { getDicByCodes } from '@/utils/dic'
236 import { formatCurrencyToChinese } from '@/utils/common' 230 import { formatCurrencyToChinese } from '@/utils/common'
237 import { workshopQueryApi } from '@/api/devManage' 231 import { workshopQueryApi } from '@/api/devManage'
@@ -293,10 +287,7 @@ export default { @@ -293,10 +287,7 @@ export default {
293 totalAmountIncludingTax: 0, 287 totalAmountIncludingTax: 0,
294 productLineList: [], 288 productLineList: [],
295 productList: [], 289 productList: [],
296 - customerRemarks: [],  
297 - defaultRemark: '',  
298 regionOptions: [], 290 regionOptions: [],
299 - qualityReqSeq: 0,  
300 } 291 }
301 }, 292 },
302 onLoad(query) { 293 onLoad(query) {
@@ -322,44 +313,6 @@ export default { @@ -322,44 +313,6 @@ export default {
322 }) 313 })
323 }, 314 },
324 watch: { 315 watch: {
325 - 'form.buyer': {  
326 - handler(newVal, oldVal) {  
327 - if (newVal) {  
328 - getCustomerRemarks(newVal).then(res => {  
329 - const remarksData = res.data || [];  
330 - this.customerRemarks = remarksData.map((item, index) => ({  
331 - label: `客户备注${index + 1}`,  
332 - value: item,  
333 - }));  
334 - if (remarksData.length > 0) {  
335 - this.defaultRemark = this.customerRemarks[0].label || '';  
336 - this.form.remarks = remarksData[0];  
337 - } else {  
338 - this.form.remarks = '';  
339 - this.defaultRemark = '';  
340 - }  
341 - })  
342 - this.getHistory()  
343 - }  
344 - }  
345 - },  
346 - productLineList: {  
347 - deep: true,  
348 - handler(newVal, oldVal) {  
349 - const n = Array.isArray(newVal) ? newVal : []  
350 - const o = Array.isArray(oldVal) ? oldVal : []  
351 - const changed = []  
352 - for (let i = 0; i < n.length; i++) {  
353 - const ni = n[i] && n[i].productId  
354 - const oi = o[i] && o[i].productId  
355 - if (ni !== oi && ni !== undefined) changed.push(ni)  
356 - }  
357 - if (changed.length && this.form.buyer) {  
358 - const id = changed.join('')  
359 - this.fetchCustomerQualityRequirements(id)  
360 - }  
361 - }  
362 - },  
363 }, 316 },
364 methods: { 317 methods: {
365 async loadCopyDetail(id) { 318 async loadCopyDetail(id) {
@@ -457,49 +410,6 @@ export default { @@ -457,49 +410,6 @@ export default {
457 } 410 }
458 }) 411 })
459 }, 412 },
460 - getHistory() {  
461 - console.log('this.productLineList', this.productLineList[0].productId)  
462 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
463 - return;  
464 - }  
465 - const id = this.productLineList.map(it => it.productId).join('')  
466 - this.fetchCustomerQualityRequirements(id)  
467 - },  
468 - async fetchCustomerQualityRequirements(id) {  
469 - if (!this.form.buyer || !id) {  
470 - return;  
471 - }  
472 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
473 - const seq = this.qualityReqSeq  
474 - try {  
475 - const result = await getCustomerSpecificQualityRequirements({  
476 - customerId: this.form.buyer,  
477 - productIdList:id,  
478 - });  
479 - if (seq !== this.qualityReqSeq) return  
480 - this.updateFormData(result.data || {});  
481 - } catch (error) {  
482 - if (seq !== this.qualityReqSeq) return  
483 - console.error('获取客户质量要求失败:', error);  
484 - // 可以根据需要添加错误提示逻辑  
485 - this.$message.error('获取历史数据失败,请稍后重试');  
486 - }  
487 - },  
488 - // 提取公共的字段更新方法  
489 - updateFormData(result) {  
490 - console.log('result', result)  
491 - const fields = [  
492 - 'component',  
493 - 'packaging',  
494 - 'performance',  
495 - 'pieceWeightHead',  
496 - 'surface',  
497 - 'tolerance',  
498 - ];  
499 - fields.forEach((field) => {  
500 - this.form[field] = result[field] != null ? String(result[field]) : ''  
501 - });  
502 - },  
503 onProductsChange(products) { 413 onProductsChange(products) {
504 const list = Array.isArray(products) ? products : [] 414 const list = Array.isArray(products) ? products : []
505 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) 415 const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0)
@@ -591,8 +501,6 @@ export default { @@ -591,8 +501,6 @@ export default {
591 setSheet('单价中是否已包含包装费', this.yesNoList) 501 setSheet('单价中是否已包含包装费', this.yesNoList)
592 } else if (field === 'includesTransportFee') { 502 } else if (field === 'includesTransportFee') {
593 setSheet('单价中是否已包含运费', this.yesNoList) 503 setSheet('单价中是否已包含运费', this.yesNoList)
594 - } else if (field === 'historyRemarks') {  
595 - setSheet('历史备注', this.customerRemarks)  
596 } else if (field === 'region') { 504 } else if (field === 'region') {
597 setSheet('区域', this.regionOptions) 505 setSheet('区域', this.regionOptions)
598 } 506 }
@@ -601,13 +509,8 @@ export default { @@ -601,13 +509,8 @@ export default {
601 const field = this.sheet.field 509 const field = this.sheet.field
602 if (!field) return 510 if (!field) return
603 const v = (value === undefined || value === null) ? '' : value 511 const v = (value === undefined || value === null) ? '' : value
604 - if (field === 'historyRemarks') {  
605 - this.defaultRemark = label || ''  
606 - this.form.remarks = v  
607 - }else{  
608 - this.form[field] = v  
609 - this.form[field + 'Name'] = label || ''  
610 - } 512 + this.form[field] = v
  513 + this.form[field + 'Name'] = label || ''
611 }, 514 },
612 openRelate(fieldKey) { 515 openRelate(fieldKey) {
613 let config = {} 516 let config = {}
@@ -139,12 +139,6 @@ @@ -139,12 +139,6 @@
139 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> 139 <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" />
140 </template> 140 </template>
141 </uni-list-item> 141 </uni-list-item>
142 - <uni-list-item v-if="this.customerRemarks.length" class="select-item" :class="defaultRemark ? 'is-filled' : 'is-empty'" clickable  
143 - @click="openSheet('historyRemarks')" :rightText="defaultRemark || '请选择'" showArrow>  
144 - <template v-slot:body>  
145 - <view class="item-title"><text>历史备注</text></view>  
146 - </template>  
147 - </uni-list-item>  
148 <uni-list-item title="备注"> 142 <uni-list-item title="备注">
149 <template v-slot:footer> 143 <template v-slot:footer>
150 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" /> 144 <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
@@ -233,7 +227,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue' @@ -233,7 +227,7 @@ import SingleSelectSheet from '@/components/single-select/index.vue'
233 import RelateSelectSheet from '@/components/relate-select/index.vue' 227 import RelateSelectSheet from '@/components/relate-select/index.vue'
234 import ProductRel from './productRel.vue' 228 import ProductRel from './productRel.vue'
235 import CitySelector from '@/components/city-selector/index.vue' 229 import CitySelector from '@/components/city-selector/index.vue'
236 -import { getRetailCodeApi, createContractApi, getCustomerRemarks, getCustomerSpecificQualityRequirements, getDeptApi, getContractApi } from '@/api/contract' 230 +import { getRetailCodeApi, createContractApi, getDeptApi, getContractApi } from '@/api/contract'
237 import { getDicByCodes } from '@/utils/dic' 231 import { getDicByCodes } from '@/utils/dic'
238 import { formatCurrencyToChinese } from '@/utils/common' 232 import { formatCurrencyToChinese } from '@/utils/common'
239 import { workshopQueryApi } from '@/api/devManage' 233 import { workshopQueryApi } from '@/api/devManage'
@@ -295,10 +289,7 @@ export default { @@ -295,10 +289,7 @@ export default {
295 totalAmountIncludingTax: 0, 289 totalAmountIncludingTax: 0,
296 productLineList: [], 290 productLineList: [],
297 productList: [], 291 productList: [],
298 - customerRemarks: [],  
299 - defaultRemark: '',  
300 regionOptions: [], 292 regionOptions: [],
301 - qualityReqSeq: 0,  
302 } 293 }
303 }, 294 },
304 onLoad(query) { 295 onLoad(query) {
@@ -324,46 +315,6 @@ export default { @@ -324,46 +315,6 @@ export default {
324 }) 315 })
325 }, 316 },
326 watch: { 317 watch: {
327 - 'form.buyer': {  
328 - handler(newVal, oldVal) {  
329 - if (newVal) {  
330 - getCustomerRemarks(newVal).then(res => {  
331 - const remarksData = res.data || [];  
332 - this.customerRemarks = remarksData.map((item, index) => ({  
333 - label: `客户备注${index + 1}`,  
334 - value: item,  
335 - }));  
336 - if (remarksData.length > 0) {  
337 - this.defaultRemark = this.customerRemarks[0].label || '';  
338 - this.form.remarks = remarksData[0];  
339 - } else {  
340 - this.form.remarks = '';  
341 - this.defaultRemark = '';  
342 - }  
343 - })  
344 - this.getHistory()  
345 - }  
346 - }  
347 - },  
348 - productLineList: {  
349 - deep: true,  
350 - handler(newVal, oldVal) {  
351 - console.log('newVal', newVal)  
352 - console.log('oldVal', oldVal)  
353 - const n = Array.isArray(newVal) ? newVal : []  
354 - const o = Array.isArray(oldVal) ? oldVal : []  
355 - const changed = []  
356 - for (let i = 0; i < n.length; i++) {  
357 - const ni = n[i] && n[i].productId  
358 - const oi = o[i] && o[i].productId  
359 - if (ni !== oi && ni !== undefined) changed.push(ni)  
360 - }  
361 - if (changed.length && this.form.buyer) {  
362 - const id = changed.join('')  
363 - this.fetchCustomerQualityRequirements(id)  
364 - }  
365 - }  
366 - },  
367 }, 318 },
368 methods: { 319 methods: {
369 async loadCopyDetail(id) { 320 async loadCopyDetail(id) {
@@ -461,49 +412,6 @@ export default { @@ -461,49 +412,6 @@ export default {
461 } 412 }
462 }) 413 })
463 }, 414 },
464 - getHistory() {  
465 - console.log('this.productLineList', this.productLineList[0].productId)  
466 - if (!this.productLineList.length || !this.productLineList[0].productId) {  
467 - return;  
468 - }  
469 - const id = this.productLineList.map(it => it.productId).join('')  
470 - this.fetchCustomerQualityRequirements(id)  
471 - },  
472 - async fetchCustomerQualityRequirements(id) {  
473 - if (!this.form.buyer || !id) {  
474 - return;  
475 - }  
476 - this.qualityReqSeq = (Number(this.qualityReqSeq) || 0) + 1  
477 - const seq = this.qualityReqSeq  
478 - try {  
479 - const result = await getCustomerSpecificQualityRequirements({  
480 - customerId: this.form.buyer,  
481 - productIdList:id,  
482 - });  
483 - if (seq !== this.qualityReqSeq) return  
484 - this.updateFormData(result.data || {});  
485 - } catch (error) {  
486 - if (seq !== this.qualityReqSeq) return  
487 - console.error('获取客户质量要求失败:', error);  
488 - // 可以根据需要添加错误提示逻辑  
489 - this.$message.error('获取历史数据失败,请稍后重试');  
490 - }  
491 - },  
492 - // 提取公共的字段更新方法  
493 - updateFormData(result) {  
494 - console.log('result', result)  
495 - const fields = [  
496 - 'component',  
497 - 'packaging',  
498 - 'performance',  
499 - 'pieceWeightHead',  
500 - 'surface',  
501 - 'tolerance',  
502 - ];  
503 - fields.forEach((field) => {  
504 - this.form[field] = result[field] != null ? String(result[field]) : ''  
505 - });  
506 - },  
507 onProductsChange(products) { 415 onProductsChange(products) {
508 console.log('products', products) 416 console.log('products', products)
509 const list = Array.isArray(products) ? products : [] 417 const list = Array.isArray(products) ? products : []
@@ -596,8 +504,6 @@ export default { @@ -596,8 +504,6 @@ export default {
596 setSheet('单价中是否已包含包装费', this.yesNoList) 504 setSheet('单价中是否已包含包装费', this.yesNoList)
597 } else if (field === 'includesTransportFee') { 505 } else if (field === 'includesTransportFee') {
598 setSheet('单价中是否已包含运费', this.yesNoList) 506 setSheet('单价中是否已包含运费', this.yesNoList)
599 - } else if (field === 'historyRemarks') {  
600 - setSheet('历史备注', this.customerRemarks)  
601 } else if (field === 'region') { 507 } else if (field === 'region') {
602 setSheet('区域', this.regionOptions) 508 setSheet('区域', this.regionOptions)
603 } 509 }
@@ -606,13 +512,8 @@ export default { @@ -606,13 +512,8 @@ export default {
606 const field = this.sheet.field 512 const field = this.sheet.field
607 if (!field) return 513 if (!field) return
608 const v = (value === undefined || value === null) ? '' : value 514 const v = (value === undefined || value === null) ? '' : value
609 - if (field === 'historyRemarks') {  
610 - this.defaultRemark = label || ''  
611 - this.form.remarks = v  
612 - }else{  
613 - this.form[field] = v  
614 - this.form[field + 'Name'] = label || ''  
615 - } 515 + this.form[field] = v
  516 + this.form[field + 'Name'] = label || ''
616 }, 517 },
617 openRelate(fieldKey) { 518 openRelate(fieldKey) {
618 let config = {} 519 let config = {}
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view> 25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view> 26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
27 - <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 27 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view> 30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
@@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
47 :list="lineListWithName" 47 :list="lineListWithName"
48 :product-options="productOptions" 48 :product-options="productOptions"
49 :workshop-options="workshopOptions" 49 :workshop-options="workshopOptions"
  50 + @invoice-name-change="handleInvoiceNameChange"
50 /> 51 />
51 52
52 <view class="title-header"> 53 <view class="title-header">
@@ -241,6 +242,9 @@ export default { @@ -241,6 +242,9 @@ export default {
241 this.loadDetail() 242 this.loadDetail()
242 }, 243 },
243 methods: { 244 methods: {
  245 + handleInvoiceNameChange(name) {
  246 + this.form.invoiceProductName = name
  247 + },
244 hasPerm(code) { 248 hasPerm(code) {
245 try { 249 try {
246 return !!(this.$auth && this.$auth.hasPermi && this.$auth.hasPermi(code)) 250 return !!(this.$auth && this.$auth.hasPermi && this.$auth.hasPermi(code))
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 23 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
24 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view> 24 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
25 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view> 25 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
26 - <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 26 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
27 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 27 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
28 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 28 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
29 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view> 29 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
46 :list="lineListWithName" 46 :list="lineListWithName"
47 :product-options="productOptions" 47 :product-options="productOptions"
48 :workshop-options="workshopOptions" 48 :workshop-options="workshopOptions"
  49 + @invoice-name-change="handleInvoiceNameChange"
49 /> 50 />
50 51
51 <view class="title-header"> 52 <view class="title-header">
@@ -161,6 +162,9 @@ export default { @@ -161,6 +162,9 @@ export default {
161 } 162 }
162 }, 163 },
163 methods: { 164 methods: {
  165 + handleInvoiceNameChange(name) {
  166 + this.form.invoiceProductName = name
  167 + },
164 async loadDictData() { 168 async loadDictData() {
165 var self = this 169 var self = this
166 var codes = [].concat( 170 var codes = [].concat(
@@ -35,6 +35,12 @@ @@ -35,6 +35,12 @@
35 <text v-else class="lock-value">{{ safeText(item.materialType) }}</text> 35 <text v-else class="lock-value">{{ safeText(item.materialType) }}</text>
36 </template> 36 </template>
37 </uni-list-item> 37 </uni-list-item>
  38 + <uni-list-item title="开票品名">
  39 + <template v-slot:footer>
  40 + <!-- <uni-easyinput v-if="!isSelectWorkshop && !isSupplement" v-model="item.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" /> -->
  41 + <text class="lock-value">{{ safeText(item.invoiceProductName) }}</text>
  42 + </template>
  43 + </uni-list-item>
38 <uni-list-item title="数量(吨)"> 44 <uni-list-item title="数量(吨)">
39 <template v-slot:footer> 45 <template v-slot:footer>
40 <template v-if="!isSelectWorkshop && !isSupplement"> 46 <template v-if="!isSelectWorkshop && !isSupplement">
@@ -160,6 +166,7 @@ @@ -160,6 +166,7 @@
160 <view v-for="(item, idx) in items" :key="'v-' + (item._key || item.itemId || idx)" class="card"> 166 <view v-for="(item, idx) in items" :key="'v-' + (item._key || item.itemId || idx)" class="card">
161 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(item.productName || item.productId) }}</text></view> 167 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(item.productName || item.productId) }}</text></view>
162 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(item.materialType) }}</text></view> 168 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(item.materialType) }}</text></view>
  169 + <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(item.invoiceProductName) }}</text></view>
163 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(item.quantity) }}</text></view> 170 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(item.quantity) }}</text></view>
164 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(item.actualPurchasePrice) }}</text></view> 171 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(item.actualPurchasePrice) }}</text></view>
165 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(item.includingShippingPrice) }}</text></view> 172 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(item.includingShippingPrice) }}</text></view>
@@ -228,7 +235,10 @@ export default { @@ -228,7 +235,10 @@ export default {
228 }, 235 },
229 watch: { 236 watch: {
230 items: { 237 items: {
231 - handler() { this.emitChange() }, 238 + handler() {
  239 + this.emitChange();
  240 + this.$emit('invoice-name-change', this.getSummaryInvoiceProductName());
  241 + },
232 deep: true 242 deep: true
233 }, 243 },
234 list: { 244 list: {
@@ -287,11 +297,19 @@ export default { @@ -287,11 +297,19 @@ export default {
287 newKey() { 297 newKey() {
288 return Date.now() + '-' + Math.random().toString(16).slice(2) 298 return Date.now() + '-' + Math.random().toString(16).slice(2)
289 }, 299 },
  300 + getSummaryInvoiceProductName() {
  301 + const list = Array.isArray(this.items) ? this.items : [];
  302 + const names = list
  303 + .map((item) => item.invoiceProductName)
  304 + .filter((name) => !!name && name.trim() !== '');
  305 + return [...new Set(names.map((n) => n.trim()))].join('、');
  306 + },
290 defaultItem() { 307 defaultItem() {
291 return { 308 return {
292 productId: '', 309 productId: '',
293 productName: '', 310 productName: '',
294 materialType: '', 311 materialType: '',
  312 + invoiceProductName: '',
295 quantity: '', 313 quantity: '',
296 actualPurchasePrice: '', 314 actualPurchasePrice: '',
297 includingShippingPrice: '', 315 includingShippingPrice: '',
@@ -224,6 +224,7 @@ @@ -224,6 +224,7 @@
224 :product-options="productOptions" 224 :product-options="productOptions"
225 :workshop-options="workshopOptions" 225 :workshop-options="workshopOptions"
226 @change="onLineChange" 226 @change="onLineChange"
  227 + @invoice-name-change="handleInvoiceNameChange"
227 /> 228 />
228 </uni-list> 229 </uni-list>
229 230
@@ -389,6 +390,9 @@ export default { @@ -389,6 +390,9 @@ export default {
389 } 390 }
390 }, 391 },
391 methods: { 392 methods: {
  393 + handleInvoiceNameChange(name) {
  394 + this.form.invoiceProductName = name
  395 + },
392 toNumber(v) { 396 toNumber(v) {
393 if (v == null || v === '') return 0 397 if (v == null || v === '') return 0
394 var n = Number(v) 398 var n = Number(v)
@@ -673,6 +677,7 @@ export default { @@ -673,6 +677,7 @@ export default {
673 procurementPlanId: (r.procurementPlanId != null ? r.procurementPlanId : (self.id || d.id || '')), 677 procurementPlanId: (r.procurementPlanId != null ? r.procurementPlanId : (self.id || d.id || '')),
674 productId: self.pickId(r.productId), 678 productId: self.pickId(r.productId),
675 materialType: r.materialType != null ? String(r.materialType) : '', 679 materialType: r.materialType != null ? String(r.materialType) : '',
  680 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
676 quantity: self.toNumber(r.quantity), 681 quantity: self.toNumber(r.quantity),
677 actualPurchasePrice: self.toNumber(r.actualPurchasePrice), 682 actualPurchasePrice: self.toNumber(r.actualPurchasePrice),
678 includingShippingPrice: self.toNumber(r.includingShippingPrice), 683 includingShippingPrice: self.toNumber(r.includingShippingPrice),
@@ -174,7 +174,7 @@ @@ -174,7 +174,7 @@
174 </template> 174 </template>
175 </uni-list-item> 175 </uni-list-item>
176 176
177 - <uni-list-item title="开票品名"> 177 + <uni-list-item title="开票品名(汇总)">
178 <template v-slot:footer> 178 <template v-slot:footer>
179 <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" disabled placeholder="-" /> 179 <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" disabled placeholder="-" />
180 </template> 180 </template>
@@ -236,6 +236,7 @@ @@ -236,6 +236,7 @@
236 :product-options="productOptions" 236 :product-options="productOptions"
237 :workshop-options="workshopOptions" 237 :workshop-options="workshopOptions"
238 @change="onLineChange" 238 @change="onLineChange"
  239 + @invoice-name-change="handleInvoiceNameChange"
239 /> 240 />
240 </uni-list> 241 </uni-list>
241 242
@@ -428,6 +429,9 @@ export default { @@ -428,6 +429,9 @@ export default {
428 } 429 }
429 }, 430 },
430 methods: { 431 methods: {
  432 + handleInvoiceNameChange(name) {
  433 + this.form.invoiceProductName = name
  434 + },
431 toNumber(v) { 435 toNumber(v) {
432 if (v == null || v === '') return 0 436 if (v == null || v === '') return 0
433 var n = Number(v) 437 var n = Number(v)
@@ -890,6 +894,7 @@ export default { @@ -890,6 +894,7 @@ export default {
890 procurementPlanId: (r.procurementPlanId != null ? r.procurementPlanId : (self.form.id || d.id || '')), 894 procurementPlanId: (r.procurementPlanId != null ? r.procurementPlanId : (self.form.id || d.id || '')),
891 productId: self.pickId(r.productId), 895 productId: self.pickId(r.productId),
892 materialType: r.materialType != null ? String(r.materialType) : '', 896 materialType: r.materialType != null ? String(r.materialType) : '',
  897 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
893 quantity: self.toNumber(r.quantity), 898 quantity: self.toNumber(r.quantity),
894 actualPurchasePrice: self.toNumber(r.actualPurchasePrice), 899 actualPurchasePrice: self.toNumber(r.actualPurchasePrice),
895 includingShippingPrice: self.toNumber(r.includingShippingPrice), 900 includingShippingPrice: self.toNumber(r.includingShippingPrice),
@@ -428,6 +428,7 @@ export default { @@ -428,6 +428,7 @@ export default {
428 includingShippingPrice: includingShippingPrice, 428 includingShippingPrice: includingShippingPrice,
429 priceListPrices: priceListPrices, 429 priceListPrices: priceListPrices,
430 coordinationRange: coordinationRange, 430 coordinationRange: coordinationRange,
  431 + invoiceProductName: self.pickValue(row, ['invoiceProductName'], ''),
431 buyoutPrice: buyoutPrice, 432 buyoutPrice: buyoutPrice,
432 estimatedLoss: estimatedLoss, 433 estimatedLoss: estimatedLoss,
433 applicationAttrition: applicationAttrition, 434 applicationAttrition: applicationAttrition,
@@ -152,12 +152,9 @@ @@ -152,12 +152,9 @@
152 </uni-list-item> 152 </uni-list-item>
153 153
154 <!-- 开票品种 --> 154 <!-- 开票品种 -->
155 - <uni-list-item>  
156 - <template v-slot:body>  
157 - <view class="item-title"><text class="required">*</text><text>开票品种</text></view>  
158 - </template> 155 + <uni-list-item title="开票品名(汇总)">
159 <template v-slot:footer> 156 <template v-slot:footer>
160 - <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" placeholder="请输入开票品种" /> 157 + <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" disabled />
161 </template> 158 </template>
162 </uni-list-item> 159 </uni-list-item>
163 160
@@ -206,7 +203,7 @@ @@ -206,7 +203,7 @@
206 </uni-list-item> 203 </uni-list-item>
207 204
208 <!-- 明细信息 --> 205 <!-- 明细信息 -->
209 - <ProductRel ref="productRel" mode="add" :options="productList" :priced="form.priced" @change="onProductsChange" /> 206 + <ProductRel ref="productRel" mode="add" :options="productList" :priced="form.priced" @change="onProductsChange" @invoice-name-change="onInvoiceNameChange" />
210 </uni-list> 207 </uni-list>
211 208
212 <!-- 料质状况模块(明细下方) --> 209 <!-- 料质状况模块(明细下方) -->
@@ -354,6 +351,9 @@ export default { @@ -354,6 +351,9 @@ export default {
354 this.loadDictData() 351 this.loadDictData()
355 }, 352 },
356 methods: { 353 methods: {
  354 + onInvoiceNameChange(name) {
  355 + this.form.invoiceProductName = name
  356 + },
357 async loadDictData() { 357 async loadDictData() {
358 try { 358 try {
359 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD'] 359 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD']
@@ -152,12 +152,9 @@ @@ -152,12 +152,9 @@
152 </uni-list-item> 152 </uni-list-item>
153 153
154 <!-- 开票品种 --> 154 <!-- 开票品种 -->
155 - <uni-list-item>  
156 - <template v-slot:body>  
157 - <view class="item-title"><text class="required">*</text><text>开票品种</text></view>  
158 - </template> 155 + <uni-list-item title="开票品名(汇总)">
159 <template v-slot:footer> 156 <template v-slot:footer>
160 - <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" placeholder="请输入开票品种" /> 157 + <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" disabled />
161 </template> 158 </template>
162 </uni-list-item> 159 </uni-list-item>
163 160
@@ -206,7 +203,7 @@ @@ -206,7 +203,7 @@
206 </uni-list-item> 203 </uni-list-item>
207 204
208 <!-- 明细信息 --> 205 <!-- 明细信息 -->
209 - <ProductRel ref="productRel" mode="add" :options="productList" :priced="form.priced" :list="productLineList" @change="onProductsChange" /> 206 + <ProductRel ref="productRel" mode="add" :options="productList" :priced="form.priced" :list="productLineList" @change="onProductsChange" @invoice-name-change="onInvoiceNameChange"/>
210 </uni-list> 207 </uni-list>
211 208
212 <!-- 料质状况模块(明细下方) --> 209 <!-- 料质状况模块(明细下方) -->
@@ -355,6 +352,9 @@ export default { @@ -355,6 +352,9 @@ export default {
355 this.initCode() 352 this.initCode()
356 }, 353 },
357 methods: { 354 methods: {
  355 + onInvoiceNameChange(name) {
  356 + this.form.invoiceProductName = name
  357 + },
358 async loadDictData() { 358 async loadDictData() {
359 try { 359 try {
360 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD'] 360 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD']
@@ -522,7 +522,6 @@ export default { @@ -522,7 +522,6 @@ export default {
522 { key: 'supplierId', msg: '请选择供应商' }, 522 { key: 'supplierId', msg: '请选择供应商' },
523 { key: 'validityPeriod', msg: '请输入报价时效' }, 523 { key: 'validityPeriod', msg: '请输入报价时效' },
524 { key: 'deliveryMode', msg: '请选择交提货方式' }, 524 { key: 'deliveryMode', msg: '请选择交提货方式' },
525 - { key: 'invoiceProductName', msg: '请输入开票品种' },  
526 { key: 'deliveryDate', msg: '请选择交货日期' }, 525 { key: 'deliveryDate', msg: '请选择交货日期' },
527 { key: 'settlementMethod', msg: '请输入结算方式' }, 526 { key: 'settlementMethod', msg: '请输入结算方式' },
528 { key: 'settlementRatio', msg: '请输入结算比例' } 527 { key: 'settlementRatio', msg: '请输入结算比例' }
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <view class="row"><text class="label">是否数量买断</text><text class="value">{{ boolText(form.quantityBuyout) }}</text></view> 22 <view class="row"><text class="label">是否数量买断</text><text class="value">{{ boolText(form.quantityBuyout) }}</text></view>
23 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 23 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
24 <view class="row"><text class="label">装车费</text><text class="value">{{ safeText(form.loadingFee) }}</text></view> 24 <view class="row"><text class="label">装车费</text><text class="value">{{ safeText(form.loadingFee) }}</text></view>
25 - <view class="row"><text class="label">开票品种</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 25 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
26 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 26 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
27 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 27 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
28 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ safeText(form.settlementRatio) }}</text></view> 28 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ safeText(form.settlementRatio) }}</text></view>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </view> 31 </view>
32 32
33 <!-- 明细信息 --> 33 <!-- 明细信息 -->
34 - <ProductRel mode="view" :list="productLineList" /> 34 + <ProductRel mode="view" :list="productLineList" @invoiceNameChange="onInvoiceNameChange" />
35 35
36 <!-- 料质状况 --> 36 <!-- 料质状况 -->
37 <view class="title-header"> 37 <view class="title-header">
@@ -127,6 +127,9 @@ export default { @@ -127,6 +127,9 @@ export default {
127 this.getUserInfo(); 127 this.getUserInfo();
128 }, 128 },
129 methods: { 129 methods: {
  130 + onInvoiceNameChange(name) {
  131 + this.form.invoiceProductName = name
  132 + },
130 // 获取当前用户信息 133 // 获取当前用户信息
131 async getUserInfo() { 134 async getUserInfo() {
132 getInfo() 135 getInfo()
@@ -151,12 +151,9 @@ @@ -151,12 +151,9 @@
151 </uni-list-item> 151 </uni-list-item>
152 152
153 <!-- 开票品种 --> 153 <!-- 开票品种 -->
154 - <uni-list-item>  
155 - <template v-slot:body>  
156 - <view class="item-title"><text class="required">*</text><text>开票品种</text></view>  
157 - </template> 154 + <uni-list-item title="开票品名(汇总)">
158 <template v-slot:footer> 155 <template v-slot:footer>
159 - <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" placeholder="请输入开票品种" /> 156 + <uni-easyinput v-model="form.invoiceProductName" :inputBorder="false" disabled />
160 </template> 157 </template>
161 </uni-list-item> 158 </uni-list-item>
162 159
@@ -205,7 +202,7 @@ @@ -205,7 +202,7 @@
205 </uni-list-item> 202 </uni-list-item>
206 203
207 <!-- 明细信息 --> 204 <!-- 明细信息 -->
208 - <ProductRel ref="productRel" mode="edit" :options="productList" :priced="form.priced" :list="productLineList" @change="onProductsChange" /> 205 + <ProductRel ref="productRel" mode="edit" :options="productList" :priced="form.priced" :list="productLineList" @change="onProductsChange" @invoice-name-change="onInvoiceNameChange"/>
209 </uni-list> 206 </uni-list>
210 207
211 <!-- 料质状况模块(明细下方) --> 208 <!-- 料质状况模块(明细下方) -->
@@ -353,6 +350,9 @@ export default { @@ -353,6 +350,9 @@ export default {
353 this.loadDetail() 350 this.loadDetail()
354 }, 351 },
355 methods: { 352 methods: {
  353 + onInvoiceNameChange(name) {
  354 + this.form.invoiceProductName = name
  355 + },
356 async loadDictData() { 356 async loadDictData() {
357 try { 357 try {
358 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD'] 358 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD']
@@ -503,7 +503,6 @@ export default { @@ -503,7 +503,6 @@ export default {
503 { key: 'supplierId', msg: '请选择供应商' }, 503 { key: 'supplierId', msg: '请选择供应商' },
504 { key: 'validityPeriod', msg: '请输入报价时效' }, 504 { key: 'validityPeriod', msg: '请输入报价时效' },
505 { key: 'deliveryMode', msg: '请选择交提货方式' }, 505 { key: 'deliveryMode', msg: '请选择交提货方式' },
506 - { key: 'invoiceProductName', msg: '请输入开票品种' },  
507 { key: 'deliveryDate', msg: '请选择交货日期' }, 506 { key: 'deliveryDate', msg: '请选择交货日期' },
508 { key: 'settlementMethod', msg: '请输入结算方式' }, 507 { key: 'settlementMethod', msg: '请输入结算方式' },
509 { key: 'settlementRatio', msg: '请输入结算比例' } 508 { key: 'settlementRatio', msg: '请输入结算比例' }
@@ -25,6 +25,11 @@ @@ -25,6 +25,11 @@
25 <uni-easyinput v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" /> 25 <uni-easyinput v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" />
26 </template> 26 </template>
27 </uni-list-item> 27 </uni-list-item>
  28 + <uni-list-item title="开票品名">
  29 + <template v-slot:footer>
  30 + <uni-easyinput v-model="item.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" />
  31 + </template>
  32 + </uni-list-item>
28 <uni-list-item title="数量(吨)"> 33 <uni-list-item title="数量(吨)">
29 <template v-slot:footer> 34 <template v-slot:footer>
30 <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 1)" /> 35 <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 1)" />
@@ -74,6 +79,7 @@ @@ -74,6 +79,7 @@
74 <view v-for="(item, idx) in items" :key="'v-' + (item._key || idx)" class="card"> 79 <view v-for="(item, idx) in items" :key="'v-' + (item._key || idx)" class="card">
75 <view class="row"><text class="label">品种</text><text class="value">{{ item.productName }}</text></view> 80 <view class="row"><text class="label">品种</text><text class="value">{{ item.productName }}</text></view>
76 <view class="row"><text class="label">料型</text><text class="value">{{ item.materialType }}</text></view> 81 <view class="row"><text class="label">料型</text><text class="value">{{ item.materialType }}</text></view>
  82 + <view class="row"><text class="label">开票品名</text><text class="value">{{ item.invoiceProductName }}</text></view>
77 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ item.quantity }}</text></view> 83 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ item.quantity }}</text></view>
78 <view class="row"><text class="label">采购价</text><text class="value">{{ item.purchasePrice }}</text></view> 84 <view class="row"><text class="label">采购价</text><text class="value">{{ item.purchasePrice }}</text></view>
79 <view class="row"><text class="label">买断料预计损耗</text><text class="value">{{ item.estimatedLoss }}</text></view> 85 <view class="row"><text class="label">买断料预计损耗</text><text class="value">{{ item.estimatedLoss }}</text></view>
@@ -117,7 +123,10 @@ export default { @@ -117,7 +123,10 @@ export default {
117 }, 123 },
118 watch: { 124 watch: {
119 items: { 125 items: {
120 - handler() { this.emitChange() }, 126 + handler() {
  127 + this.emitChange(),
  128 + this.$emit('invoice-name-change', this.getSummaryInvoiceProductName());
  129 + },
121 deep: true 130 deep: true
122 }, 131 },
123 list: { 132 list: {
@@ -134,6 +143,13 @@ export default { @@ -134,6 +143,13 @@ export default {
134 this.$nextTick(() => { this._initialized = true }) 143 this.$nextTick(() => { this._initialized = true })
135 }, 144 },
136 methods: { 145 methods: {
  146 + getSummaryInvoiceProductName() {
  147 + const list = Array.isArray(this.items) ? this.items : [];
  148 + const names = list
  149 + .map((item) => item.invoiceProductName)
  150 + .filter((name) => !!name && name.trim() !== '');
  151 + return [...new Set(names.map((n) => n.trim()))].join('、');
  152 + },
137 initItems() { 153 initItems() {
138 const src = Array.isArray(this.list) && this.list.length > 0 ? this.list : [] 154 const src = Array.isArray(this.list) && this.list.length > 0 ? this.list : []
139 if (!src.length) { 155 if (!src.length) {
@@ -165,6 +181,7 @@ export default { @@ -165,6 +181,7 @@ export default {
165 productId: '', 181 productId: '',
166 productName: '', 182 productName: '',
167 materialType: '', 183 materialType: '',
  184 + invoiceProductName: '',
168 quantity: '', 185 quantity: '',
169 purchasePrice: '', 186 purchasePrice: '',
170 estimatedLoss: '', 187 estimatedLoss: '',
@@ -287,6 +304,10 @@ export default { @@ -287,6 +304,10 @@ export default {
287 uni.showToast({ title: `第${i + 1}条明细:请选择品种`, icon: 'none' }) 304 uni.showToast({ title: `第${i + 1}条明细:请选择品种`, icon: 'none' })
288 return false 305 return false
289 } 306 }
  307 + if (!it.invoiceProductName) {
  308 + uni.showToast({ title: `第${i + 1}条明细:请输入发票名称`, icon: 'none' })
  309 + return false
  310 + }
290 if (priced === false && (it.purchasePrice === '' || it.purchasePrice == null)) { 311 if (priced === false && (it.purchasePrice === '' || it.purchasePrice == null)) {
291 uni.showToast({ title: `第${i + 1}条明细:未点价为否时采购价必填`, icon: 'none' }) 312 uni.showToast({ title: `第${i + 1}条明细:未点价为否时采购价必填`, icon: 'none' })
292 return false 313 return false
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <view class="row"><text class="label">是否数量买断</text><text class="value">{{ boolText(form.quantityBuyout) }}</text></view> 21 <view class="row"><text class="label">是否数量买断</text><text class="value">{{ boolText(form.quantityBuyout) }}</text></view>
22 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 22 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
23 <view class="row"><text class="label">装车费</text><text class="value">{{ safeText(form.loadingFee) }}</text></view> 23 <view class="row"><text class="label">装车费</text><text class="value">{{ safeText(form.loadingFee) }}</text></view>
24 - <view class="row"><text class="label">开票品种</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 24 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
25 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 25 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
26 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 26 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
27 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ safeText(form.settlementRatio) }}</text></view> 27 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ safeText(form.settlementRatio) }}</text></view>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 </view> 30 </view>
31 31
32 <!-- 明细信息 --> 32 <!-- 明细信息 -->
33 - <ProductRel mode="view" :list="productLineList" /> 33 + <ProductRel mode="view" :list="productLineList" @invoiceNameChange="onInvoiceNameChange" />
34 34
35 <!-- 料质状况 --> 35 <!-- 料质状况 -->
36 <view class="title-header"> 36 <view class="title-header">
@@ -104,6 +104,9 @@ export default { @@ -104,6 +104,9 @@ export default {
104 } 104 }
105 }, 105 },
106 methods: { 106 methods: {
  107 + onInvoiceNameChange(name) {
  108 + this.form.invoiceProductName = name
  109 + },
107 async loadDictData() { 110 async loadDictData() {
108 try { 111 try {
109 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD'] 112 const codes = [...this.materialConditionConfigs.map(mc => mc.dictCode), 'DELIVERY_METHOD']
@@ -161,9 +161,9 @@ @@ -161,9 +161,9 @@
161 </template> 161 </template>
162 </uni-list-item> 162 </uni-list-item>
163 163
164 - <uni-list-item title="开票品名"> 164 + <uni-list-item title="开票品名(汇总)">
165 <template v-slot:footer> 165 <template v-slot:footer>
166 - <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" /> 166 + <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" disabled />
167 </template> 167 </template>
168 </uni-list-item> 168 </uni-list-item>
169 169
@@ -242,6 +242,7 @@ @@ -242,6 +242,7 @@
242 :product-options="productOptions" 242 :product-options="productOptions"
243 :workshop-options="workshopOptions" 243 :workshop-options="workshopOptions"
244 @change="onLineChange" 244 @change="onLineChange"
  245 + @invoice-name-change="onInvoiceNameChange"
245 /> 246 />
246 </uni-list> 247 </uni-list>
247 248
@@ -411,6 +412,9 @@ export default { @@ -411,6 +412,9 @@ export default {
411 this.loadRefData() 412 this.loadRefData()
412 }, 413 },
413 methods: { 414 methods: {
  415 + onInvoiceNameChange(name) {
  416 + this.detail.invoiceProductName = name
  417 + },
414 safeText(v) { 418 safeText(v) {
415 var s = v == null ? '' : String(v) 419 var s = v == null ? '' : String(v)
416 return s.trim() ? s : '-' 420 return s.trim() ? s : '-'
@@ -751,7 +755,6 @@ export default { @@ -751,7 +755,6 @@ export default {
751 { key: 'quoterName', title: '报价人' }, 755 { key: 'quoterName', title: '报价人' },
752 { key: 'deliveryMode', title: '交提货方式' }, 756 { key: 'deliveryMode', title: '交提货方式' },
753 { key: 'loadingFee', title: '装车费' }, 757 { key: 'loadingFee', title: '装车费' },
754 - { key: 'invoiceProductName', title: '开票品名' },  
755 { key: 'deliveryDate', title: '交货日期' }, 758 { key: 'deliveryDate', title: '交货日期' },
756 { key: 'settlementMethod', title: '结算方式' }, 759 { key: 'settlementMethod', title: '结算方式' },
757 { key: 'settlementRatio', title: '结算比例' }, 760 { key: 'settlementRatio', title: '结算比例' },
@@ -827,8 +830,11 @@ export default { @@ -827,8 +830,11 @@ export default {
827 var itemId = r.itemId != null ? r.itemId : (r.id != null ? String(r.id) : (r._key != null ? r._key : ('line-' + Date.now() + '-' + i))) 830 var itemId = r.itemId != null ? r.itemId : (r.id != null ? String(r.id) : (r._key != null ? r._key : ('line-' + Date.now() + '-' + i)))
828 if (!workshopId && r.workshopId != null) workshopId = r.workshopId 831 if (!workshopId && r.workshopId != null) workshopId = r.workshopId
829 return { 832 return {
  833 + procurementPlanLineId: r.id || '',
  834 + id: r.id || '',
830 productId: self.pickId(r.productId), 835 productId: self.pickId(r.productId),
831 materialType: r.materialType != null ? String(r.materialType) : '', 836 materialType: r.materialType != null ? String(r.materialType) : '',
  837 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
832 quantity: r.quantity != null ? String(r.quantity) : '', 838 quantity: r.quantity != null ? String(r.quantity) : '',
833 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '', 839 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '',
834 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '', 840 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '',
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view> 25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view> 26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
27 - <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 27 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view> 30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
52 <view class="line-title">明细{{ idx + 1 }}</view> 52 <view class="line-title">明细{{ idx + 1 }}</view>
53 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(line.productName) }}</text></view> 53 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(line.productName) }}</text></view>
54 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(line.materialType) }}</text></view> 54 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(line.materialType) }}</text></view>
  55 + <view class="row"><text class="label">开票品种</text><text class="value">{{ safeText(line.invoiceProductName) }}</text></view>
55 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(line.quantity) }}</text></view> 56 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(line.quantity) }}</text></view>
56 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(line.actualPurchasePrice) }}</text></view> 57 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(line.actualPurchasePrice) }}</text></view>
57 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(line.includingShippingPrice) }}</text></view> 58 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(line.includingShippingPrice) }}</text></view>
@@ -163,12 +163,9 @@ @@ -163,12 +163,9 @@
163 </template> 163 </template>
164 </uni-list-item> 164 </uni-list-item>
165 165
166 - <uni-list-item>  
167 - <template v-slot:body>  
168 - <view class="item-title"><text class="required">*</text><text>开票品名</text></view>  
169 - </template> 166 + <uni-list-item title="开票品名(汇总)">
170 <template v-slot:footer> 167 <template v-slot:footer>
171 - <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" /> 168 + <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" disabled />
172 </template> 169 </template>
173 </uni-list-item> 170 </uni-list-item>
174 171
@@ -248,6 +245,7 @@ @@ -248,6 +245,7 @@
248 :product-options="productOptions" 245 :product-options="productOptions"
249 :workshop-options="workshopOptions" 246 :workshop-options="workshopOptions"
250 @change="onLineChange" 247 @change="onLineChange"
  248 + @invoice-name-change="onInvoiceNameChange"
251 /> 249 />
252 </uni-list> 250 </uni-list>
253 251
@@ -403,6 +401,9 @@ export default { @@ -403,6 +401,9 @@ export default {
403 } 401 }
404 }, 402 },
405 methods: { 403 methods: {
  404 + onInvoiceNameChange(name) {
  405 + this.detail.invoiceProductName = name
  406 + },
406 safeText(v) { 407 safeText(v) {
407 var s = v == null ? '' : String(v) 408 var s = v == null ? '' : String(v)
408 return s.trim() ? s : '-' 409 return s.trim() ? s : '-'
@@ -714,7 +715,6 @@ export default { @@ -714,7 +715,6 @@ export default {
714 { key: 'quoterName', title: '报价人' }, 715 { key: 'quoterName', title: '报价人' },
715 { key: 'deliveryMode', title: '交提货方式' }, 716 { key: 'deliveryMode', title: '交提货方式' },
716 { key: 'loadingFee', title: '装车费' }, 717 { key: 'loadingFee', title: '装车费' },
717 - { key: 'invoiceProductName', title: '开票品名' },  
718 { key: 'deliveryDate', title: '交货日期' }, 718 { key: 'deliveryDate', title: '交货日期' },
719 { key: 'settlementMethod', title: '结算方式' }, 719 { key: 'settlementMethod', title: '结算方式' },
720 { key: 'settlementRatio', title: '结算比例' }, 720 { key: 'settlementRatio', title: '结算比例' },
@@ -792,6 +792,7 @@ export default { @@ -792,6 +792,7 @@ export default {
792 return { 792 return {
793 productId: self.pickId(r.productId), 793 productId: self.pickId(r.productId),
794 materialType: r.materialType != null ? String(r.materialType) : '', 794 materialType: r.materialType != null ? String(r.materialType) : '',
  795 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
795 quantity: r.quantity != null ? String(r.quantity) : '', 796 quantity: r.quantity != null ? String(r.quantity) : '',
796 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '', 797 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '',
797 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '', 798 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '',
@@ -3,9 +3,6 @@ @@ -3,9 +3,6 @@
3 <view class="header"> 3 <view class="header">
4 <image class="opCollapse" src="/static/images/title.png" /> 4 <image class="opCollapse" src="/static/images/title.png" />
5 <text class="title">明细信息</text> 5 <text class="title">明细信息</text>
6 - <view class="ops">  
7 - <image class="opAdd" @click="onAdd" src="/static/images/plus.png" />  
8 - </view>  
9 </view> 6 </view>
10 7
11 <view class="add-list"> 8 <view class="add-list">
@@ -38,6 +35,16 @@ @@ -38,6 +35,16 @@
38 <uni-list-item> 35 <uni-list-item>
39 <template v-slot:body> 36 <template v-slot:body>
40 <view class="item-title"> 37 <view class="item-title">
  38 + <text class="required">*</text><text>开票品名</text>
  39 + </view>
  40 + </template>
  41 + <template v-slot:footer>
  42 + <uni-easyinput v-model="item.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" />
  43 + </template>
  44 + </uni-list-item>
  45 + <uni-list-item>
  46 + <template v-slot:body>
  47 + <view class="item-title">
41 <text class="required">*</text><text>数量(吨)</text> 48 <text class="required">*</text><text>数量(吨)</text>
42 </view> 49 </view>
43 </template> 50 </template>
@@ -202,7 +209,9 @@ export default { @@ -202,7 +209,9 @@ export default {
202 watch: { 209 watch: {
203 items: { 210 items: {
204 handler() { 211 handler() {
205 - this.emitChange() }, 212 + this.emitChange();
  213 + this.$emit('invoice-name-change', this.getSummaryInvoiceProductName());
  214 + },
206 deep: true 215 deep: true
207 }, 216 },
208 list: { 217 list: {
@@ -232,6 +241,13 @@ export default { @@ -232,6 +241,13 @@ export default {
232 }) 241 })
233 }, 242 },
234 methods: { 243 methods: {
  244 + getSummaryInvoiceProductName() {
  245 + const list = Array.isArray(this.items) ? this.items : [];
  246 + const names = list
  247 + .map((item) => item.invoiceProductName)
  248 + .filter((name) => !!name && name.trim() !== '');
  249 + return [...new Set(names.map((n) => n.trim()))].join('、');
  250 + },
235 initItems() { 251 initItems() {
236 var src = Array.isArray(this.list) && this.list.length > 0 ? this.list : [] 252 var src = Array.isArray(this.list) && this.list.length > 0 ? this.list : []
237 if (!src.length) { 253 if (!src.length) {
@@ -267,6 +283,7 @@ export default { @@ -267,6 +283,7 @@ export default {
267 productId: '', 283 productId: '',
268 productName: '', 284 productName: '',
269 materialType: '', 285 materialType: '',
  286 + invoiceProductName: '',
270 quantity: '', 287 quantity: '',
271 actualPurchasePrice: '', 288 actualPurchasePrice: '',
272 includingShippingPrice: '', 289 includingShippingPrice: '',
@@ -473,6 +490,7 @@ export default { @@ -473,6 +490,7 @@ export default {
473 var fields = [ 490 var fields = [
474 { key: 'productName', title: '品种' }, 491 { key: 'productName', title: '品种' },
475 { key: 'materialType', title: '料型' }, 492 { key: 'materialType', title: '料型' },
  493 + { key: 'invoiceProductName', title: '开票品名' },
476 { key: 'quantity', title: '数量' }, 494 { key: 'quantity', title: '数量' },
477 { key: 'actualPurchasePrice', title: '实际采购价' }, 495 { key: 'actualPurchasePrice', title: '实际采购价' },
478 { key: 'applicationAttrition', title: '申请损耗' } 496 { key: 'applicationAttrition', title: '申请损耗' }
@@ -191,7 +191,7 @@ @@ -191,7 +191,7 @@
191 </template> 191 </template>
192 </uni-list-item> 192 </uni-list-item>
193 193
194 - <uni-list-item title="开票品名"> 194 + <uni-list-item title="开票品名(汇总)">
195 <template v-slot:footer> 195 <template v-slot:footer>
196 <uni-easyinput :value="form.invoiceProductName" :inputBorder="false" disabled placeholder="-" /> 196 <uni-easyinput :value="form.invoiceProductName" :inputBorder="false" disabled placeholder="-" />
197 </template> 197 </template>
@@ -281,6 +281,11 @@ @@ -281,6 +281,11 @@
281 <uni-easyinput :value="line.materialType" :inputBorder="false" disabled placeholder="-" /> 281 <uni-easyinput :value="line.materialType" :inputBorder="false" disabled placeholder="-" />
282 </template> 282 </template>
283 </uni-list-item> 283 </uni-list-item>
  284 + <uni-list-item title="开票品种">
  285 + <template v-slot:footer>
  286 + <uni-easyinput :value="line.invoiceProductName" :inputBorder="false" disabled placeholder="-" />
  287 + </template>
  288 + </uni-list-item>
284 <uni-list-item title="数量(吨)"> 289 <uni-list-item title="数量(吨)">
285 <template v-slot:footer> 290 <template v-slot:footer>
286 <uni-easyinput :value="lineNumberDisplay(line.quantity)" :inputBorder="false" disabled placeholder="-" /> 291 <uni-easyinput :value="lineNumberDisplay(line.quantity)" :inputBorder="false" disabled placeholder="-" />
@@ -412,7 +417,7 @@ @@ -412,7 +417,7 @@
412 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 417 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
413 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view> 418 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
414 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view> 419 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
415 - <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 420 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
416 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 421 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
417 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 422 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
418 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view> 423 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
@@ -1374,9 +1379,11 @@ export default { @@ -1374,9 +1379,11 @@ export default {
1374 var itemId = r.itemId != null ? r.itemId : (r.id != null ? String(r.id) : (r._key != null ? r._key : ('line-' + Date.now() + '-' + i))) 1379 var itemId = r.itemId != null ? r.itemId : (r.id != null ? String(r.id) : (r._key != null ? r._key : ('line-' + Date.now() + '-' + i)))
1375 return { 1380 return {
1376 id: r.id != null ? r.id : '', 1381 id: r.id != null ? r.id : '',
  1382 + procurementPlanLineId: r.id != null ? r.id : '',
1377 itemId: itemId, 1383 itemId: itemId,
1378 productId: self.pickId(r.productId), 1384 productId: self.pickId(r.productId),
1379 materialType: r.materialType != null ? String(r.materialType) : '', 1385 materialType: r.materialType != null ? String(r.materialType) : '',
  1386 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
1380 quantity: r.quantity != null ? (self.toNumber(r.quantity)) : '', 1387 quantity: r.quantity != null ? (self.toNumber(r.quantity)) : '',
1381 actualPurchasePrice: r.actualPurchasePrice != null ? (self.toNumber(r.actualPurchasePrice)) : '', 1388 actualPurchasePrice: r.actualPurchasePrice != null ? (self.toNumber(r.actualPurchasePrice)) : '',
1382 includingShippingPrice: r.includingShippingPrice != null ? (self.toNumber(r.includingShippingPrice)) : '', 1389 includingShippingPrice: r.includingShippingPrice != null ? (self.toNumber(r.includingShippingPrice)) : '',
@@ -161,9 +161,9 @@ @@ -161,9 +161,9 @@
161 </template> 161 </template>
162 </uni-list-item> 162 </uni-list-item>
163 163
164 - <uni-list-item title="开票品名"> 164 + <uni-list-item title="开票品名(汇总)">
165 <template v-slot:footer> 165 <template v-slot:footer>
166 - <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" /> 166 + <uni-easyinput v-model="detail.invoiceProductName" :inputBorder="false" disabled />
167 </template> 167 </template>
168 </uni-list-item> 168 </uni-list-item>
169 169
@@ -244,6 +244,7 @@ @@ -244,6 +244,7 @@
244 :shipping-cost="detail.shippingCost" 244 :shipping-cost="detail.shippingCost"
245 :price-map="priceMap" 245 :price-map="priceMap"
246 @change="onLineChange" 246 @change="onLineChange"
  247 + @invoice-name-change="onInvoiceNameChange"
247 /> 248 />
248 </uni-list> 249 </uni-list>
249 250
@@ -414,6 +415,9 @@ export default { @@ -414,6 +415,9 @@ export default {
414 this.loadRefData() 415 this.loadRefData()
415 }, 416 },
416 methods: { 417 methods: {
  418 + onInvoiceNameChange(name) {
  419 + this.detail.invoiceProductName = name
  420 + },
417 safeText(v) { 421 safeText(v) {
418 var s = v == null ? '' : String(v) 422 var s = v == null ? '' : String(v)
419 return s.trim() ? s : '-' 423 return s.trim() ? s : '-'
@@ -794,7 +798,6 @@ export default { @@ -794,7 +798,6 @@ export default {
794 { key: 'quoterName', title: '报价人' }, 798 { key: 'quoterName', title: '报价人' },
795 { key: 'deliveryMode', title: '交提货方式' }, 799 { key: 'deliveryMode', title: '交提货方式' },
796 { key: 'loadingFee', title: '装车费' }, 800 { key: 'loadingFee', title: '装车费' },
797 - { key: 'invoiceProductName', title: '开票品名' },  
798 { key: 'deliveryDate', title: '交货日期' }, 801 { key: 'deliveryDate', title: '交货日期' },
799 { key: 'settlementMethod', title: '结算方式' }, 802 { key: 'settlementMethod', title: '结算方式' },
800 { key: 'settlementRatio', title: '结算比例' }, 803 { key: 'settlementRatio', title: '结算比例' },
@@ -872,6 +875,7 @@ export default { @@ -872,6 +875,7 @@ export default {
872 return { 875 return {
873 productId: self.pickId(r.productId), 876 productId: self.pickId(r.productId),
874 materialType: r.materialType != null ? String(r.materialType) : '', 877 materialType: r.materialType != null ? String(r.materialType) : '',
  878 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
875 quantity: r.quantity != null ? String(r.quantity) : '', 879 quantity: r.quantity != null ? String(r.quantity) : '',
876 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '', 880 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '',
877 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '', 881 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '',
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view> 24 <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view> 25 <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view> 26 <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
27 - <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view> 27 + <view class="row"><text class="label">开票品名(汇总)</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view> 28 <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view> 29 <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view> 30 <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
52 <view class="line-title">明细{{ idx + 1 }}</view> 52 <view class="line-title">明细{{ idx + 1 }}</view>
53 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(line.productName) }}</text></view> 53 <view class="row"><text class="label">品种</text><text class="value">{{ safeText(line.productName) }}</text></view>
54 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(line.materialType) }}</text></view> 54 <view class="row"><text class="label">料型</text><text class="value">{{ safeText(line.materialType) }}</text></view>
  55 + <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(line.invoiceProductName) }}</text></view>
55 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(line.quantity) }}</text></view> 56 <view class="row"><text class="label">数量(吨)</text><text class="value">{{ formatNumber(line.quantity) }}</text></view>
56 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(line.actualPurchasePrice) }}</text></view> 57 <view class="row"><text class="label">实际采购价</text><text class="value">{{ formatNumber(line.actualPurchasePrice) }}</text></view>
57 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(line.includingShippingPrice) }}</text></view> 58 <view class="row"><text class="label">含运到厂价</text><text class="value">{{ formatNumber(line.includingShippingPrice) }}</text></view>
@@ -250,6 +250,7 @@ @@ -250,6 +250,7 @@
250 :shipping-cost="detail.shippingCost" 250 :shipping-cost="detail.shippingCost"
251 :price-map="priceMap" 251 :price-map="priceMap"
252 @change="onLineChange" 252 @change="onLineChange"
  253 + @invoice-name-change="onInvoiceNameChange"
253 /> 254 />
254 </uni-list> 255 </uni-list>
255 256
@@ -406,6 +407,9 @@ export default { @@ -406,6 +407,9 @@ export default {
406 } 407 }
407 }, 408 },
408 methods: { 409 methods: {
  410 + onInvoiceNameChange(name) {
  411 + this.detail.invoiceProductName = name
  412 + },
409 safeText(v) { 413 safeText(v) {
410 var s = v == null ? '' : String(v) 414 var s = v == null ? '' : String(v)
411 return s.trim() ? s : '-' 415 return s.trim() ? s : '-'
@@ -820,6 +824,7 @@ export default { @@ -820,6 +824,7 @@ export default {
820 return { 824 return {
821 productId: self.pickId(r.productId), 825 productId: self.pickId(r.productId),
822 materialType: r.materialType != null ? String(r.materialType) : '', 826 materialType: r.materialType != null ? String(r.materialType) : '',
  827 + invoiceProductName: r.invoiceProductName != null ? String(r.invoiceProductName) : '',
823 quantity: r.quantity != null ? String(r.quantity) : '', 828 quantity: r.quantity != null ? String(r.quantity) : '',
824 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '', 829 actualPurchasePrice: r.actualPurchasePrice != null ? String(r.actualPurchasePrice) : '',
825 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '', 830 includingShippingPrice: r.includingShippingPrice != null ? String(r.includingShippingPrice) : '',
@@ -34,6 +34,16 @@ @@ -34,6 +34,16 @@
34 <uni-easyinput v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" /> 34 <uni-easyinput v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" />
35 </template> 35 </template>
36 </uni-list-item> 36 </uni-list-item>
  37 + <uni-list-item>
  38 + <template v-slot:body>
  39 + <view class="item-title">
  40 + <text class="required">*</text><text>开票品名</text>
  41 + </view>
  42 + </template>
  43 + <template v-slot:footer>
  44 + <uni-easyinput v-model="item.invoiceProductName" :inputBorder="false" placeholder="请输入开票品名" />
  45 + </template>
  46 + </uni-list-item>
37 47
38 <uni-list-item> 48 <uni-list-item>
39 <template v-slot:body> 49 <template v-slot:body>
@@ -237,7 +247,8 @@ export default { @@ -237,7 +247,8 @@ export default {
237 watch: { 247 watch: {
238 items: { 248 items: {
239 handler() { 249 handler() {
240 - this.emitChange() 250 + this.emitChange();
  251 + this.$emit('invoice-name-change', this.getSummaryInvoiceProductName());
241 }, 252 },
242 deep: true 253 deep: true
243 }, 254 },
@@ -273,6 +284,13 @@ export default { @@ -273,6 +284,13 @@ export default {
273 }) 284 })
274 }, 285 },
275 methods: { 286 methods: {
  287 + getSummaryInvoiceProductName() {
  288 + const list = Array.isArray(this.items) ? this.items : [];
  289 + const names = list
  290 + .map((item) => item.invoiceProductName)
  291 + .filter((name) => !!name && name.trim() !== '');
  292 + return [...new Set(names.map((n) => n.trim()))].join('、');
  293 + },
276 initItems() { 294 initItems() {
277 var src = Array.isArray(this.list) && this.list.length > 0 ? this.list : [] 295 var src = Array.isArray(this.list) && this.list.length > 0 ? this.list : []
278 if (!src.length) { 296 if (!src.length) {
@@ -308,6 +326,7 @@ export default { @@ -308,6 +326,7 @@ export default {
308 productId: '', 326 productId: '',
309 productName: '', 327 productName: '',
310 materialType: '', 328 materialType: '',
  329 + invoiceProductName: '',
311 quantity: '', 330 quantity: '',
312 actualPurchasePrice: '', 331 actualPurchasePrice: '',
313 includingShippingPrice: '', 332 includingShippingPrice: '',
@@ -563,7 +582,7 @@ export default { @@ -563,7 +582,7 @@ export default {
563 return c 582 return c
564 }) 583 })
565 var sig = list.length + '|' + list.map(function (r) { 584 var sig = list.length + '|' + list.map(function (r) {
566 - return [r.itemId, r.productId, r.productName, r.materialType, r.quantity, r.actualPurchasePrice, r.includingShippingPrice, r.priceListPrices, r.coordinationRange, r.estimatedLoss, r.applicationAttrition, r.paintDamageRatio, r.workshopId, r.workshopName].join('~') 585 + return [r.itemId, r.productId, r.productName, r.materialType, r.invoiceProductName, r.quantity, r.actualPurchasePrice, r.includingShippingPrice, r.priceListPrices, r.coordinationRange, r.estimatedLoss, r.applicationAttrition, r.paintDamageRatio, r.workshopId, r.workshopName].join('~')
567 }).join('||') 586 }).join('||')
568 if (sig === this._lastEmitSignature) return 587 if (sig === this._lastEmitSignature) return
569 this._lastEmitSignature = sig 588 this._lastEmitSignature = sig
@@ -589,6 +608,7 @@ export default { @@ -589,6 +608,7 @@ export default {
589 if (x.productId !== y.productId) return false 608 if (x.productId !== y.productId) return false
590 if (x.productName !== y.productName) return false 609 if (x.productName !== y.productName) return false
591 if (x.materialType !== y.materialType) return false 610 if (x.materialType !== y.materialType) return false
  611 + if (x.invoiceProductName !== y.invoiceProductName) return false
592 if (x.quantity !== y.quantity) return false 612 if (x.quantity !== y.quantity) return false
593 if (x.actualPurchasePrice !== y.actualPurchasePrice) return false 613 if (x.actualPurchasePrice !== y.actualPurchasePrice) return false
594 if (x.includingShippingPrice !== y.includingShippingPrice) return false 614 if (x.includingShippingPrice !== y.includingShippingPrice) return false
@@ -624,6 +644,10 @@ export default { @@ -624,6 +644,10 @@ export default {
624 uni.showToast({ title: '请填写第' + (i + 1) + '条明细的品种', icon: 'none' }) 644 uni.showToast({ title: '请填写第' + (i + 1) + '条明细的品种', icon: 'none' })
625 return false 645 return false
626 } 646 }
  647 + if (!it.invoiceProductName) {
  648 + uni.showToast({ title: '请填写第' + (i + 1) + '条明细的开票品名', icon: 'none' })
  649 + return false
  650 + }
627 if (it.quantity === '' || it.quantity === null || it.quantity === undefined) { 651 if (it.quantity === '' || it.quantity === null || it.quantity === undefined) {
628 uni.showToast({ title: '请填写第' + (i + 1) + '条明细的数量', icon: 'none' }) 652 uni.showToast({ title: '请填写第' + (i + 1) + '条明细的数量', icon: 'none' })
629 return false 653 return false