Commit 3a71badb1cb6bb6a07f22fbb09b353f24027e726

Authored by 史婷婷
1 parent b67e6f38

feat: 产品试样确认单-编辑-暂存

@@ -154,9 +154,9 @@ export default { @@ -154,9 +154,9 @@ export default {
154 next.sampleQuantityRegulationName = m.sampleQuantityRegulation === true ? '是' : '否' 154 next.sampleQuantityRegulationName = m.sampleQuantityRegulation === true ? '是' : '否'
155 next.specificationQuantityRegulationName = m.specificationQuantityRegulation === true ? '是' : '否' 155 next.specificationQuantityRegulationName = m.specificationQuantityRegulation === true ? '是' : '否'
156 // 映射列表 156 // 映射列表
157 - // 注意:详情返回的是 replenishmentOrderLineList,需要赋值给 initPurchaseOrderLineList 以便 Product 组件初始化 157 + // 注意:详情返回的是 productSampleConfirmationSlipDetailList,需要赋值给 initPurchaseOrderLineList 以便 Product 组件初始化
158 // 且需要处理字段兼容性,确保 Product 组件能正确显示和编辑 158 // 且需要处理字段兼容性,确保 Product 组件能正确显示和编辑
159 - const lines = Array.isArray(m.replenishmentOrderLineList) ? m.replenishmentOrderLineList.map(x => ({ 159 + const lines = Array.isArray(m.productSampleConfirmationSlipDetailList) ? m.productSampleConfirmationSlipDetailList.map(x => ({
160 ...x, 160 ...x,
161 // 确保 Product 组件需要的字段存在 161 // 确保 Product 组件需要的字段存在
162 // Product组件使用: quantity(需发), shippedQuantity(实发), supplementaryQuantity(需求补货), salesPrice(单价) 162 // Product组件使用: quantity(需发), shippedQuantity(实发), supplementaryQuantity(需求补货), salesPrice(单价)
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <image class="opCollapse" src="/static/images/title.png" /> 6 <image class="opCollapse" src="/static/images/title.png" />
7 <text class="title">{{ title || '产品' }}</text> 7 <text class="title">{{ title || '产品' }}</text>
8 <view class="ops"> 8 <view class="ops">
9 - <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" /> 9 + <!-- <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" /> -->
10 <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse"> 10 <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse">
11 <image class="opAdd" :src="collapsedView ? '/static/images/down.png' : '/static/images/up.png'" /> 11 <image class="opAdd" :src="collapsedView ? '/static/images/down.png' : '/static/images/up.png'" />
12 <text class="op">{{ collapsedView ? '展开' : '收起' }} </text> 12 <text class="op">{{ collapsedView ? '展开' : '收起' }} </text>
@@ -17,122 +17,43 @@ @@ -17,122 +17,43 @@
17 17
18 <view v-if="mode === 'add'" class="section"> 18 <view v-if="mode === 'add'" class="section">
19 <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> 19 <view v-for="(item, idx) in items" :key="'a-' + idx" class="block">
20 - <uni-list class="edit-list">  
21 - <uni-list-item title="牌号">  
22 - <template v-slot:footer>  
23 - <uni-easyinput v-model="item.brand" placeholder="请输入牌号" :inputBorder="false" />  
24 - </template>  
25 - </uni-list-item>  
26 - <uni-list-item title="厚度(mm)">  
27 - <template v-slot:footer>  
28 - <uni-easyinput type="digit" v-model="item.thickness" placeholder="请输入厚度"  
29 - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'thickness')"  
30 - @blur="onNonNegativeNumberBlur(item, idx, 'thickness')" />  
31 - </template>  
32 - </uni-list-item>  
33 - <uni-list-item title="厚度公差上限(mm)">  
34 - <template v-slot:footer>  
35 - <uni-easyinput type="digit" v-model="item.thicknessTolPos" placeholder="请输入厚度公差上限"  
36 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'thicknessTolPos')"  
37 - @blur="onRealNumberBlur(item, idx, 'thicknessTolPos')" />  
38 - </template>  
39 - </uni-list-item>  
40 - <uni-list-item title="厚度公差下限(mm)">  
41 - <template v-slot:footer>  
42 - <uni-easyinput type="digit" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差下限"  
43 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'thicknessTolNeg')"  
44 - @blur="onRealNumberBlur(item, idx, 'thicknessTolNeg')" />  
45 - </template>  
46 - </uni-list-item>  
47 - <view v-show="!item.collapsed">  
48 - <uni-list-item title="宽度(mm)">  
49 - <template v-slot:footer>  
50 - <uni-easyinput type="digit" v-model="item.width" placeholder="请输入宽度"  
51 - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'width')"  
52 - @blur="onNonNegativeNumberBlur(item, idx, 'width')" />  
53 - </template>  
54 - </uni-list-item>  
55 - <uni-list-item title="宽度公差上限(mm)">  
56 - <template v-slot:footer>  
57 - <uni-easyinput type="digit" v-model="item.widthTolPos" placeholder="请输入宽度公差上限"  
58 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'widthTolPos')"  
59 - @blur="onRealNumberBlur(item, idx, 'widthTolPos')" />  
60 - </template>  
61 - </uni-list-item>  
62 - <uni-list-item title="宽度公差下限(mm)">  
63 - <template v-slot:footer>  
64 - <uni-easyinput type="digit" v-model="item.widthTolNeg" placeholder="请输入宽度公差下限"  
65 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'widthTolNeg')"  
66 - @blur="onRealNumberBlur(item, idx, 'widthTolNeg')" />  
67 - </template>  
68 - </uni-list-item>  
69 - <uni-list-item title="长度(mm)">  
70 - <template v-slot:footer>  
71 - <uni-easyinput type="digit" v-model="item.length" placeholder="请输入长度"  
72 - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'length')"  
73 - @blur="onNonNegativeNumberBlur(item, idx, 'length')" />  
74 - </template>  
75 - </uni-list-item>  
76 - <uni-list-item title="长度公差上限(mm)">  
77 - <template v-slot:footer>  
78 - <uni-easyinput type="digit" v-model="item.lengthTolPos" placeholder="请输入长度公差上限"  
79 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'lengthTolPos')"  
80 - @blur="onRealNumberBlur(item, idx, 'lengthTolPos')" />  
81 - </template>  
82 - </uni-list-item>  
83 - <uni-list-item title="长度公差下限(mm)">  
84 - <template v-slot:footer>  
85 - <uni-easyinput type="digit" v-model="item.lengthTolNeg" placeholder="请输入长度公差下限"  
86 - :inputBorder="false" @input="onRealNumberInput($event, item, idx, 'lengthTolNeg')"  
87 - @blur="onRealNumberBlur(item, idx, 'lengthTolNeg')" />  
88 - </template>  
89 - </uni-list-item>  
90 - <uni-list-item title="状态">  
91 - <template v-slot:footer>  
92 - <uni-easyinput v-model="item.status" placeholder="请输入状态" :inputBorder="false" />  
93 - </template>  
94 - </uni-list-item>  
95 - <uni-list-item title="需发数量(kg)">  
96 - <template v-slot:footer>  
97 - <uni-easyinput type="digit" v-model="item.quantity" placeholder="请输入数量kg"  
98 - :inputBorder="false"  
99 - @input="onTwoDecimalInput($event, item, idx, 'quantity')"  
100 - @blur="onTwoDecimalBlur(item, idx, 'quantity')"  
101 - />  
102 - </template>  
103 - </uni-list-item>  
104 - <uni-list-item title="实发数量(kg)">  
105 - <template v-slot:footer>  
106 - <uni-easyinput type="digit" v-model="item.shippedQuantity" placeholder="请输入实发数量kg"  
107 - :inputBorder="false"  
108 - @input="onTwoDecimalInput($event, item, idx, 'shippedQuantity')"  
109 - @blur="onTwoDecimalBlur(item, idx, 'shippedQuantity')"  
110 - />  
111 - </template>  
112 - </uni-list-item>  
113 - <uni-list-item title="需求补货数量(kg)">  
114 - <template v-slot:footer>  
115 - <uni-easyinput type="digit" v-model="item.supplementaryQuantity"  
116 - placeholder="请输入需求补货数量kg" :inputBorder="false"  
117 - @input="onTwoDecimalInput($event, item, idx, 'supplementaryQuantity')"  
118 - @blur="onTwoDecimalBlur(item, idx, 'supplementaryQuantity')"  
119 - />  
120 - </template>  
121 - </uni-list-item>  
122 - <uni-list-item class="amount-item">  
123 - <template v-slot:body>  
124 - <view class="item-title"><text>单价</text></view>  
125 - </template>  
126 - <template v-slot:footer>  
127 - <view class="amount-row">  
128 - <uni-easyinput type="digit" v-model="item.salesPrice" placeholder="0.00"  
129 - :inputBorder="false"  
130 - @input="onNonNegativeNumberInput($event, item, idx, 'salesPrice')"  
131 - @blur="onNonNegativeNumberBlur(item, idx, 'salesPrice')" />  
132 - <text class="unit">元</text> 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 +
  24 + <view v-show="!item.collapsed">
  25 + <!-- 厚(公差) * 宽(公差) * 长(公差) -->
  26 + <view class="row row-spec"><text class="label">规格(mm)</text>
  27 + <view class="value value-spec">
  28 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  29 + <view v-if="item.thickness" class="value-spec_box">
  30 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
