Commit fa0eccb57f1c86124c9ea242c26934645e55140f

Authored by gesilong
1 parent 92cd9538

commit:发货单列表功能

@@ -65,18 +65,18 @@ @@ -65,18 +65,18 @@
65 <!-- 产品 --> 65 <!-- 产品 -->
66 <view class="section2"> 66 <view class="section2">
67 <Product mode="approve" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" 67 <Product mode="approve" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"
68 - :orderDate="form.orderDate" /> 68 + :orderDate="form.orderDate" :canEditDeliveryAndAssessment="canEditQualityFields" />
69 </view> 69 </view>
70 70
71 <view class="section"> 71 <view class="section">
72 <uni-list-item title="价格表编号"> 72 <uni-list-item title="价格表编号">
73 <template v-slot:footer> 73 <template v-slot:footer>
74 - <uni-easyinput v-model="form.priceListNo" placeholder="请输入价格表编号" :inputBorder="false" /> 74 + <uni-easyinput v-model="form.priceListNo" placeholder="请输入价格表编号" :inputBorder="false" :disabled="canEditQualityFields"/>
75 </template> 75 </template>
76 </uni-list-item> 76 </uni-list-item>
77 <uni-list-item title="开票要求"> 77 <uni-list-item title="开票要求">
78 <template v-slot:footer> 78 <template v-slot:footer>
79 - <uni-easyinput v-model="form.invoicingStatus" placeholder="请输入开票要求" :inputBorder="false" /> 79 + <uni-easyinput v-model="form.invoicingStatus" placeholder="请输入开票要求" :inputBorder="false" :disabled="canEditQualityFields" />
80 </template> 80 </template>
81 </uni-list-item> 81 </uni-list-item>
82 <uni-list-item class="amount-item"> 82 <uni-list-item class="amount-item">
@@ -85,12 +85,12 @@ @@ -85,12 +85,12 @@
85 </template> 85 </template>
86 <template v-slot:footer> 86 <template v-slot:footer>
87 <view class="amount-row"> 87 <view class="amount-row">
88 - <uni-easyinput type="digit" v-model="form.shippingCost" placeholder="请输入运费" :inputBorder="false" /> 88 + <uni-easyinput type="digit" v-model="form.shippingCost" placeholder="请输入运费" :inputBorder="false" :disabled="canEditQualityFields" />
89 <text class="unit">元</text> 89 <text class="unit">元</text>
90 </view> 90 </view>
91 </template> 91 </template>
92 </uni-list-item> 92 </uni-list-item>
93 - <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable 93 + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" :clickable="!canEditQualityFields"
94 @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> 94 @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow>
95 <template v-slot:body> 95 <template v-slot:body>
96 <view class="item-title"><text>执行标准</text></view> 96 <view class="item-title"><text>执行标准</text></view>
@@ -112,32 +112,37 @@ @@ -112,32 +112,37 @@
112 <uni-list-item title="件重条头"> 112 <uni-list-item title="件重条头">
113 <template v-slot:footer> 113 <template v-slot:footer>
114 <uni-easyinput type="textarea" v-model="form.pieceWeightHeader" placeholder="请输入件重条头" 114 <uni-easyinput type="textarea" v-model="form.pieceWeightHeader" placeholder="请输入件重条头"
115 - :inputBorder="false" /> 115 + :inputBorder="false" :disabled="!canEditQualityFields" />
116 </template> 116 </template>
117 </uni-list-item> 117 </uni-list-item>
118 <uni-list-item title="表面"> 118 <uni-list-item title="表面">
119 <template v-slot:footer> 119 <template v-slot:footer>
120 - <uni-easyinput type="textarea" v-model="form.surface" placeholder="请输入表面" :inputBorder="false" /> 120 + <uni-easyinput type="textarea" v-model="form.surface" placeholder="请输入表面" :inputBorder="false"
  121 + :disabled="!canEditQualityFields" />
121 </template> 122 </template>
122 </uni-list-item> 123 </uni-list-item>
123 <uni-list-item title="公差"> 124 <uni-list-item title="公差">
124 <template v-slot:footer> 125 <template v-slot:footer>
125 - <uni-easyinput type="textarea" v-model="form.tolerance" placeholder="请输入公差" :inputBorder="false" /> 126 + <uni-easyinput type="textarea" v-model="form.tolerance" placeholder="请输入公差" :inputBorder="false"
  127 + :disabled="!canEditQualityFields" />
