Commit a74a9c2e78ac50d153ceb7ba5e5f7a19b74b6f5b

Authored by gesilong
1 parent fdd140a5

commit:补货单单位优化

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