Commit 204bc7fa6430fc434254d118b2afce5fe34f2ebd

Authored by 史婷婷
1 parent f2be3f38

feat: 产品试样确认单-审核-三种

... ... @@ -2,65 +2,196 @@
2 2 <view class="page">
3 3 <scroll-view class="scroll" scroll-y>
4 4 <view class="detail-page">
5   - <view class="section">
6   - <text class="row company">{{ form.purchaseOrderName }}</text>
7   - <view class="row"><text class="label">补货单编号</text><text class="value">{{ form.code }}</text></view>
8   - <view class="row"><text class="label">分厂</text><text class="value">{{ form.workshopName }}</text>
  5 + <view v-if="isEditAll">
  6 + <view class="section">
  7 + <uni-list-item title="订货单位" class="no-border-top">
  8 + <template v-slot:footer>
  9 + <view class="readonly-text">{{ form.orderingUnitName }}</view>
  10 + </template>
  11 + </uni-list-item>
  12 + <uni-list-item class="select-item" :class="form.sampleTypeName ? 'is-filled' : 'is-empty'"
  13 + clickable @click="openSheet('sampleType')" :rightText="form.sampleTypeName || '请选择'"
  14 + showArrow>
  15 + <template v-slot:body>
  16 + <view class="item-title"><text>试样种类</text></view>
  17 + </template>
  18 + </uni-list-item>
  19 + <uni-list-item class="select-item" :class="form.customerTypeName ? 'is-filled' : 'is-empty'"
  20 + clickable @click="openSheet('customerType')" :rightText="form.customerTypeName || '请选择'"
  21 + showArrow>
  22 + <template v-slot:body>
  23 + <view class="item-title"><text>客户类型</text></view>
  24 + </template>
  25 + </uni-list-item>
  26 + <uni-list-item title="生产厂">
  27 + <template v-slot:footer>
  28 + <view class="readonly-text">{{ form.workshopName }}</view>
  29 + </template>
  30 + </uni-list-item>
  31 + <uni-list-item title="所属品种">
  32 + <template v-slot:footer>
  33 + <view class="readonly-text">{{ form.belongingBreed }}</view>
  34 + </template>
  35 + </uni-list-item>
  36 + <uni-list-item title="原供货同行">
  37 + <template v-slot:footer>
  38 + <uni-easyinput v-model="form.originalSupplierPeer" placeholder="请输入原供货同行"
  39 + :inputBorder="false" />
  40 + </template>
  41 + </uni-list-item>
9 42 </view>
10   - <view class="row"><text class="label">办事处</text><text class="value">{{ form.deptName }}</text>
11   - </view>
12   - <view class="row"><text class="label">区域</text><text class="value">{{ form.regionName }}</text>
  43 +
  44 + <!-- 产品 -->
  45 + <view class="section2">
  46 + <!-- mode="add" 允许编辑 -->
  47 + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"
  48 + :provideSamplesOptions="provideSamplesOptions"
  49 + :clearParametersOptions="clearParametersOptions" />
13 50 </view>
14   - <view class="row"><text class="label">购货单位</text><text class="value">{{ form.customerName }}</text>
  51 +
  52 + <view class="section3">
  53 + <view class="view-total">
  54 + <view class="head">合计</view>
  55 + <view class="row">
  56 + <view class="row2">
  57 + <text class="label">数量</text><text class="value">{{ form.totalQuantity }}</text>
  58 + </view>
  59 + </view>
  60 + </view>