126 </template> 128 </template>
127 </uni-list-item> 129 </uni-list-item>
128 <uni-list-item title="性能"> 130 <uni-list-item title="性能">
129 <template v-slot:footer> 131 <template v-slot:footer>
130 - <uni-easyinput type="textarea" v-model="form.performance" placeholder="请输入性能" :inputBorder="false" /> 132 + <uni-easyinput type="textarea" v-model="form.performance" placeholder="请输入性能" :inputBorder="false"
  133 + :disabled="!canEditQualityFields" />
131 </template> 134 </template>
132 </uni-list-item> 135 </uni-list-item>
133 <uni-list-item title="成分"> 136 <uni-list-item title="成分">
134 <template v-slot:footer> 137 <template v-slot:footer>
135 - <uni-easyinput type="textarea" v-model="form.element" placeholder="请输入成分" :inputBorder="false" /> 138 + <uni-easyinput type="textarea" v-model="form.element" placeholder="请输入成分" :inputBorder="false"
  139 + :disabled="!canEditQualityFields" />
136 </template> 140 </template>
137 </uni-list-item> 141 </uni-list-item>
138 <uni-list-item title="包装"> 142 <uni-list-item title="包装">
139 <template v-slot:footer> 143 <template v-slot:footer>
140 - <uni-easyinput type="textarea" v-model="form.packaging" placeholder="请输入包装" :inputBorder="false" /> 144 + <uni-easyinput type="textarea" v-model="form.packaging" placeholder="请输入包装" :inputBorder="false"
  145 + :disabled="!canEditQualityFields" />