133 </view> 31 </view>
134 - </template>  
135 - </uni-list-item> 32 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
  33 + </view>
  34 + </view>
  35 + <view v-if="item.width" class="value-spec_val p12">*</view>
  36 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  37 + <view v-if="item.width" class="value-spec_box">
  38 + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' + item.widthTolPos : item.widthTolPos }}</view>
  39 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}</view>
  40 + </view>
  41 + <view v-if="item.length" class="value-spec_val p12">*</view>
  42 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  43 + <view v-if="item.length" class="value-spec_box">
  44 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}</view>
  45 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}</view>
  46 + </view>
  47 + </view>
  48 + </view>
  49 + <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
  50 + <view class="row" :class="{ 'noneStyle': !item.showSalesPrice }"><text
  51 + class="label">数量kg</text><text class="value">{{ item.quantity }}</text>
  52 + </view>
  53 + <view class="row" :class="{ 'noneStyle': item.showSalesPrice }" v-if="item.showSalesPrice"><text
  54 + class="label">销售价格</text><text class="value">{{
  55 + item.salesPrice }}</text></view>
  56 + <uni-list class="edit-list">
136 <uni-list-item class="amount-item"> 57 <uni-list-item class="amount-item">
137 <template v-slot:body> 58 <template v-slot:body>
138 <view class="item-title"><text>包装费</text></view> 59 <view class="item-title"><text>包装费</text></view>
@@ -147,24 +68,23 @@ @@ -147,24 +68,23 @@
147 </view> 68 </view>
148 </template> 69 </template>
149 </uni-list-item> 70 </uni-list-item>
150 - <uni-list-item title="生产科(车间)确认交付时间"> 71 + <uni-list-item title="发货日期">
151 <template v-slot:footer> 72 <template v-slot:footer>
152 - <view class="value">{{ item.confirmedDeliveryDate }}</view> 73 + <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate"
  74 + @change="onDeliveryChange($event, item, idx)" />
153 </template> 75 </template>
154 </uni-list-item> 76 </uni-list-item>
155 - <uni-list-item title="备注"> 77 + <uni-list-item title="考核超协">
156 <template v-slot:footer> 78 <template v-slot:footer>
157 - <uni-easyinput v-model="item.remarks" placeholder="请输入备注" :inputBorder="false" /> 79 + <uni-easyinput :disabled="pageType === 'modify'"
  80 + v-model="item.assessmentExceedsAgreement"
  81 + :placeholder="pageType === 'modify' ? '' : '请输入考核超协'" :inputBorder="false" />
158 </template> 82 </template>
159 </uni-list-item> 83 </uni-list-item>
160 - </view>  
161 - </uni-list> 84 + </uni-list>
  85 + </view>
162 86
163 <view class="block-ops"> 87 <view class="block-ops">
164 - <div class="del" @click="onRemove(item.purchaseOrderId)">  
165 - <image src="/static/images/delete.png" class="icon" />  
166 - 删除  
167 - </div>  
168 <div class="toggle" @click="toggleItem(idx)"> 88 <div class="toggle" @click="toggleItem(idx)">
169 <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" 89 <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'"
170 class="icon" /> 90 class="icon" />