Commit a74a9c2e78ac50d153ceb7ba5e5f7a19b74b6f5b

Authored by gesilong
1 parent fdd140a5

commit:补货单单位优化

@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 <!-- 产品 --> 44 <!-- 产品 -->
45 <view class="section2"> 45 <view class="section2">
46 <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" 46 <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"
47 - :orderDate="form.orderDate" /> 47 + :orderDate="form.orderDate" :contractType="form.contractType" />
48 </view> 48 </view>
49 <view class="footer"> 49 <view class="footer">
50 <view class="view-total"> 50 <view class="view-total">
@@ -20,7 +20,8 @@ @@ -20,7 +20,8 @@
20 <!-- 产品 --> 20 <!-- 产品 -->
21 <view class="section2"> 21 <view class="section2">
22 <Product mode="approve" :list="initPurchaseOrderLineList" 22 <Product mode="approve" :list="initPurchaseOrderLineList"
23 - :canEditSupplementary="canEditSupplementary" @change="purchaseOrderLineListChange" /> 23 + :canEditSupplementary="canEditSupplementary" @change="purchaseOrderLineListChange"
  24 + :contractType="form.contractType" />
24 </view> 25 </view>
25 <view class="section3"> 26 <view class="section3">
26 <view class="view-total"> 27 <view class="view-total">
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
20 :totalQuantity="form.totalQuantity" 20 :totalQuantity="form.totalQuantity"
21 :totalShippedQuantity="form.totalShippedQuantity" 21 :totalShippedQuantity="form.totalShippedQuantity"
22 :totalSupplementaryQuantity="form.totalSupplementaryQuantity" 22 :totalSupplementaryQuantity="form.totalSupplementaryQuantity"
  23 + :contractType="form.contractType"
23 /> 24 />
24 </view> 25 </view>
25 </view> 26 </view>
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <view class="section2"> 45 <view class="section2">
46 <!-- mode="fill" 允许个别字段编辑 --> 46 <!-- mode="fill" 允许个别字段编辑 -->
47 <Product mode="fill" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" 47 <Product mode="fill" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"
48 - :orderDate="form.orderDate" /> 48 + :orderDate="form.orderDate" :contractType="form.contractType" />
49 </view> 49 </view>
50 50
51 <view class="footer"> 51 <view class="footer">
@@ -469,4 +469,4 @@ export default { @@ -469,4 +469,4 @@ export default {
469 } 469 }
470 } 470 }
471 } 471 }
472 -</style>  
  472 +</style>
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <view class="section2"> 45 <view class="section2">
46 <!-- mode="add" 允许编辑 --> 46 <!-- mode="add" 允许编辑 -->
47 <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" 47 <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"
48 - :orderDate="form.orderDate" /> 48 + :orderDate="form.orderDate" :contractType="form.contractType" />
49 </view> 49 </view>
50 <view class="footer"> 50 <view class="footer">
51 <view class="view-total"> 51 <view class="view-total">
@@ -496,4 +496,4 @@ export default { @@ -496,4 +496,4 @@ export default {
496 } 496 }
497 } 497 }
498 } 498 }
499 -</style>  
  499 +</style>