141 </template> 146 </template>
142 </uni-list-item> 147 </uni-list-item>
143 <uni-list-item title="备注"> 148 <uni-list-item title="备注">
@@ -286,13 +291,22 @@ export default { @@ -286,13 +291,22 @@ export default {
286 isReadonly: false, 291 isReadonly: false,
287 historyProductionProcessLoaded: false, 292 historyProductionProcessLoaded: false,
288 historyProductionProcessLoading: false, 293 historyProductionProcessLoading: false,
  294 + canEditQualityFields: false,
289 } 295 }
290 }, 296 },
291 computed: { 297 computed: {
292 roleCodes() { 298 roleCodes() {
293 const g = this.$store && this.$store.getters 299 const g = this.$store && this.$store.getters
294 return (g && g.roleCodes) || [] 300 return (g && g.roleCodes) || []
295 - } 301 + },
  302 + // isNewRole() {
  303 + // const specialRoles = ['yfcjybjhy', 'efcjybjhy', 'sfcjybjhy', 'ztfcjybjhy']
  304 + // return this.roleCodes.some(code => specialRoles.includes(code))
  305 + // },
  306 + // canEditQualityFields() {
  307 + // if (!this.isReadonly) return true
  308 + // return this.isNewRole
  309 + // }
296 }, 310 },
297 watch: { 311 watch: {
298 id: { 312 id: {
@@ -309,8 +323,13 @@ export default { @@ -309,8 +323,13 @@ export default {
309 // 办事处内勤 可编辑(部分编辑字段),其他角色都是不可编辑 323 // 办事处内勤 可编辑(部分编辑字段),其他角色都是不可编辑
310 if (val.includes('bscnq')) { 324 if (val.includes('bscnq')) {
311 this.isReadonly = false; 325 this.isReadonly = false;
  326 + this.canEditQualityFields = false
  327 + } else if (val.some(code => ['yfcjybjhy', 'efcjybjhy', 'sfcjybjhy', 'ztfcjybjhy'].includes(code))) {
  328 + this.isReadonly = false;
  329 + this.canEditQualityFields = true
312 } else { 330 } else {
313 this.isReadonly = true; 331 this.isReadonly = true;
  332 + this.canEditQualityFields = false
314 } 333 }
315 } 334 }
316 } 335 }
@@ -319,6 +338,7 @@ export default { @@ -319,6 +338,7 @@ export default {
319 this.loadDicOptions() 338 this.loadDicOptions()
320 }, 339 },
321 methods: { 340 methods: {
  341 +
322 loadDicOptions() { 342 loadDicOptions() {
323 const dicCodes = ['SUPPLIER', 'APPLICABLE_STANDARD'] 343 const dicCodes = ['SUPPLIER', 'APPLICABLE_STANDARD']
324 return getDicByCodes(dicCodes).then(results => { 344 return getDicByCodes(dicCodes).then(results => {
@@ -457,6 +477,9 @@ export default { @@ -457,6 +477,9 @@ export default {
457 477
458 ::v-deep .uni-list { 478 ::v-deep .uni-list {
459 background: transparent; 479 background: transparent;
  480 + .uni-input-input:disabled {
  481 + color: rgb(51, 51, 51) !important;
  482 + }
460 483
461 &-item { 484 &-item {
462 &__extra-text { 485 &__extra-text {
@@ -63,18 +63,18 @@ @@ -63,18 +63,18 @@
63 63
64 <!-- 产品 --> 64 <!-- 产品 -->
65 <view class="section2"> 65 <view class="section2">
66 - <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :pageType="'modify'" :orderDate="form.orderDate" /> 66 + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :pageType="'modify'" :orderDate="form.orderDate" :canEditDeliveryAndAssessment="true" />
67 </view> 67 </view>
68 68
69 <view class="section"> 69 <view class="section">
70 <uni-list-item title="价格表编号"> 70 <uni-list-item title="价格表编号">
71 <template v-slot:footer> 71 <template v-slot:footer>
72 - <uni-easyinput v-model="form.priceListNo" placeholder="请输入价格表编号" :inputBorder="false" /> 72 + <view class="readonly-text">{{ form.priceListNo }}</view>
73 </template> 73 </template>
74 </uni-list-item> 74 </uni-list-item>
75 <uni-list-item title="开票要求"> 75 <uni-list-item title="开票要求">
76 <template v-slot:footer> 76 <template v-slot:footer>
77 - <uni-easyinput v-model="form.invoicingStatus" placeholder="请输入开票要求" :inputBorder="false" /> 77 + <view class="readonly-text">{{ form.invoicingStatus }}</view>
78 </template> 78 </template>
79 </uni-list-item> 79 </uni-list-item>
80 <uni-list-item class="amount-item"> 80 <uni-list-item class="amount-item">
@@ -83,8 +83,7 @@ @@ -83,8 +83,7 @@
83 </template> 83 </template>
84 <template v-slot:footer> 84 <template v-slot:footer>
85 <view class="amount-row"> 85 <view class="amount-row">
86 - <uni-easyinput type="number" v-model="form.shippingCost" placeholder="0.00" :inputBorder="false" />  
87 - <text class="unit">元</text> 86 + <view class="readonly-text">{{ form.shippingCost }}元</view>
88 </view> 87 </view>
89 </template> 88 </template>
90 </uni-list-item> 89 </uni-list-item>
@@ -96,7 +95,7 @@ @@ -96,7 +95,7 @@
96 </uni-list-item> 95 </uni-list-item>
97 <uni-list-item title="标准" v-if="form.executionStandard === 'OTHER'"> 96 <uni-list-item title="标准" v-if="form.executionStandard === 'OTHER'">
98 <template v-slot:footer> 97 <template v-slot:footer>
99 - <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> 98 + <view class="readonly-text">{{ form.executionStandardRemarks }}</view>
100 </template> 99 </template>
101 </uni-list-item> 100 </uni-list-item>
102 </view> 101 </view>
@@ -140,7 +139,7 @@ @@ -140,7 +139,7 @@
140 </uni-list-item> 139 </uni-list-item>
141 <uni-list-item title="备注"> 140 <uni-list-item title="备注">
142 <template v-slot:footer> 141 <template v-slot:footer>
143 - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" /> 142 + <view class="readonly-text">{{ form.remarks }}</view>
144 </template> 143 </template>
145 </uni-list-item> 144 </uni-list-item>
146 <view class="footer"> 145 <view class="footer">
@@ -341,7 +340,9 @@ export default { @@ -341,7 +340,9 @@ export default {
341 340
342 ::v-deep .uni-list { 341 ::v-deep .uni-list {
343 background: transparent; 342 background: transparent;
344 - 343 + .uni-input-input:disabled {
  344 + color: rgb(51, 51, 51) !important;
  345 + }
345 &-item { 346 &-item {
346 &__extra-text { 347 &__extra-text {
347 font-size: 32rpx; 348 font-size: 32rpx;
@@ -16,43 +16,95 @@ @@ -16,43 +16,95 @@
16 16
17 <view v-if="mode === 'add'" class="section"> 17 <view v-if="mode === 'add'" class="section">
18 <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> 18 <view v-for="(item, idx) in items" :key="'a-' + idx" class="block">
19 - <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view>  
20 - <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>  
21 - <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> 19 + <view v-show="item.collapsed">
  20 + <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view>
  21 + <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
  22 + <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view>
  23 + </view>
  24 +
22 25
23 <view v-show="!item.collapsed"> 26 <view v-show="!item.collapsed">
24 - <!-- 厚(公差) * 宽(公差) * 长(公差) -->  
25 - <view class="row row-spec"><text class="label">规格(mm)</text>  
26 - <view class="value value-spec">  
27 - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>  
28 - <view v-if="item.thickness" class="value-spec_box">  
29 - <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos ? '+' + item.thicknessTolPos : item.thicknessTolPos }}  
30 - </view>  
31 - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}  
32 - </view>  
33 - </view>  
34 - <view v-if="item.width" class="value-spec_val p12">*</view>  
35 - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>  
36 - <view v-if="item.width" class="value-spec_box">  
37 - <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' + item.widthTolPos : item.widthTolPos }}</view>  
38 - <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}</view>  
39 - </view>  
40 - <view v-if="item.length" class="value-spec_val p12">*</view>  
41 - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>  
42 - <view v-if="item.length" class="value-spec_box">  
43 - <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}</view>  
44 - <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}</view>  
45 - </view>  
46 - </view>  
47 - </view>  
48 - <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>  
49 - <view class="row" :class="{ 'noneStyle': !item.showSalesPrice }"><text  
50 - class="label">数量kg</text><text class="value">{{ item.quantity }}</text>  
51 - </view>  
52 - <view class="row" :class="{ 'noneStyle': item.showSalesPrice }" v-if="item.showSalesPrice"><text  
53 - class="label">销售价格</text><text class="value">{{  
54 - item.salesPrice }}</text></view>  
55 <uni-list class="edit-list"> 27 <uni-list class="edit-list">
  28 + <uni-list-item title="行业">
  29 + <template v-slot:footer>
  30 + <uni-easyinput v-model="item.industry" placeholder="请输入行业" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  31 + </template>
  32 + </uni-list-item>
  33 + <uni-list-item title="品质">
  34 + <template v-slot:footer>
  35 + <uni-easyinput v-model="item.quality" placeholder="请输入品质" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  36 + </template>
  37 + </uni-list-item>
  38 + <uni-list-item title="牌号">
  39 + <template v-slot:footer>
  40 + <uni-easyinput v-model="item.brand" placeholder="请输入牌号" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  41 + </template>
  42 + </uni-list-item>
  43 +
  44 + <uni-list-item title="厚度(mm)">
  45 + <template v-slot:footer>
  46 + <uni-easyinput type="digit" v-model="item.thickness" placeholder="请输入厚度" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  47 + </template>
  48 + </uni-list-item>
  49 + <uni-list-item title="厚度公差上限(mm)">
  50 + <template v-slot:footer>
  51 + <uni-easyinput type="digit" v-model="item.thicknessTolPos" placeholder="请输入厚度公差上限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  52 + </template>
  53 + </uni-list-item>
  54 + <uni-list-item title="厚度公差下限(mm)">
  55 + <template v-slot:footer>
  56 + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差下限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  57 + </template>
  58 + </uni-list-item>
  59 +
  60 + <uni-list-item title="宽度(mm)">
  61 + <template v-slot:footer>
  62 + <uni-easyinput type="digit" v-model="item.width" placeholder="请输入宽度" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  63 + </template>
  64 + </uni-list-item>
  65 + <uni-list-item title="宽度公差上限(mm)">
  66 + <template v-slot:footer>
  67 + <uni-easyinput type="digit" v-model="item.widthTolPos" placeholder="请输入宽度公差上限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  68 + </template>
  69 + </uni-list-item>
  70 + <uni-list-item title="宽度公差下限(mm)">
  71 + <template v-slot:footer>
  72 + <uni-easyinput type="digit" v-model="item.widthTolNeg" placeholder="请输入宽度公差下限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  73 + </template>
  74 + </uni-list-item>
  75 +
  76 + <uni-list-item title="长度(mm)">
  77 + <template v-slot:footer>
  78 + <uni-easyinput type="digit" v-model="item.length" placeholder="请输入长度" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  79 + </template>
  80 + </uni-list-item>
  81 + <uni-list-item title="长度公差上限(mm)">
  82 + <template v-slot:footer>
  83 + <uni-easyinput type="digit" v-model="item.lengthTolPos" placeholder="请输入长度公差上限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  84 + </template>
  85 + </uni-list-item>
  86 + <uni-list-item title="长度公差下限(mm)">
  87 + <template v-slot:footer>
  88 + <uni-easyinput type="digit" v-model="item.lengthTolNeg" placeholder="请输入长度公差下限" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  89 + </template>
  90 + </uni-list-item>
  91 +
  92 + <uni-list-item title="状态">
  93 + <template v-slot:footer>
  94 + <uni-easyinput v-model="item.status" placeholder="请输入状态" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  95 + </template>
  96 + </uni-list-item>
  97 + <uni-list-item title="数量kg">
  98 + <template v-slot:footer>
  99 + <uni-easyinput type="digit" v-model="item.quantity" placeholder="请输入数量" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  100 + </template>
  101 + </uni-list-item>
  102 + <uni-list-item title="销售价格" v-if="item.showSalesPrice">
  103 + <template v-slot:footer>
  104 + <uni-easyinput type="digit" v-model="item.salesPrice" placeholder="请输入销售价格" :inputBorder="false" :disabled="canEditDeliveryAndAssessment" />
  105 + </template>
  106 + </uni-list-item>
  107 +
56 <uni-list-item class="amount-item"> 108 <uni-list-item class="amount-item">
57 <template v-slot:body> 109 <template v-slot:body>
58 <view class="item-title"><text>包装费</text></view> 110 <view class="item-title"><text>包装费</text></view>
@@ -61,6 +113,7 @@ @@ -61,6 +113,7 @@
61 <view class="amount-row"> 113 <view class="amount-row">
62 <uni-easyinput type="digit" v-model="item.packagingFee" placeholder="0.00" 114 <uni-easyinput type="digit" v-model="item.packagingFee" placeholder="0.00"
63 :inputBorder="false" 115 :inputBorder="false"
  116 + :disabled="canEditDeliveryAndAssessment"
64 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')" 117 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')"
65 @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" /> 118 @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" />
66 <text class="unit">元</text> 119 <text class="unit">元</text>
@@ -70,17 +123,23 @@ @@ -70,17 +123,23 @@
70 <uni-list-item title="发货日期"> 123 <uni-list-item title="发货日期">
71 <template v-slot:footer> 124 <template v-slot:footer>
72 <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate" 125 <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate"
  126 + :disabled="!canEditDeliveryAndAssessment"
73 @change="onDeliveryChange($event, item, idx)" /> 127 @change="onDeliveryChange($event, item, idx)" />
74 </template> 128 </template>
75 </uni-list-item> 129 </uni-list-item>
76 <uni-list-item title="考核超协"> 130 <uni-list-item title="考核超协">
77 <template v-slot:footer> 131 <template v-slot:footer>
78 - <uni-easyinput type="digit" :disabled="pageType === 'modify'"  
79 - v-model="item.assessmentExceedsAgreement"  
80 - :placeholder="pageType === 'modify' ? '' : '请输入考核超协'" :inputBorder="false" 132 + <uni-easyinput type="digit" v-model="item.assessmentExceedsAgreement" placeholder="请输入考核超协" :inputBorder="false"
  133 + :disabled="!canEditDeliveryAndAssessment"
81 @input="onAssessmentInput($event, idx)" @blur="onAssessmentBlur($event, idx)" /> 134 @input="onAssessmentInput($event, idx)" @blur="onAssessmentBlur($event, idx)" />
82 </template> 135 </template>
83 </uni-list-item> 136 </uni-list-item>
  137 + <uni-list-item class="select-item" :class="String(item.sampleOrder) ? 'is-filled' : 'is-empty'" :clickable="!canEditDeliveryAndAssessment"
  138 + @click="openSheet(idx)" :rightText="(item.sampleOrder === true ? '是' : (item.sampleOrder === false ? '否' : '')) || '请选择'" showArrow>
  139 + <template v-slot:body>
  140 + <view class="item-title"><text>是否为试样订单</text></view>
  141 + </template>
  142 + </uni-list-item>
84 </uni-list> 143 </uni-list>
85 </view> 144 </view>
86 145
@@ -142,7 +201,7 @@ @@ -142,7 +201,7 @@
142 <uni-easyinput type="digit" v-model="item.packagingFee" placeholder="0.00" 201 <uni-easyinput type="digit" v-model="item.packagingFee" placeholder="0.00"
143 :inputBorder="false" 202 :inputBorder="false"
144 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')" 203 @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')"
145 - @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" /> 204 + @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" :disabled="canEditDeliveryAndAssessment"/>
146 <text class="unit">元</text> 205 <text class="unit">元</text>
147 </view> 206 </view>
148 </template> 207 </template>
@@ -150,17 +209,18 @@ @@ -150,17 +209,18 @@
150 <uni-list-item title="发货日期"> 209 <uni-list-item title="发货日期">
151 <template v-slot:footer> 210 <template v-slot:footer>
152 <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate" 211 <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate"
  212 + :disabled="!canEditDeliveryAndAssessment"
153 @change="onDeliveryChange($event, item, idx)" /> 213 @change="onDeliveryChange($event, item, idx)" />
154 </template> 214 </template>
155 </uni-list-item> 215 </uni-list-item>
156 <uni-list-item title="考核超协"> 216 <uni-list-item title="考核超协">
157 <template v-slot:footer> 217 <template v-slot:footer>
158 - <uni-easyinput :disabled="pageType === 'modify'" 218 + <uni-easyinput :disabled="pageType === 'modify' || !canEditDeliveryAndAssessment"
159 v-model="item.assessmentExceedsAgreement" 219 v-model="item.assessmentExceedsAgreement"
160 :placeholder="pageType === 'modify' ? '' : '请输入考核超协'" :inputBorder="false" /> 220 :placeholder="pageType === 'modify' ? '' : '请输入考核超协'" :inputBorder="false" />
161 </template> 221 </template>
162 </uni-list-item> 222 </uni-list-item>
163 - <uni-list-item class="select-item" :class="String(item.sampleOrder) ? 'is-filled' : 'is-empty'" clickable 223 + <uni-list-item class="select-item" :class="String(item.sampleOrder) ? 'is-filled' : 'is-empty'" :clickable="!canEditDeliveryAndAssessment"
164 @click="openSheet(idx)" :rightText="(item.sampleOrder ? '是' : '否') || '请选择'" showArrow> 224 @click="openSheet(idx)" :rightText="(item.sampleOrder ? '是' : '否') || '请选择'" showArrow>
165 <template v-slot:body> 225 <template v-slot:body>
166 <view class="item-title"><text>是否为试样订单</text></view> 226 <view class="item-title"><text>是否为试样订单</text></view>
@@ -310,7 +370,9 @@ export default { @@ -310,7 +370,9 @@ export default {
310 max: { type: Number, default: 8 }, 370 max: { type: Number, default: 8 },
311 totalQuantity: { type: Number, default: 0 }, 371 totalQuantity: { type: Number, default: 0 },
312 pageType: { type: String, default: '' }, 372 pageType: { type: String, default: '' },
313 - orderDate: { type: String, default: '' } 373 + orderDate: { type: String, default: '' },
  374 + canEditDeliveryAndAssessment: { type: Boolean, default: false },
  375 + // onlyEditDeliveryAndAssessment: { type: Boolean, default: false }
314 }, 376 },
315 data() { 377 data() {
316 return { 378 return {
@@ -358,7 +420,29 @@ export default { @@ -358,7 +420,29 @@ export default {
358 }, 420 },
359 methods: { 421 methods: {
360 defaultItem() { 422 defaultItem() {
361 - return { collapsed: false, packagingFee: '' } 423 + return {
  424 + collapsed: false,
  425 + industry: '',
  426 + quality: '',
  427 + brand: '',
  428 + thickness: '',
  429 + thicknessTolPos: '',
  430 + thicknessTolNeg: '',
  431 + width: '',
  432 + widthTolPos: '',
  433 + widthTolNeg: '',
  434 + length: '',
  435 + lengthTolPos: '',
  436 + lengthTolNeg: '',
  437 + status: '',
  438 + quantity: '',
  439 + salesPrice: '',
  440 + showSalesPrice: false,
  441 + packagingFee: '',
  442 + deliveryDate: '',
  443 + assessmentExceedsAgreement: '',
  444 + sampleOrder: ''
  445 + }
362 }, 446 },
363 toggleItem(idx) { 447 toggleItem(idx) {
364 const it = this.items[idx] 448 const it = this.items[idx]
@@ -707,7 +791,7 @@ export default { @@ -707,7 +791,7 @@ export default {
707 791
708 .block { 792 .block {
709 background: #ffffff; 793 background: #ffffff;
710 - padding: 32rpx 0; 794 + //padding: 32rpx 0;
711 margin-bottom: 20rpx; 795 margin-bottom: 20rpx;
712 796
713 &:last-child { 797 &:last-child {