15 61 </view>
16   - <view class="row"><text class="label">原计划发货日期</text><text class="value">{{ form.originPlanShipDate
17   - }}</text></view>
18   - </view>
19 62
20   - <!-- 产品 -->
21   - <view class="section2">
22   - <Product mode="approve" :list="initPurchaseOrderLineList"
23   - :canEditSupplementary="canEditSupplementary" @change="purchaseOrderLineListChange" />
  63 + <view class="section2">
  64 +
  65 + <uni-list-item class="select-item"
  66 + :class="form.sampleQuantityRegulationName ? 'is-filled' : 'is-empty'" clickable
  67 + @click="openSheet('sampleQuantityRegulation')"
  68 + :rightText="form.sampleQuantityRegulationName || '请选择'" showArrow>
  69 + <template v-slot:body>
  70 + <view class="item-title"><text>本次试样数量是否超规定</text></view>
  71 + </template>
  72 + </uni-list-item>
  73 +
  74 + <uni-list-item class="select-item"
  75 + :class="form.specificationQuantityRegulationName ? 'is-filled' : 'is-empty'" clickable
  76 + @click="openSheet('specificationQuantityRegulation')"
  77 + :rightText="form.specificationQuantityRegulationName || '请选择'" showArrow>
  78 + <template v-slot:body>
  79 + <view class="item-title"><text>试样规格个数是否超规定</text></view>
  80 + </template>
  81 + </uni-list-item>
  82 +
  83 + <uni-list-item title="试样次数">
  84 + <template v-slot:footer>
  85 + <uni-easyinput type="textarea" v-model="form.sampleFrequency" placeholder="请输入试样次数"
  86 + :inputBorder="false" />
  87 + </template>
  88 + </uni-list-item>
  89 +
  90 + <uni-list-item title="前期不合格描述">
  91 + <template v-slot:footer>
  92 + <uni-easyinput type="textarea" v-model="form.earlyNonconformityDescription"
  93 + placeholder="请输入前期不合格描述" :inputBorder="false" />
  94 + </template>
  95 + </uni-list-item>
  96 +
  97 + </view>
24 98 </view>
25   - <view class="section3">
26   - <view class="view-total">
27   - <view class="head">合计</view>
28   - <view class="row">
29   - <view class="row2">
30   - <text class="label">需发</text><text class="value">{{ form.totalQuantity }}</text>
31   - </view>
32   - <view class="row2">
33   - <text class="label">实发</text><text class="value">{{ form.totalShippedQuantity }}</text>
34   - </view>
  99 + <view v-else class="detail-section">
  100 + <view class="section">
  101 + <text class="row company">{{ form.orderingUnitName }}</text>
  102 + <view :class="['status', `status_${form.status}`]" />
  103 + <view class="row"><text class="label">试样种类</text><text class="value">{{ form.sampleTypeName
  104 + }}</text></view>
  105 + <view class="row"><text class="label">客户类型</text><text class="value">{{ form.customerTypeName
  106 + }}</text></view>
  107 + <view class="row"><text class="label">分厂</text><text class="value">{{ form.workshopName
  108 + }}</text></view>
  109 + <view class="row"><text class="label">所属品种</text><text class="value">{{ form.belongingBreed
  110 + }}</text></view>
  111 + <view class="row"><text class="label">原供货同行</text><text class="value">{{
  112 + form.originalSupplierPeer }}</text>
35 113 </view>
36   - <view class="row">
37   - <view class="row2">
38   - <text class="label">需求补货</text><text class="value">{{ form.totalSupplementaryQuantity
39   - }}</text>
  114 + </view>
  115 +
  116 + <!-- 产品 -->
  117 + <view class="section2">
  118 + <Product mode="view" :list="form.productSampleConfirmationSlipDetailList" />
  119 + </view>
  120 +
  121 + <view class="section3">
  122 + <view class="view-total">
  123 + <view class="head">合计</view>
  124 + <view class="row">
  125 + <view class="row2">
  126 + <text class="label">数量</text><text class="value">{{ form.totalQuantity }}</text>
  127 + </view>
40 128 </view>
41 129 </view>
42 130 </view>
  131 +
  132 + <view class="section">
  133 + <view class="row"><text class="label">数量</text><text class="value">{{ form.totalQuantity
  134 + }}</text></view>
  135 + <view class="row"><text class="label">本次试样数量是否超规定</text><text class="value">{{
  136 + form.sampleQuantityRegulation ?
  137 + '是' : '否' }}</text></view>
  138 + <view class="row"><text class="label">试样规格个数是否超规定</text><text class="value">{{
  139 + form.specificationQuantityRegulation ? '是' : '否' }}</text></view>
  140 + <view class="row"><text class="label">试样次数</text><text class="value">{{ form.sampleFrequency
  141 + }}</text></view>
  142 + <uni-list-item v-if="isEditEarlyNonconformityDescription" title="前期不合格描述">
  143 + <template v-slot:footer>
  144 + <uni-easyinput type="textarea" v-model="form.earlyNonconformityDescription"
  145 + placeholder="请输入前期不合格描述" :inputBorder="false" />
  146 + </template>
  147 + </uni-list-item>
  148 + <view v-else class="row"><text class="label">前期不合格描述</text><text class="value">{{
  149 + form.earlyNonconformityDescription
  150 + }}</text></view>
  151 + </view>
43 152 </view>
44 153
  154 +
45 155 </view>
46 156 </scroll-view>
  157 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  158 + v-model="sheet.value" @confirm="onSheetConfirm" />