@@ -129,7 +129,7 @@ @@ -129,7 +129,7 @@
129 :inputBorder="false" 129 :inputBorder="false"
130 @input="onNonNegativeNumberInput($event, item, idx, 'salesPrice')" 130 @input="onNonNegativeNumberInput($event, item, idx, 'salesPrice')"
131 @blur="onNonNegativeNumberBlur(item, idx, 'salesPrice')" /> 131 @blur="onNonNegativeNumberBlur(item, idx, 'salesPrice')" />
132 - <text class="unit"></text> 132 + <text class="unit">{{ moneyUnit }}</text>
133 </view> 133 </view>
134 </template> 134 </template>
135 </uni-list-item> 135 </uni-list-item>
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 :inputBorder="false" 143 :inputBorder="false"
144 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')" 144 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')"
145 @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" /> 145 @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" />
146 - <text class="unit"></text> 146 + <text class="unit">{{ moneyUnit }}</text>
147 </view> 147 </view>
148 </template> 148 </template>
149 </uni-list-item> 149 </uni-list-item>
@@ -247,12 +247,12 @@ @@ -247,12 +247,12 @@
247 <text class="value">{{ item.supplementaryQuantity }}</text> 247 <text class="value">{{ item.supplementaryQuantity }}</text>
248 </template> 248 </template>
249 </uni-list-item> 249 </uni-list-item>
250 - <uni-list-item class="amount-item" title="单价(元/kg)"> 250 + <uni-list-item class="amount-item" :title="salesPriceTitle">
251 <template v-slot:footer> 251 <template v-slot:footer>
252 <text class="value">{{ item.salesPrice }}</text> 252 <text class="value">{{ item.salesPrice }}</text>
253 </template> 253 </template>
254 </uni-list-item> 254 </uni-list-item>
255 - <uni-list-item class="amount-item" title="包装费(元/kg)"> 255 + <uni-list-item class="amount-item" :title="packagingFeeTitle">
256 <template v-slot:footer> 256 <template v-slot:footer>
257 <text class="value">{{ item.packagingFee }}</text> 257 <text class="value">{{ item.packagingFee }}</text>
258 </template> 258 </template>
@@ -359,12 +359,12 @@ @@ -359,12 +359,12 @@
359 <text v-else class="value">{{ item.supplementaryQuantity }}</text> 359 <text v-else class="value">{{ item.supplementaryQuantity }}</text>
360 </template> 360 </template>
361 </uni-list-item> 361 </uni-list-item>
362 - <uni-list-item class="amount-item" title="单价(元/kg)"> 362 + <uni-list-item class="amount-item" :title="salesPriceTitle">
363 <template v-slot:footer> 363 <template v-slot:footer>
364 <text class="value">{{ item.salesPrice }}</text> 364 <text class="value">{{ item.salesPrice }}</text>
365 </template> 365 </template>
366 </uni-list-item> 366 </uni-list-item>
367 - <uni-list-item class="amount-item" title="包装费(元/kg)"> 367 + <uni-list-item class="amount-item" :title="packagingFeeTitle">
368 <template v-slot:footer> 368 <template v-slot:footer>
369 <text class="value">{{ item.packagingFee }}</text> 369 <text class="value">{{ item.packagingFee }}</text>
370 </template> 370 </template>
@@ -439,9 +439,9 @@ @@ -439,9 +439,9 @@
439 </view> 439 </view>
440 <view class="row"><text class="label">需求补货数量(kg)</text><text class="value">{{ item.supplementaryQuantity 440 <view class="row"><text class="label">需求补货数量(kg)</text><text class="value">{{ item.supplementaryQuantity
441 }}</text></view> 441 }}</text></view>
442 - <view class="row"><text class="label">单价(元/kg)</text><text class="value">{{ item.salesPrice }}</text> 442 + <view class="row"><text class="label">{{ salesPriceTitle }}</text><text class="value">{{ item.salesPrice }}</text>
443 </view> 443 </view>
444 - <view class="row"><text class="label">包装费(元/kg)</text><text class="value">{{ 444 + <view class="row"><text class="label">{{ packagingFeeTitle }}</text><text class="value">{{
445 item.packagingFee }}</text></view> 445 item.packagingFee }}</text></view>
446 <view class="row"><text class="label">生产科(车间)确认交付时间</text><text class="value">{{ 446 <view class="row"><text class="label">生产科(车间)确认交付时间</text><text class="value">{{
447 item.confirmedDeliveryDate 447 item.confirmedDeliveryDate
@@ -478,7 +478,8 @@ export default { @@ -478,7 +478,8 @@ export default {
478 totalShippedQuantity: { type: Number, default: 0 }, 478 totalShippedQuantity: { type: Number, default: 0 },
479 totalSupplementaryQuantity: { type: Number, default: 0 }, 479 totalSupplementaryQuantity: { type: Number, default: 0 },
480 orderDate: { type: String, default: '' }, 480 orderDate: { type: String, default: '' },
481 - canEditSupplementary: { type: Boolean, default: false } 481 + canEditSupplementary: { type: Boolean, default: false },
  482 + contractType: { type: String, default: '' }
482 }, 483 },
483 data() { 484 data() {
484 return { 485 return {
@@ -503,6 +504,18 @@ export default { @@ -503,6 +504,18 @@ export default {
503 const dd = String(dt.getDate()).padStart(2, '0') 504 const dd = String(dt.getDate()).padStart(2, '0')
504 return `${yy}/${mm}/${dd}` 505 return `${yy}/${mm}/${dd}`
505 }, 506 },
  507 + isIntlContract() {
  508 + return ['INTL_STD_CONTRACT', 'INTL_INVENTORY_AGMT', 'INTL_OPEN_SPEC_AGMT'].includes(String(this.contractType || ''))
  509 + },
  510 + moneyUnit() {
  511 + return this.isIntlContract ? '美元' : '元'
  512 + },
  513 + salesPriceTitle() {
  514 + return `单价(${this.moneyUnit}/kg)`
  515 + },
  516 + packagingFeeTitle() {
  517 + return `包装费(${this.moneyUnit}/kg)`
  518 + },
506 // roleCodes() { 519 // roleCodes() {
507 // const g = this.$store && this.$store.getters 520 // const g = this.$store && this.$store.getters
508 // return (g && g.roleCodes) || []; 521 // return (g && g.roleCodes) || [];
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 :totalQuantity="form.totalQuantity" 19 :totalQuantity="form.totalQuantity"
20 :totalShippedQuantity="form.totalShippedQuantity" 20 :totalShippedQuantity="form.totalShippedQuantity"
21 :totalSupplementaryQuantity="form.totalSupplementaryQuantity" 21 :totalSupplementaryQuantity="form.totalSupplementaryQuantity"
  22 + :contractType="form.contractType"
22 /> 23 />
23 </view> 24 </view>
24 </view> 25 </view>