47 159 </view>
48 160 </template>
49 161
50 162 <script>
51   -import { getDetailApi } from '@/api/replenishment_order.js'
  163 +import { getDetailApi } from '@/api/confirmation_form.js'
52 164 import Product from './product.vue'
53   -
  165 +import {
  166 + getDicByCodes
  167 +} from '@/utils/dic'
  168 +import SingleSelectSheet from '@/components/single-select/index.vue'
  169 +// 办事处内勤:可编辑 (编辑时的所有字段)
  170 +// 办事处主管:只能编辑 :前期不合格描述
  171 +// 其他人 :只能查看
54 172 export default {
55   - name: 'ReplenishmentOrderApprove',
56   - components: { Product },
  173 + name: 'ConfirmationFormApprove',
  174 + components: { Product, SingleSelectSheet },
57 175 props: { id: { type: [String, Number], default: '' } },
58 176 data() {
59 177 return {
60 178 form: {},
61 179 initPurchaseOrderLineList: [],
62 180 roleCodes: [],
63   - canEditSupplementary: false
  181 + canEditSupplementary: false,
  182 + isEditAll: false,
  183 + isEditEarlyNonconformityDescription: false,
  184 + sheet: { visible: false, title: '请选择', options: [], value: '', field: '' },
  185 + dicOptions: {
  186 + ENTERPRISE_TYPE: [], // 客户类型
  187 + SAMPLE_TYPE: [], // 试样种类
  188 + CLEAR_PARAMETERS: [], // 是否提供明确参数
  189 + PROVIDE_SAMPLES: [], // 是否提供样品
  190 + },
  191 + enterpriseTypeLocal: [], // 客户类型
  192 + sampleTypeLocal: [], // 试样种类
  193 + provideSamplesOptions: [], // 是否提供样品
  194 + clearParametersOptions: [], // 是否提供明确参数
64 195 }
65 196 },
66 197 computed: {
... ... @@ -72,6 +203,7 @@ export default {
72 203 const v = (val !== undefined && val !== null) ? String(val) : ''
73 204 if (v) {
74 205 this.loadDetail(v);
  206 + this.loadAllDicData()
75 207 this.getRoleInfo();
76 208 }
77 209 }
... ... @@ -84,10 +216,10 @@ export default {
84 216 getRoleInfo() {
85 217 this.roleCodes = this.$store.getters.roleCodes || [];
86 218 console.log('roleCodes', this.roleCodes)
87   - // 一分厂经营办计划员/二分厂经营办计划员/三分厂经营办计划员/四分厂经营办计划员
88   - const allowed = ['yfcjybjhy', 'efcjybjhy', 'sfcjybjhy', 'ztfcjybjhy'];
89   - this.canEditSupplementary = allowed.some((code) => this.roleCodes.includes(code));
90   - console.log('canEditSupplementary', this.canEditSupplementary)
  219 + // 办事处内勤:可编辑 (编辑时的所有字段) bscnq
  220 + this.isEditAll = this.roleCodes.includes('bscnq');
  221 + // 办事处主管:只能编辑 :前期不合格描述 bsczg
  222 + this.isEditEarlyNonconformityDescription = this.roleCodes.includes('bsczg');
91 223 },
92 224 async loadDetail(id) {
93 225 try {
... ... @@ -96,10 +228,12 @@ export default {
96 228 const next = { ...this.form, ...m }
97 229 // 确保ID存在
98 230 next.id = m.id || id
  231 + next.sampleQuantityRegulationName = m.sampleQuantityRegulation === true ? '是' : '否'
  232 + next.specificationQuantityRegulationName = m.specificationQuantityRegulation === true ? '是' : '否'
99 233 // 映射列表
100   - // 注意:详情返回的是 replenishmentOrderLineList,需要赋值给 initPurchaseOrderLineList 以便 Product 组件初始化
  234 + // 注意:详情返回的是 productSampleConfirmationSlipDetailList,需要赋值给 initPurchaseOrderLineList 以便 Product 组件初始化
101 235 // 且需要处理字段兼容性,确保 Product 组件能正确显示和编辑
102   - const lines = Array.isArray(m.replenishmentOrderLineList) ? m.replenishmentOrderLineList.map(x => ({
  236 + const lines = Array.isArray(m.productSampleConfirmationSlipDetailList) ? m.productSampleConfirmationSlipDetailList.map(x => ({
103 237 ...x,
104 238 // 确保 Product 组件需要的字段存在
105 239 // Product组件使用: quantity(需发), shippedQuantity(实发), supplementaryQuantity(需求补货), salesPrice(单价)
... ... @@ -109,12 +243,47 @@ export default {
109 243
110 244 this.form = next;
111 245 this.initPurchaseOrderLineList = lines;
112   - // 初始计算合计
113   - this.calculateSummary(lines)
114 246 } catch (e) {
115 247 this.form = {}
116 248 }
117 249 },
  250 + loadAllDicData() {
  251 + const dicCodes = ['ENTERPRISE_TYPE', 'SAMPLE_TYPE', 'CLEAR_PARAMETERS', 'PROVIDE_SAMPLES']
  252 + return getDicByCodes(dicCodes).then(results => {
  253 + this.dicOptions.ENTERPRISE_TYPE = results.ENTERPRISE_TYPE.data || []
  254 + this.dicOptions.SAMPLE_TYPE = results.SAMPLE_TYPE.data || []
  255 + this.dicOptions.CLEAR_PARAMETERS = results.CLEAR_PARAMETERS.data || []
  256 + this.dicOptions.PROVIDE_SAMPLES = results.PROVIDE_SAMPLES.data || []
  257 +
  258 + this.enterpriseTypeLocal = (this.dicOptions.ENTERPRISE_TYPE || []).map(it => ({
  259 + value: it.code,
  260 + label: it.name
  261 + }))
  262 + this.sampleTypeLocal = (this.dicOptions.SAMPLE_TYPE || []).map(it => ({
  263 + value: it.code,
  264 + label: it.name
  265 + }))
  266 + this.provideSamplesOptions = (this.dicOptions.PROVIDE_SAMPLES || []).map(it => ({
  267 + value: it.code,
  268 + label: it.name
  269 + }))
  270 + this.clearParametersOptions = (this.dicOptions.CLEAR_PARAMETERS || []).map(it => ({
  271 + value: it.code,
  272 + label: it.name
  273 + }))
  274 + }).catch(() => {
  275 + this.dicOptions = {
  276 + ENTERPRISE_TYPE: [], // 客户类型
  277 + SAMPLE_TYPE: [], // 试样种类
  278 + CLEAR_PARAMETERS: [], // 是否提供明确参数
  279 + PROVIDE_SAMPLES: [], // 是否提供样品
  280 + }
  281 + this.enterpriseTypeLocal = []
  282 + this.sampleTypeLocal = []
  283 + this.provideSamplesOptions = []
  284 + this.clearParametersOptions = []
  285 + })
  286 + },
118 287 calculateSummary(list) {
119 288 const summary = (list || []).reduce((acc, it) => {
120 289 const qty = Number(it.supplementaryQuantity) || 0
... ... @@ -135,41 +304,49 @@ export default {
135 304 },
136 305 purchaseOrderLineListChange(data) {
137 306 const list = Array.isArray(data) ? data : []
138   - this.form.purchaseOrderLineList = list
139   - this.calculateSummary(list)
  307 + this.form.productSampleConfirmationSlipDetailList = list
140 308 },
141 309 getFormValues() {
  310 + delete this.form.status;
142 311 const m = this.form || {}
143 312 return JSON.parse(JSON.stringify(m))
144 313 },
145 314 // 审批-通过:校验表单
146 315 checkForm() {
147   - if (this.canEditSupplementary) {
148   - const list = Array.isArray(this.form.purchaseOrderLineList) ? this.form.purchaseOrderLineList : [];
149   - console.log('checkForm__list', list)
150   - if (list.length === 0) {
151   - uni.showToast({ title: '请先添加产品', icon: 'none' })
152   - return false
153   - }
154   - const fields = [
155   - { key: 'supplementaryQuantity', label: '需求补货数量' },
156   - ]
157   - for (let i = 0; i < list.length; i++) {
158   - const it = list[i] || {}
159   - for (const f of fields) {
160   - const v = it && it[f.key]
161   - if (v === undefined || v === null || String(v).trim() === '') {
162   - uni.showToast({ title: `产品第${i + 1}条:${f.label}不能为空!`, icon: 'none' })
163   - return false
164   - }
165   - }
166   - }
167   - return true
168   - } else {
169   - return true
  316 + return true
  317 + },
  318 + openSheet(field) {
  319 + let options = []
  320 + let title = ''
  321 + let value = ''
  322 +
  323 + if (field === 'sampleType') {
  324 + title = '试样种类'
  325 + options = this.sampleTypeLocal
  326 + value = this.form.sampleType
  327 + } else if (field === 'customerType') {
  328 + title = '客户类型'
  329 + options = this.enterpriseTypeLocal
  330 + value = this.form.customerType
  331 + } else if (field === 'sampleQuantityRegulation') {
  332 + title = '本次试样数量是否超规定'
  333 + options = [{ value: true, label: '是' }, { value: false, label: '否' }]
  334 + value = this.form.sampleQuantityRegulation
  335 + } else if (field === 'specificationQuantityRegulation') {
  336 + title = '试样规格个数是否超规定'
  337 + options = [{ value: true, label: '是' }, { value: false, label: '否' }]
  338 + value = this.form.specificationQuantityRegulation
170 339 }
171 340
172   - }
  341 + const match = options.find(o => String(o.value) === String(value))
  342 + this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' }
  343 + },
  344 + onSheetConfirm({ value, label }) {
  345 + const field = this.sheet.field
  346 + this.form[field] = value
  347 + this.form[field + 'Name'] = label
  348 + this.sheet.visible = false
  349 + },
173 350 }
174 351 }
175 352 </script>
... ... @@ -256,7 +433,7 @@ export default {
256 433 .section3 {
257 434 padding: 0 32rpx;
258 435 background-color: #fff;
259   - margin-top: 20rpx;
  436 + margin-bottom: 20rpx;
260 437 }
261 438
262 439 .view-total {
... ... @@ -297,4 +474,128 @@ export default {
297 474 }
298 475 }
299 476 }
  477 +
  478 +::v-deep .no-border-top {
  479 + .uni-list--border::after {
  480 + background-color: transparent;
  481 + }
  482 +}
  483 +
  484 +.detail-section {
  485 +
  486 + .section {
  487 + padding: 32rpx;
  488 + background: #fff;
  489 + margin-bottom: 20rpx;
  490 + position: relative;
  491 +
  492 +
  493 + }
  494 +
  495 + .row {
  496 + display: flex;
  497 + margin-bottom: 28rpx;
  498 +
  499 + &:last-child {
  500 + margin-bottom: 0;
  501 + }
  502 +
  503 + &.company {
  504 + font-size: 36rpx;
  505 + font-weight: 600;
  506 + color: rgba(0, 0, 0, 0.9);
  507 + padding-top: 10rpx;
  508 + margin-bottom: 32rpx;
  509 + line-height: 50rpx;
  510 + }
  511 +
  512 + .label {
  513 + max-width: 400rpx;
  514 + margin-right: 20rpx;
  515 + line-height: 32rpx;
  516 + font-size: 28rpx;
  517 + color: rgba(0, 0, 0, 0.6);
  518 + }
  519 +
  520 + .value {
  521 + flex: 1;
  522 + line-height: 32rpx;
  523 + font-size: 28rpx;
  524 + color: rgba(0, 0, 0, 0.9);
  525 + text-align: right;
  526 + word-break: break-all;
  527 + }
  528 + }
  529 +
  530 + .title-header {
  531 + background-color: #fff;
  532 + display: flex;
  533 + align-items: center;
  534 + padding: 32rpx 32rpx 22rpx;
  535 + border-bottom: 1rpx dashed #f0f0f0;
  536 +
  537 + &_icon {
  538 + width: 32rpx;
  539 + height: 28rpx;
  540 + margin-right: 16rpx;
  541 + }
  542 +
  543 + span {
  544 + color: rgba(0, 0, 0, 0.9);
  545 + font-size: 32rpx;
  546 + line-height: 44rpx;
  547 + font-weight: 600;
  548 + }
  549 + }
  550 +
  551 + .section2 {
  552 + background: #f1f1f1;
  553 + }
  554 +
  555 +
  556 + .section3 {
  557 + padding: 0 32rpx;
  558 + background-color: #fff;
  559 + margin: 20rpx 0;
  560 + }
  561 +
  562 + .view-total {
  563 + padding-bottom: 20rpx;
  564 +
  565 + .head {
  566 + font-size: 32rpx;
  567 + font-weight: 600;
  568 + line-height: 50rpx;
  569 + color: rgba(0, 0, 0, 0.9);
  570 + padding-bottom: 16rpx;
  571 + margin-bottom: 24rpx;
  572 + border-bottom: 1px dashed #E7E7E7;
  573 + }
  574 +
  575 + .row {
  576 + display: flex;
  577 + margin-bottom: 24rpx;
  578 + line-height: 32rpx;
  579 +
  580 + .row2 {
  581 + width: 50%;
  582 + }
  583 +
  584 + .label {
  585 + width: 180rpx;
  586 + margin-right: 14rpx;
  587 + color: rgba(0, 0, 0, 0.6);
  588 + font-size: 28rpx;
  589 + }
  590 +
  591 + .value {
  592 + flex: 1;
  593 + color: rgba(0, 0, 0, 0.9);
  594 + font-size: 28rpx;
  595 + white-space: pre-wrap;
  596 + word-break: break-all;
  597 + }
  598 + }
  599 + }
  600 +}
300 601 </style>
... ...
... ... @@ -9,7 +9,8 @@
9 9 <view class="row"><text class="label">客户类型</text><text class="value">{{ form.customerTypeName }}</text></view>
10 10 <view class="row"><text class="label">分厂</text><text class="value">{{ form.workshopName }}</text></view>
11 11 <view class="row"><text class="label">所属品种</text><text class="value">{{ form.belongingBreed }}</text></view>
12   - <view class="row"><text class="label">原供货同行</text><text class="value">{{ form.originalSupplierPeer }}</text></view>
  12 + <view class="row"><text class="label">原供货同行</text><text class="value">{{ form.originalSupplierPeer }}</text>
  13 + </view>
13 14 </view>
14 15
15 16 <!-- 产品 -->
... ... @@ -17,12 +18,26 @@
17 18 <Product mode="view" :list="form.productSampleConfirmationSlipDetailList" />
18 19 </view>
19 20
20   - <view class="section">
  21 + <view class="section3">
  22 + <view class="view-total">
  23 + <view class="head">合计</view>
  24 + <view class="row">
  25 + <view class="row2">
  26 + <text class="label">数量</text><text class="value">{{ form.totalQuantity }}</text>
  27 + </view>
  28 + </view>
  29 + </view>
  30 + </view>
  31 +
  32 + <view class="section">
21 33 <view class="row"><text class="label">数量</text><text class="value">{{ form.totalQuantity }}</text></view>
22   - <view class="row"><text class="label">本次试样数量是否超规定</text><text class="value">{{ form.sampleQuantityRegulation ? '是' : '否' }}</text></view>
23   - <view class="row"><text class="label">试样规格个数是否超规定</text><text class="value">{{ form.specificationQuantityRegulation ? '是' : '否' }}</text></view>
  34 + <view class="row"><text class="label">本次试样数量是否超规定</text><text class="value">{{ form.sampleQuantityRegulation ?
  35 + '是' : '否' }}</text></view>
  36 + <view class="row"><text class="label">试样规格个数是否超规定</text><text class="value">{{
  37 + form.specificationQuantityRegulation ? '是' : '否' }}</text></view>
24 38 <view class="row"><text class="label">试样次数</text><text class="value">{{ form.sampleFrequency }}</text></view>
25   - <view class="row"><text class="label">前期不合格描述</text><text class="value">{{ form.earlyNonconformityDescription }}</text></view>
  39 + <view class="row"><text class="label">前期不合格描述</text><text class="value">{{ form.earlyNonconformityDescription
  40 + }}</text></view>
26 41 </view>
27 42 </view>
28 43 </scroll-view>
... ... @@ -106,7 +121,7 @@ export default {
106 121 uni.setStorageSync('sourceBusinessId', this.form.id)
107 122 uni.navigateTo({ url: '/pages/flow/audit' })
108 123 },
109   -
  124 +
110 125 }
111 126 }
112 127 </script>
... ... @@ -143,7 +158,7 @@ export default {
143 158 background-size: 100% 100%;
144 159 background-position: center;
145 160
146   - &_AUDIT {
  161 + &_AUDIT {
147 162 background-image: url('~@/static/images/dev_manage/status_1.png');
148 163 }
149 164
... ... @@ -217,8 +232,54 @@ export default {
217 232 font-weight: 600;
218 233 }
219 234 }
  235 +
220 236 .section2 {
221 237 background: #f1f1f1;
222   - margin-bottom: 20rpx;
  238 +}
  239 +
  240 +
  241 +.section3 {
  242 + padding: 0 32rpx;
  243 + background-color: #fff;
  244 + margin: 20rpx 0;
  245 +}
  246 +
  247 +.view-total {
  248 + padding-bottom: 20rpx;
  249 +
  250 + .head {
  251 + font-size: 32rpx;
  252 + font-weight: 600;
  253 + line-height: 50rpx;
  254 + color: rgba(0, 0, 0, 0.9);
  255 + padding-bottom: 16rpx;
  256 + margin-bottom: 24rpx;
  257 + border-bottom: 1px dashed #E7E7E7;
  258 + }
  259 +
  260 + .row {
  261 + display: flex;
  262 + margin-bottom: 24rpx;
  263 + line-height: 32rpx;
  264 +
  265 + .row2 {
  266 + width: 50%;
  267 + }
  268 +
  269 + .label {
  270 + width: 180rpx;
  271 + margin-right: 14rpx;
  272 + color: rgba(0, 0, 0, 0.6);
  273 + font-size: 28rpx;
  274 + }
  275 +
  276 + .value {
  277 + flex: 1;
  278 + color: rgba(0, 0, 0, 0.9);
  279 + font-size: 28rpx;
  280 + white-space: pre-wrap;
  281 + word-break: break-all;
  282 + }
  283 + }
223 284 }
224 285 </style>
... ...
... ... @@ -83,116 +83,6 @@
83 83 </view>
84 84 </view>
85 85
86   - <view v-else-if="mode === 'approve'" class="section">
87   - <view v-for="(item, idx) in items" :key="'a-' + idx" class="block">
88   - <uni-list class="edit-list">
89   - <uni-list-item title="牌号">
90   - <template v-slot:footer>
91   - <text class="value">{{ item.brand }}</text>
92   - </template>
93   - </uni-list-item>
94   - <!-- 厚(公差) * 宽(公差) * 长(公差) -->
95   - <uni-list-item title="规格(mm)">
96   - <template v-slot:footer>
97   - <view class="value value-spec">
98   - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
99   - <view v-if="item.thickness" class="value-spec_box">
100   - <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos >
101   - 0 ? '+'
102   - +
103   - item.thicknessTolPos : item.thicknessTolPos }}
104   - </view>
105   - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg >
106   - 0 ? '+'
107   - +
108   - item.thicknessTolNeg : item.thicknessTolNeg }}
109   - </view>
110   - </view>
111   - <view v-if="item.width" class="value-spec_val p12">*</view>
112   - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
113   - <view v-if="item.width" class="value-spec_box">
114   - <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+'
115   - +
116   - item.widthTolPos : item.widthTolPos }}
117   - </view>
118   - <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+'
119   - +
120   - item.widthTolNeg : item.widthTolNeg }}
121   - </view>
122   - </view>
123   - <view v-if="item.length" class="value-spec_val p12">*</view>
124   - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
125   - <view v-if="item.length" class="value-spec_box">
126   - <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ?
127   - '+' +
128   - item.lengthTolPos : item.lengthTolPos }}
129   - </view>
130   - <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ?
131   - '+' +
132   - item.lengthTolNeg : item.lengthTolNeg }}
133   - </view>
134   - </view>
135   - </view>
136   - </template>
137   - </uni-list-item>
138   - <view v-show="!item.collapsed">
139   - <uni-list-item title="状态">
140   - <template v-slot:footer>
141   - <text class="value">{{ item.status }}</text>
142   - </template>
143   - </uni-list-item>
144   - <uni-list-item title="需发数量(kg)">
145   - <template v-slot:footer>
146   - <text class="value">{{ item.quantity }}</text>
147   - </template>
148   - </uni-list-item>
149   - <uni-list-item title="实发数量(kg)">
150   - <template v-slot:footer>
151   - <text class="value">{{ item.shippedQuantity }}</text>
152   - </template>
153   - </uni-list-item>
154   - <uni-list-item title="需求补货数量(kg)">
155   - <template v-slot:footer>
156   - <uni-easyinput v-if="canEditSupplementary" type="digit"
157   - v-model="item.supplementaryQuantity" placeholder="请输入需求补货数量kg" :inputBorder="false"
158   - @input="onTwoDecimalInput($event, item, idx, 'supplementaryQuantity')"
159   - @blur="onTwoDecimalBlur(item, idx, 'supplementaryQuantity')" />
160   - <text v-else class="value">{{ item.supplementaryQuantity }}</text>
161   - </template>
162   - </uni-list-item>
163   - <uni-list-item class="amount-item" title="单价(元/kg)">
164   - <template v-slot:footer>
165   - <text class="value">{{ item.salesPrice }}</text>
166   - </template>
167   - </uni-list-item>
168   - <uni-list-item class="amount-item" title="包装费(元/kg)">
169   - <template v-slot:footer>
170   - <text class="value">{{ item.packagingFee }}</text>
171   - </template>
172   - </uni-list-item>
173   - <uni-list-item title="生产科(车间)确认交付时间">
174   - <template v-slot:footer>
175   - <text class="value">{{ item.confirmedDeliveryDate }}</text>
176   - </template>
177   - </uni-list-item>
178   - <uni-list-item title="备注">
179   - <template v-slot:footer>
180   - <text class="value">{{ item.remarks }}元</text>
181   - </template>
182   - </uni-list-item>
183   - </view>
184   - </uni-list>
185   -
186   - <view class="block-ops">
187   - <div class="toggle" @click="toggleItem(idx)">
188   - <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'"
189   - class="icon" />
190   - {{ item.collapsed ? '展开' : '收起' }}
191   - </div>
192   - </view>
193   - </view>
194   - </view>
195   -
196 86 <view v-else-if="mode === 'view'" class="view-list" v-show="!collapsedView">
197 87 <view v-for="(item, idx) in items" :key="'v-' + idx" class="card">
198 88 <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view>
... ... @@ -758,7 +648,7 @@ export default {
758 648 // margin-bottom: 24rpx;
759 649 line-height: 32rpx;
760 650 padding: 32rpx;
761   - border-bottom: 1rpx solid #f2f2f2;
  651 + border-bottom: 1rpx solid #f2f2f2 !important;
762 652
763 653
764 654 &.noneStyle {
... ...
... ... @@ -257,6 +257,7 @@ export default {
257 257 },
258 258 // 驳回
259 259 onReject() {
  260 + console.log('FormValues__', this.$refs.basicRef.getFormValues());
260 261 this.approveType = 'REFUSE'
261 262 this.message = ''
262 263 this.$refs.approvePopup.open()
... ... @@ -264,6 +265,7 @@ export default {
264 265 // 通过
265 266 // 在这里增加业务判断 比如 资信管理,判断有没有填写客户信息、公司评审(这些是不同角色进行操作的)
266 267 onPass() {
  268 + console.log('FormValues__', this.$refs.basicRef.getFormValues());
267 269 // 校验表单
268 270 if (!this.basicRefCheck()) {
269 271 return
... ...
... ... @@ -12,8 +12,8 @@ import RestockApprovalViewer from '@/pages/replenishment_order/viewer.vue'
12 12 import RestockApprovalApprove from '@/pages/replenishment_order/approve.vue'
13 13 import DraftOrderViewer from '@/pages/draft_order/viewer.vue'
14 14 import DelayedShipmentViewer from '@/pages/delay_invoice/viewer.vue'
15   -import ConfirmationDormViewer from '@/pages/confirmation_form/viewer.vue'
16   -import ConfirmationDormApprove from '@/pages/confirmation_form/approve.vue'
  15 +import ConfirmationFormViewer from '@/pages/confirmation_form/viewer.vue'
  16 +import ConfirmationFormApprove from '@/pages/confirmation_form/approve.vue'
17 17
18 18 export default function registerComponents(Vue) {
19 19 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
... ... @@ -30,6 +30,6 @@ export default function registerComponents(Vue) {
30 30 Vue.component('RestockApprovalApprove', RestockApprovalApprove)
31 31 Vue.component('DraftOrderViewer', DraftOrderViewer)
32 32 Vue.component('DelayedShipmentViewer', DelayedShipmentViewer)
33   - Vue.component('ConfirmationDormViewer', ConfirmationDormViewer)
34   - Vue.component('ConfirmationDormApprove', ConfirmationDormApprove)
  33 + Vue.component('ConfirmationFormViewer', ConfirmationFormViewer)
  34 + Vue.component('ConfirmationFormApprove', ConfirmationFormApprove)
35 35 }
\ No newline at end of file
... ...
... ... @@ -80,10 +80,10 @@ export const getSysFlowComponentPath = (bizFlag) => {
80 80 case 'DELAYED_SHIPMENT_EDIT': // 延期发货单
81 81 componentPath = 'DelayedShipmentViewer'; // 延期发货单-审批
82 82 case 'CONFIRMATION_SLIP': // 产品试样确认单
83   - componentPath = 'ConfirmationDormViewer'; // 产品试样确认单-审批详情
  83 + componentPath = 'ConfirmationFormViewer'; // 产品试样确认单-审批详情
84 84 break;
85 85 case 'CONFIRMATION_SLIP_EDIT': // 产品试样确认单
86   - componentPath = 'ConfirmationDormApprove'; // 产品试样确认单-审批
  86 + componentPath = 'ConfirmationFormApprove'; // 产品试样确认单-审批
87 87 break;
88 88 }
89 89 return componentPath;
... ...