Showing
3 changed files
with
789 additions
and
135 deletions
| ... | ... | @@ -189,6 +189,14 @@ |
| 189 | 189 | } |
| 190 | 190 | }, |
| 191 | 191 | { |
| 192 | + "path": "pages/order_list/modify", | |
| 193 | + "style": { | |
| 194 | + "navigationBarTitleText": "订货单编辑", | |
| 195 | + "navigationBarBackgroundColor": "#ffffff", | |
| 196 | + "navigationBarTextStyle": "black" | |
| 197 | + } | |
| 198 | + }, | |
| 199 | + { | |
| 192 | 200 | "path": "pages/contract_framework/index", |
| 193 | 201 | "style": { |
| 194 | 202 | "navigationBarTitleText": "框架合同", | ... | ... |
pages/order_list/modify.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="page"> | |
| 3 | + <scroll-view class="scroll" scroll-y> | |
| 4 | + <uni-list> | |
| 5 | + <view class="section"> | |
| 6 | + <uni-list-item title="订单编号"> | |
| 7 | + <template v-slot:footer> | |
| 8 | + <view class="readonly-text">{{ form.orderNo }}</view> | |
| 9 | + </template> | |
| 10 | + </uni-list-item> | |
| 11 | + <uni-list-item title="供货单位"> | |
| 12 | + <template v-slot:footer> | |
| 13 | + <view class="readonly-text">{{ getDicName('SUPPLIER', form.supplyUnit, dicOptions.SUPPLIER) }}</view> | |
| 14 | + </template> | |
| 15 | + </uni-list-item> | |
| 16 | + <uni-list-item title="订货单位"> | |
| 17 | + <template v-slot:footer> | |
| 18 | + <view class="readonly-text">{{ form.orderingUnitName }}</view> | |
| 19 | + </template> | |
| 20 | + </uni-list-item> | |
| 21 | + <uni-list-item title="订货日期"> | |
| 22 | + <template v-slot:footer> | |
| 23 | + <view class="readonly-text">{{ form.orderDate }}</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.settlementTerms }}</view> | |
| 34 | + </template> | |
| 35 | + </uni-list-item> | |
| 36 | + | |
| 37 | + <uni-list-item title="交货方式"> | |
| 38 | + <template v-slot:footer> | |
| 39 | + <uni-easyinput v-model="form.deliveryMethod" placeholder="请输入交货方式" :inputBorder="false" /> | |
| 40 | + </template> | |
| 41 | + </uni-list-item> | |
| 42 | + </view> | |
| 43 | + | |
| 44 | + <!-- 产品 --> | |
| 45 | + <view class="section2"> | |
| 46 | + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" /> | |
| 47 | + </view> | |
| 48 | + | |
| 49 | + <view class="section"> | |
| 50 | + <uni-list-item title="价格表编号"> | |
| 51 | + <template v-slot:footer> | |
| 52 | + <uni-easyinput v-model="form.priceListNo" placeholder="请输入价格表编号" :inputBorder="false" /> | |
| 53 | + </template> | |
| 54 | + </uni-list-item> | |
| 55 | + <uni-list-item title="开票情况"> | |
| 56 | + <template v-slot:footer> | |
| 57 | + <uni-easyinput v-model="form.invoicingStatus" placeholder="请输入开票情况" :inputBorder="false" /> | |
| 58 | + </template> | |
| 59 | + </uni-list-item> | |
| 60 | + <uni-list-item class="amount-item"> | |
| 61 | + <template v-slot:body> | |
| 62 | + <view class="item-title"><text>运费</text></view> | |
| 63 | + </template> | |
| 64 | + <template v-slot:footer> | |
| 65 | + <view class="amount-row"> | |
| 66 | + <uni-easyinput type="number" v-model="form.shippingCost" placeholder="0.00" :inputBorder="false" /> | |
| 67 | + <text class="unit">元</text> | |
| 68 | + </view> | |
| 69 | + </template> | |
| 70 | + </uni-list-item> | |
| 71 | + <uni-list-item class="amount-item"> | |
| 72 | + <template v-slot:body> | |
| 73 | + <view class="item-title"><text>包装费</text></view> | |
| 74 | + </template> | |
| 75 | + <template v-slot:footer> | |
| 76 | + <view class="amount-row"> | |
| 77 | + <uni-easyinput type="number" v-model="form.packagingFee" placeholder="0.00" :inputBorder="false" /> | |
| 78 | + <text class="unit">元</text> | |
| 79 | + </view> | |
| 80 | + </template> | |
| 81 | + </uni-list-item> | |
| 82 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | |
| 83 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | |
| 84 | + <template v-slot:body> | |
| 85 | + <view class="item-title"><text>执行标准</text></view> | |
| 86 | + </template> | |
| 87 | + </uni-list-item> | |
| 88 | + </view> | |
| 89 | + | |
| 90 | + | |
| 91 | + <view class="title-header"> | |
| 92 | + <image class="title-header_icon" src="/static/images/title.png" /> | |
| 93 | + <span>具体质量要求</span> | |
| 94 | + </view> | |
| 95 | + | |
| 96 | + <uni-list-item title="件重条头"> | |
| 97 | + <template v-slot:footer> | |
| 98 | + <uni-easyinput type="textarea" v-model="form.pieceWeightHeader" placeholder="请输入件重条头" | |
| 99 | + :inputBorder="false" /> | |
| 100 | + </template> | |
| 101 | + </uni-list-item> | |
| 102 | + <uni-list-item title="表面"> | |
| 103 | + <template v-slot:footer> | |
| 104 | + <uni-easyinput type="textarea" v-model="form.surface" placeholder="请输入表面" :inputBorder="false" /> | |
| 105 | + </template> | |
| 106 | + </uni-list-item> | |
| 107 | + <uni-list-item title="公差"> | |
| 108 | + <template v-slot:footer> | |
| 109 | + <uni-easyinput type="textarea" v-model="form.tolerance" placeholder="请输入公差" :inputBorder="false" /> | |
| 110 | + </template> | |
| 111 | + </uni-list-item> | |
| 112 | + <uni-list-item title="性能"> | |
| 113 | + <template v-slot:footer> | |
| 114 | + <uni-easyinput type="textarea" v-model="form.performance" placeholder="请输入性能" :inputBorder="false" /> | |
| 115 | + </template> | |
| 116 | + </uni-list-item> | |
| 117 | + <uni-list-item title="成分"> | |
| 118 | + <template v-slot:footer> | |
| 119 | + <uni-easyinput type="textarea" v-model="form.element" placeholder="请输入成分" :inputBorder="false" /> | |
| 120 | + </template> | |
| 121 | + </uni-list-item> | |
| 122 | + <uni-list-item title="包装"> | |
| 123 | + <template v-slot:footer> | |
| 124 | + <uni-easyinput type="textarea" v-model="form.packaging" placeholder="请输入包装" :inputBorder="false" /> | |
| 125 | + </template> | |
| 126 | + </uni-list-item> | |
| 127 | + <uni-list-item title="备注"> | |
| 128 | + <template v-slot:footer> | |
| 129 | + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" /> | |
| 130 | + </template> | |
| 131 | + </uni-list-item> | |
| 132 | + | |
| 133 | + | |
| 134 | + </uni-list> | |
| 135 | + </scroll-view> | |
| 136 | + | |
| 137 | + <view class="footer"> | |
| 138 | + <view class="view-total"> | |
| 139 | + <view class="head">合计</view> | |
| 140 | + <view class="row"> | |
| 141 | + <text class="label">总数量</text><text class="value">{{ form.totalQuantity }}</text> | |
| 142 | + </view> | |
| 143 | + </view> | |
| 144 | + <button class="btn submit" type="primary" @click="onSubmit">提交</button> | |
| 145 | + </view> | |
| 146 | + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" | |
| 147 | + @confirm="onSheetConfirm" /> | |
| 148 | + </view> | |
| 149 | +</template> | |
| 150 | + | |
| 151 | +<script> | |
| 152 | +import { getDetailApi, updateApi } from '@/api/order_list.js' | |
| 153 | +import Product from './product.vue' | |
| 154 | +import SingleSelectSheet from '@/components/single-select/index.vue' | |
| 155 | +import { getDicName } from '@/utils/dic.js' | |
| 156 | +import { getDicByCodes } from '@/utils/dic' | |
| 157 | + | |
| 158 | +export default { | |
| 159 | + name: 'OrderListModify', | |
| 160 | + components: { Product, SingleSelectSheet }, | |
| 161 | + data() { | |
| 162 | + return { | |
| 163 | + id: '', | |
| 164 | + form: { | |
| 165 | + id: '', | |
| 166 | + orderNo: '', | |
| 167 | + supplyUnit: '', | |
| 168 | + orderingUnitName: '', | |
| 169 | + orderDate: '', | |
| 170 | + examineStatus: '', | |
| 171 | + workshopName: '', | |
| 172 | + settlementTerms: '', | |
| 173 | + deliveryMethod: '', | |
| 174 | + priceListNo: '', | |
| 175 | + invoicingStatus: '', | |
| 176 | + shippingCost: '', | |
| 177 | + packagingFee: '', | |
| 178 | + executionStandard: '', | |
| 179 | + executionStandardName: '', | |
| 180 | + pieceWeightHeader: '', | |
| 181 | + surface: '', | |
| 182 | + tolerance: '', | |
| 183 | + performance: '', | |
| 184 | + element: '', | |
| 185 | + packaging: '', | |
| 186 | + remarks: '', | |
| 187 | + purchaseOrderLineList: [], | |
| 188 | + totalQuantity: 0, | |
| 189 | + }, | |
| 190 | + initPurchaseOrderLineList: [], | |
| 191 | + dicOptions: { SUPPLIER: [], APPLICABLE_STANDARD: [], AUDIT_STATUS: [] }, | |
| 192 | + sheet: { visible: false, title: '请选择', options: [], value: '', field: '' } | |
| 193 | + } | |
| 194 | + }, | |
| 195 | + onLoad(query) { | |
| 196 | + this.id = (query && (query.id || query.code)) || '' | |
| 197 | + if (this.id) this.loadDetail(this.id) | |
| 198 | + this.loadDicOptions() | |
| 199 | + }, | |
| 200 | + methods: { | |
| 201 | + loadDicOptions() { | |
| 202 | + const dicCodes = ['SUPPLIER', 'APPLICABLE_STANDARD', 'AUDIT_STATUS'] | |
| 203 | + return getDicByCodes(dicCodes).then(results => { | |
| 204 | + this.dicOptions.SUPPLIER = results.SUPPLIER && results.SUPPLIER.data ? results.SUPPLIER.data : [] | |
| 205 | + this.dicOptions.APPLICABLE_STANDARD = results.APPLICABLE_STANDARD && results.APPLICABLE_STANDARD.data ? results.APPLICABLE_STANDARD.data : [] | |
| 206 | + this.dicOptions.AUDIT_STATUS = results.AUDIT_STATUS && results.AUDIT_STATUS.data ? results.AUDIT_STATUS.data : [] | |
| 207 | + this.refreshStandardName() | |
| 208 | + }).catch(() => { this.dicOptions = { SUPPLIER: [], APPLICABLE_STANDARD: [], AUDIT_STATUS: [] } }) | |
| 209 | + }, | |
| 210 | + async loadDetail(id) { | |
| 211 | + try { | |
| 212 | + const res = await getDetailApi(id) | |
| 213 | + const m = res.data || {} | |
| 214 | + const next = { ...this.form, ...m } | |
| 215 | + next.id = m.id || m.code || id | |
| 216 | + next.purchaseOrderLineList = Array.isArray(m.purchaseOrderLineList) ? m.purchaseOrderLineList.map(x => ({ ...x })) : [] | |
| 217 | + this.form = next; | |
| 218 | + this.initPurchaseOrderLineList = next.purchaseOrderLineList || []; | |
| 219 | + this.refreshStandardName() | |
| 220 | + } catch (e) { | |
| 221 | + uni.showToast({ title: '加载失败', icon: 'none' }) | |
| 222 | + } | |
| 223 | + }, | |
| 224 | + refreshStandardName() { | |
| 225 | + const est = (this.dicOptions.APPLICABLE_STANDARD || []).find(o => String(o.code) === String(this.form.executionStandard)) | |
| 226 | + this.form.executionStandardName = est ? (est.name || '') : (this.form.executionStandardName || '') | |
| 227 | + }, | |
| 228 | + openSheet(field) { | |
| 229 | + if (field === 'executionStandard') { | |
| 230 | + const options = (this.dicOptions.APPLICABLE_STANDARD || []).map(it => ({ label: it.name || '', value: it.code || '' })) | |
| 231 | + const current = this.form.executionStandard | |
| 232 | + const match = options.find(o => String(o.value) === String(current)) | |
| 233 | + this.sheet = { ...this.sheet, visible: true, title: '执行标准', options, field, value: match ? match.value : '' } | |
| 234 | + } | |
| 235 | + }, | |
| 236 | + onSheetConfirm({ value, label }) { | |
| 237 | + const field = this.sheet.field | |
| 238 | + if (field === 'executionStandard') { | |
| 239 | + this.form.executionStandard = value || '' | |
| 240 | + this.form.executionStandardName = label || '' | |
| 241 | + } | |
| 242 | + this.sheet.visible = false | |
| 243 | + }, | |
| 244 | + getDicName: getDicName, | |
| 245 | + async onSubmit() { | |
| 246 | + const payload = { ...this.form } | |
| 247 | + console.log('onSubmit__payload', payload) | |
| 248 | + try { | |
| 249 | + await updateApi(payload) | |
| 250 | + uni.showToast({ title: '保存成功', icon: 'success' }) | |
| 251 | + setTimeout(() => { uni.redirectTo({ url: '/pages/order_list/index' }) }, 300) | |
| 252 | + } catch (e) { | |
| 253 | + uni.showToast({ title: (e && e.msg) || '保存失败', icon: 'none' }) | |
| 254 | + } | |
| 255 | + }, | |
| 256 | + purchaseOrderLineListChange(data) { | |
| 257 | + const list = Array.isArray(data) ? data : [] | |
| 258 | + this.form.purchaseOrderLineList = list; | |
| 259 | + }, | |
| 260 | + } | |
| 261 | +} | |
| 262 | +</script> | |
| 263 | + | |
| 264 | +<style lang="scss" scoped> | |
| 265 | +.page { | |
| 266 | + display: flex; | |
| 267 | + flex-direction: column; | |
| 268 | + height: 100%; | |
| 269 | +} | |
| 270 | + | |
| 271 | +.scroll { | |
| 272 | + flex: 1; | |
| 273 | + padding: 6rpx 0 310rpx; | |
| 274 | +} | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | +.title-header { | |
| 279 | + background-color: #fff; | |
| 280 | + display: flex; | |
| 281 | + align-items: center; | |
| 282 | + padding: 32rpx 32rpx 22rpx; | |
| 283 | + | |
| 284 | + .title-header_icon { | |
| 285 | + width: 32rpx; | |
| 286 | + height: 28rpx; | |
| 287 | + margin-right: 16rpx; | |
| 288 | + } | |
| 289 | + | |
| 290 | + span { | |
| 291 | + color: rgba(0, 0, 0, 0.9); | |
| 292 | + font-size: 32rpx; | |
| 293 | + line-height: 44rpx; | |
| 294 | + font-weight: 600; | |
| 295 | + } | |
| 296 | +} | |
| 297 | + | |
| 298 | + | |
| 299 | +.section { | |
| 300 | + background: #fff; | |
| 301 | + margin-bottom: 20rpx; | |
| 302 | +} | |
| 303 | + | |
| 304 | +.section2 { | |
| 305 | + background: #f1f1f1; | |
| 306 | +} | |
| 307 | + | |
| 308 | +::v-deep .uni-list { | |
| 309 | + background: transparent; | |
| 310 | + | |
| 311 | + &-item { | |
| 312 | + &__extra-text { | |
| 313 | + font-size: 32rpx; | |
| 314 | + } | |
| 315 | + | |
| 316 | + &__content-title { | |
| 317 | + font-size: 32rpx; | |
| 318 | + color: rgba(0, 0, 0, 0.9); | |
| 319 | + } | |
| 320 | + | |
| 321 | + &__container { | |
| 322 | + padding: 32rpx; | |
| 323 | + align-items: center; | |
| 324 | + | |
| 325 | + .uni-easyinput { | |
| 326 | + | |
| 327 | + .is-disabled { | |
| 328 | + background-color: transparent !important; | |
| 329 | + } | |
| 330 | + | |
| 331 | + &__placeholder-class { | |
| 332 | + font-size: 32rpx; | |
| 333 | + color: rgba(0, 0, 0, 0.4); | |
| 334 | + } | |
| 335 | + | |
| 336 | + &__content { | |
| 337 | + border: none; | |
| 338 | + | |
| 339 | + &-input { | |
| 340 | + padding-left: 0 !important; | |
| 341 | + height: 48rpx; | |
| 342 | + line-height: 48rpx; | |
| 343 | + font-size: 32rpx; | |
| 344 | + } | |
| 345 | + | |
| 346 | + .content-clear-icon { | |
| 347 | + font-size: 44rpx !important; | |
| 348 | + } | |
| 349 | + } | |
| 350 | + } | |
| 351 | + | |
| 352 | + .amount-row { | |
| 353 | + flex: 1; | |
| 354 | + display: flex; | |
| 355 | + align-items: center; | |
| 356 | + | |
| 357 | + .uni-easyinput { | |
| 358 | + flex: 1; | |
| 359 | + } | |
| 360 | + | |
| 361 | + .unit { | |
| 362 | + margin-left: 16rpx; | |
| 363 | + color: rgba(0, 0, 0, 0.9); | |
| 364 | + } | |
| 365 | + } | |
| 366 | + | |
| 367 | + .item-title, | |
| 368 | + .uni-list-item__content { | |
| 369 | + flex: none; | |
| 370 | + min-height: 48rpx; | |
| 371 | + line-height: 48rpx; | |
| 372 | + font-size: 32rpx; | |
| 373 | + position: relative; | |
| 374 | + width: 162rpx; | |
| 375 | + margin-right: 32rpx; | |
| 376 | + color: rgba(0, 0, 0, 0.9); | |
| 377 | + padding-right: 0; | |
| 378 | + | |
| 379 | + | |
| 380 | + .required { | |
| 381 | + color: red; | |
| 382 | + position: absolute; | |
| 383 | + top: 50%; | |
| 384 | + transform: translateY(-50%); | |
| 385 | + left: -16rpx; | |
| 386 | + } | |
| 387 | + } | |
| 388 | + | |
| 389 | + } | |
| 390 | + | |
| 391 | + &.select-item { | |
| 392 | + &.is-empty { | |
| 393 | + .uni-list-item__extra-text { | |
| 394 | + color: rgba(0, 0, 0, 0.4) !important; | |
| 395 | + } | |
| 396 | + } | |
| 397 | + | |
| 398 | + &.is-filled { | |
| 399 | + .uni-list-item__extra-text { | |
| 400 | + color: rgba(0, 0, 0, 0.9) !important; | |
| 401 | + } | |
| 402 | + } | |
| 403 | + | |
| 404 | + .serial-number-row { | |
| 405 | + display: flex; | |
| 406 | + align-items: center; | |
| 407 | + } | |
| 408 | + | |
| 409 | + } | |
| 410 | + | |
| 411 | + &.mgb10 { | |
| 412 | + margin-bottom: 20rpx; | |
| 413 | + } | |
| 414 | + | |
| 415 | + } | |
| 416 | + | |
| 417 | + .title-header { | |
| 418 | + background-color: #fff; | |
| 419 | + display: flex; | |
| 420 | + align-items: center; | |
| 421 | + padding: 32rpx 32rpx 22rpx; | |
| 422 | + | |
| 423 | + &_icon { | |
| 424 | + width: 32rpx; | |
| 425 | + height: 28rpx; | |
| 426 | + margin-right: 16rpx; | |
| 427 | + } | |
| 428 | + | |
| 429 | + span { | |
| 430 | + color: rgba(0, 0, 0, 0.9); | |
| 431 | + font-size: 32rpx; | |
| 432 | + line-height: 44rpx; | |
| 433 | + font-weight: 600; | |
| 434 | + } | |
| 435 | + } | |
| 436 | +} | |
| 437 | + | |
| 438 | +/* 只读 easyinput 根据内容自适应高度 */ | |
| 439 | +::v-deep .uni-list-item__container { | |
| 440 | + align-items: flex-start; | |
| 441 | +} | |
| 442 | + | |
| 443 | +/* 只读文本样式 */ | |
| 444 | +.readonly-text { | |
| 445 | + color: rgba(0, 0, 0, 0.9); | |
| 446 | + font-size: 32rpx; | |
| 447 | + line-height: 44rpx; | |
| 448 | + text-align: right; | |
| 449 | + white-space: pre-wrap; | |
| 450 | + word-break: break-all; | |
| 451 | +} | |
| 452 | + | |
| 453 | + | |
| 454 | +.footer { | |
| 455 | + position: fixed; | |
| 456 | + left: 0; | |
| 457 | + right: 0; | |
| 458 | + bottom: 0; | |
| 459 | + padding: 0 32rpx 32rpx; | |
| 460 | + padding-bottom: calc(32rpx + env(safe-area-inset-bottom)); | |
| 461 | + background: #fff; | |
| 462 | + box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06); | |
| 463 | + | |
| 464 | + .btn { | |
| 465 | + height: 80rpx; | |
| 466 | + line-height: 80rpx; | |
| 467 | + border-radius: 12rpx; | |
| 468 | + font-size: 32rpx; | |
| 469 | + } | |
| 470 | + | |
| 471 | + .submit { | |
| 472 | + background: $theme-primary; | |
| 473 | + color: #fff; | |
| 474 | + } | |
| 475 | + | |
| 476 | + .view-total { | |
| 477 | + padding: 20rpx 0; | |
| 478 | + | |
| 479 | + .head { | |
| 480 | + font-size: 32rpx; | |
| 481 | + font-weight: 600; | |
| 482 | + line-height: 50rpx; | |
| 483 | + color: rgba(0, 0, 0, 0.9); | |
| 484 | + padding-bottom: 16rpx; | |
| 485 | + margin-bottom: 24rpx; | |
| 486 | + ; | |
| 487 | + border-bottom: 1px dashed #E7E7E7; | |
| 488 | + } | |
| 489 | + | |
| 490 | + .row { | |
| 491 | + display: flex; | |
| 492 | + margin-bottom: 24rpx; | |
| 493 | + line-height: 32rpx; | |
| 494 | + | |
| 495 | + .label { | |
| 496 | + width: 180rpx; | |
| 497 | + margin-right: 14rpx; | |
| 498 | + color: rgba(0, 0, 0, 0.6); | |
| 499 | + font-size: 28rpx; | |
| 500 | + } | |
| 501 | + | |
| 502 | + .value { | |
| 503 | + flex: 1; | |
| 504 | + color: rgba(0, 0, 0, 0.9); | |
| 505 | + font-size: 28rpx; | |
| 506 | + white-space: pre-wrap; | |
| 507 | + word-break: break-all; | |
| 508 | + } | |
| 509 | + } | |
| 510 | + } | |
| 511 | +} | |
| 512 | +</style> | ... | ... |
| 1 | 1 | <template> |
| 2 | - <view class="core-personnel" :class="{ 'history': mode == 'history' }"> | |
| 2 | + <view class="product" :class="{ 'history': mode == 'history' }"> | |
| 3 | 3 | |
| 4 | 4 | <!-- 新增&详情-产品 --> |
| 5 | - <view class="header" :class="{ 'bp': mode !== 'add' }"> | |
| 5 | + <view class="header bp" > | |
| 6 | 6 | <image class="opCollapse" src="/static/images/title.png" /> |
| 7 | 7 | <text class="title">产品</text> |
| 8 | 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 | 10 | <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse"> |
| 11 | 11 | <image class="opAdd" :src="collapsedView ? '/static/images/down.png' : '/static/images/up.png'" /> |
| 12 | 12 | <text class="op">{{ collapsedView ? '展开' : '收起' }} </text> |
| ... | ... | @@ -15,74 +15,58 @@ |
| 15 | 15 | </view> |
| 16 | 16 | </view> |
| 17 | 17 | |
| 18 | - <view v-if="mode === 'add'" class="add-list"> | |
| 19 | - <view v-for="(item, idx) in items" :key="idx" class="block"> | |
| 20 | - <uni-list v-show="item.collapsed"> | |
| 21 | - <uni-list-item title="姓名"> | |
| 22 | - <template v-slot:footer> | |
| 23 | - <uni-easyinput v-model="item.name" :inputBorder="false" placeholder="请输入姓名" /> | |
| 24 | - </template> | |
| 25 | - </uni-list-item> | |
| 26 | - <uni-list-item class="select-item" :class="item.sexName ? 'is-filled' : 'is-empty'" clickable | |
| 27 | - @click="openProductSheet(idx)" :rightText="item.sexName || '请选择性别'" showArrow> | |
| 28 | - <template v-slot:body> | |
| 29 | - <view class="item-title"><text>性别</text></view> | |
| 30 | - </template> | |
| 31 | - </uni-list-item> | |
| 32 | - </uni-list> | |
| 33 | - <uni-list v-show="!item.collapsed"> | |
| 34 | - <uni-list-item title="姓名"> | |
| 35 | - <template v-slot:footer> | |
| 36 | - <uni-easyinput v-model="item.name" :inputBorder="false" placeholder="请输入姓名" /> | |
| 37 | - </template> | |
| 38 | - </uni-list-item> | |
| 39 | - <uni-list-item class="select-item" :class="item.sexName ? 'is-filled' : 'is-empty'" clickable | |
| 40 | - @click="openProductSheet(idx)" :rightText="item.sexName || '请选择性别'" showArrow> | |
| 41 | - <template v-slot:body> | |
| 42 | - <view class="item-title"><text>性别</text></view> | |
| 43 | - </template> | |
| 44 | - </uni-list-item> | |
| 45 | - <uni-list-item title="籍贯"> | |
| 46 | - <template v-slot:footer> | |
| 47 | - <uni-easyinput v-model="item.nativePlace" :inputBorder="false" placeholder="请输入籍贯" /> | |
| 48 | - </template> | |
| 49 | - </uni-list-item> | |
| 50 | - <uni-list-item title="年龄"> | |
| 51 | - <template v-slot:footer> | |
| 52 | - <uni-easyinput v-model="item.age" :inputBorder="false" placeholder="请输入年龄" /> | |
| 53 | - </template> | |
| 54 | - </uni-list-item> | |
| 55 | - <uni-list-item title="职务"> | |
| 56 | - <template v-slot:footer> | |
| 57 | - <uni-easyinput v-model="item.position" :inputBorder="false" placeholder="请输入职务" /> | |
| 58 | - </template> | |
| 59 | - </uni-list-item> | |
| 60 | - <uni-list-item title="手机"> | |
| 61 | - <template v-slot:footer> | |
| 62 | - <uni-easyinput v-model="item.mobile" :inputBorder="false" placeholder="请输入手机" /> | |
| 63 | - </template> | |
| 64 | - </uni-list-item> | |
| 65 | - <uni-list-item title="固定电话"> | |
| 66 | - <template v-slot:footer> | |
| 67 | - <uni-easyinput v-model="item.phone" :inputBorder="false" placeholder="请输入固定电话" /> | |
| 68 | - </template> | |
| 69 | - </uni-list-item> | |
| 70 | - <uni-list-item title="邮箱地址"> | |
| 71 | - <template v-slot:footer> | |
| 72 | - <uni-easyinput v-model="item.email" :inputBorder="false" placeholder="请输入邮箱地址" /> | |
| 73 | - </template> | |
| 74 | - </uni-list-item> | |
| 75 | - <uni-list-item title="现住址"> | |
| 76 | - <template v-slot:footer> | |
| 77 | - <uni-easyinput v-model="item.address" :inputBorder="false" placeholder="请输入现住址" /> | |
| 78 | - </template> | |
| 79 | - </uni-list-item> | |
| 80 | - </uni-list> | |
| 18 | + <view v-if="mode === 'add'" class="section"> | |
| 19 | + <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> | |
| 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 | + <view class="row row-spec"><text class="label">规格(mm)</text> | |
| 26 | + <view class="value value-spec"> | |
| 27 | + <view class="value-spec_val">{{ item.thickness }}</view> | |
| 28 | + <view class="value-spec_box"> | |
| 29 | + <view class="value-spec_box_1">+{{ item.thicknessTolPos }}</view> | |
| 30 | + <view class="value-spec_box_2">-{{ item.thicknessTolNeg }}</view> | |
| 31 | + </view> | |
| 32 | + <view class="value-spec_val p12">*</view> | |
| 33 | + <view class="value-spec_val">{{ item.width }}</view> | |
| 34 | + <view class="value-spec_box"> | |
| 35 | + <view class="value-spec_box_1">+{{ item.widthTolPos }}</view> | |
| 36 | + <view class="value-spec_box_2">-{{ item.widthTolNeg }}</view> | |
| 37 | + </view> | |
| 38 | + <view class="value-spec_val p12">*</view> | |
| 39 | + <view class="value-spec_val">{{ item.length }}</view> | |
| 40 | + <view class="value-spec_box"> | |
| 41 | + <view class="value-spec_box_1">+{{ item.lengthTolPos }}</view> | |
| 42 | + <view class="value-spec_box_2">-{{ item.lengthTolNeg }}</view> | |
| 43 | + </view> | |
| 44 | + </view> | |
| 45 | + </view> | |
| 46 | + <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> | |
| 47 | + <view class="row" :class="{ 'noneStyle': !item.showSalesPrice }"><text class="label">数量kg</text><text | |
| 48 | + class="value">{{ item.quantity }}</text> | |
| 49 | + </view> | |
| 50 | + <view class="row" :class="{ 'noneStyle': item.showSalesPrice }" v-if="item.showSalesPrice"><text | |
| 51 | + class="label">销售价格</text><text class="value">{{ | |
| 52 | + item.salesPrice }}</text></view> | |
| 53 | + | |
| 54 | + <uni-list class="edit-list"> | |
| 55 | + <uni-list-item title="发货日期"> | |
| 56 | + <template v-slot:footer> | |
| 57 | + <uni-datetime-picker type="date" v-model="item.deliveryDate" /> | |
| 58 | + </template> | |
| 59 | + </uni-list-item> | |
| 60 | + <uni-list-item title="考核超协"> | |
| 61 | + <template v-slot:footer> | |
| 62 | + <uni-easyinput v-model="item.assessmentExceedsAgreement" placeholder="请输入考核超协" | |
| 63 | + :inputBorder="false" /> | |
| 64 | + </template> | |
| 65 | + </uni-list-item> | |
| 66 | + </uni-list> | |
| 67 | + </view> | |
| 68 | + | |
| 81 | 69 | <view class="block-ops"> |
| 82 | - <div class="del" @click="onRemove(item.personId)"> | |
| 83 | - <image src="/static/images/delete.png" class="icon" /> | |
| 84 | - 删除 | |
| 85 | - </div> | |
| 86 | 70 | <div class="toggle" @click="toggleItem(idx)"> |
| 87 | 71 | <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" |
| 88 | 72 | class="icon" /> |
| ... | ... | @@ -270,17 +254,6 @@ export default { |
| 270 | 254 | } |
| 271 | 255 | </script> |
| 272 | 256 | <style lang="scss" scoped> |
| 273 | -.core-personnel { | |
| 274 | - margin-top: 10px; | |
| 275 | - | |
| 276 | - &.history { | |
| 277 | - margin-top: 0; | |
| 278 | - | |
| 279 | - .header { | |
| 280 | - padding: 32rpx 0 0 32rpx; | |
| 281 | - } | |
| 282 | - } | |
| 283 | -} | |
| 284 | 257 | |
| 285 | 258 | .header { |
| 286 | 259 | background-color: #fff; |
| ... | ... | @@ -289,7 +262,7 @@ export default { |
| 289 | 262 | padding: 24rpx 32rpx; |
| 290 | 263 | |
| 291 | 264 | &.bp { |
| 292 | - border-bottom: 1rpx dashed #f0f0f0; | |
| 265 | + border-bottom: 1px solid #f0f0f0; | |
| 293 | 266 | } |
| 294 | 267 | } |
| 295 | 268 | |
| ... | ... | @@ -336,58 +309,139 @@ export default { |
| 336 | 309 | } |
| 337 | 310 | |
| 338 | 311 | |
| 339 | -.block { | |
| 340 | - background: #fff; | |
| 341 | - margin-bottom: 20rpx; | |
| 342 | -} | |
| 343 | - | |
| 344 | -::v-deep .uni-list-item__content { | |
| 345 | - display: flex; | |
| 346 | - justify-content: center; | |
| 347 | -} | |
| 348 | - | |
| 349 | 312 | ::v-deep .uni-list { |
| 350 | 313 | background: transparent; |
| 351 | 314 | |
| 352 | 315 | &-item { |
| 353 | - &__container { | |
| 354 | - padding: 32rpx; | |
| 316 | + &__extra-text { | |
| 317 | + font-size: 32rpx; | |
| 355 | 318 | } |
| 356 | 319 | |
| 357 | 320 | &__content-title { |
| 358 | - font-size: 28rpx; | |
| 321 | + font-size: 32rpx; | |
| 359 | 322 | color: rgba(0, 0, 0, 0.9); |
| 360 | 323 | } |
| 361 | 324 | |
| 362 | - &__extra-text { | |
| 363 | - font-size: 32rpx; | |
| 364 | - } | |
| 325 | + &__container { | |
| 326 | + padding: 32rpx; | |
| 327 | + align-items: center; | |
| 365 | 328 | |
| 366 | - .uni-easyinput { | |
| 367 | - width: 100%; | |
| 329 | + .uni-easyinput { | |
| 368 | 330 | |
| 369 | - &__placeholder-class { | |
| 370 | - font-size: 32rpx; | |
| 371 | - color: rgba(0, 0, 0, 0.4); | |
| 331 | + .is-disabled { | |
| 332 | + background-color: transparent !important; | |
| 333 | + } | |
| 334 | + | |
| 335 | + &__placeholder-class { | |
| 336 | + font-size: 32rpx; | |
| 337 | + color: rgba(0, 0, 0, 0.4); | |
| 338 | + } | |
| 339 | + | |
| 340 | + &__content { | |
| 341 | + border: none; | |
| 342 | + | |
| 343 | + &-input { | |
| 344 | + padding-left: 0 !important; | |
| 345 | + height: 48rpx; | |
| 346 | + line-height: 48rpx; | |
| 347 | + font-size: 32rpx; | |
| 348 | + } | |
| 349 | + | |
| 350 | + .content-clear-icon { | |
| 351 | + font-size: 44rpx !important; | |
| 352 | + } | |
| 353 | + } | |
| 372 | 354 | } |
| 373 | 355 | |
| 374 | - &__content { | |
| 375 | - border: none; | |
| 356 | + .amount-row { | |
| 357 | + flex: 1; | |
| 376 | 358 | display: flex; |
| 359 | + align-items: center; | |
| 377 | 360 | |
| 378 | - &-input { | |
| 379 | - padding-left: 0 !important; | |
| 380 | - height: 48rpx; | |
| 381 | - line-height: 48rpx; | |
| 382 | - font-size: 32rpx; | |
| 361 | + .uni-easyinput { | |
| 362 | + flex: 1; | |
| 363 | + } | |
| 364 | + | |
| 365 | + .unit { | |
| 366 | + margin-left: 16rpx; | |
| 367 | + color: rgba(0, 0, 0, 0.9); | |
| 383 | 368 | } |
| 384 | 369 | } |
| 385 | 370 | |
| 386 | - .uni-input-placeholder { | |
| 387 | - // z-index: 2; | |
| 371 | + .item-title, | |
| 372 | + .uni-list-item__content { | |
| 373 | + flex: none; | |
| 374 | + min-height: 48rpx; | |
| 375 | + line-height: 48rpx; | |
| 376 | + font-size: 32rpx; | |
| 377 | + position: relative; | |
| 378 | + width: 162rpx; | |
| 379 | + margin-right: 32rpx; | |
| 380 | + color: rgba(0, 0, 0, 0.9); | |
| 381 | + padding-right: 0; | |
| 382 | + | |
| 383 | + | |
| 384 | + .required { | |
| 385 | + color: red; | |
| 386 | + position: absolute; | |
| 387 | + top: 50%; | |
| 388 | + transform: translateY(-50%); | |
| 389 | + left: -16rpx; | |
| 390 | + } | |
| 388 | 391 | } |
| 392 | + | |
| 389 | 393 | } |
| 394 | + | |
| 395 | + &.select-item { | |
| 396 | + &.is-empty { | |
| 397 | + .uni-list-item__extra-text { | |
| 398 | + color: rgba(0, 0, 0, 0.4) !important; | |
| 399 | + } | |
| 400 | + } | |
| 401 | + | |
| 402 | + &.is-filled { | |
| 403 | + .uni-list-item__extra-text { | |
| 404 | + color: rgba(0, 0, 0, 0.9) !important; | |
| 405 | + } | |
| 406 | + } | |
| 407 | + | |
| 408 | + .serial-number-row { | |
| 409 | + display: flex; | |
| 410 | + align-items: center; | |
| 411 | + } | |
| 412 | + | |
| 413 | + } | |
| 414 | + | |
| 415 | + &.mgb10 { | |
| 416 | + margin-bottom: 20rpx; | |
| 417 | + } | |
| 418 | + | |
| 390 | 419 | } |
| 420 | + | |
| 421 | + .title-header { | |
| 422 | + background-color: #fff; | |
| 423 | + display: flex; | |
| 424 | + align-items: center; | |
| 425 | + padding: 32rpx 32rpx 22rpx; | |
| 426 | + | |
| 427 | + &_icon { | |
| 428 | + width: 32rpx; | |
| 429 | + height: 28rpx; | |
| 430 | + margin-right: 16rpx; | |
| 431 | + } | |
| 432 | + | |
| 433 | + span { | |
| 434 | + color: rgba(0, 0, 0, 0.9); | |
| 435 | + font-size: 32rpx; | |
| 436 | + line-height: 44rpx; | |
| 437 | + font-weight: 600; | |
| 438 | + } | |
| 439 | + } | |
| 440 | +} | |
| 441 | + | |
| 442 | +/* 只读 easyinput 根据内容自适应高度 */ | |
| 443 | +::v-deep .uni-list-item__container { | |
| 444 | + align-items: flex-start; | |
| 391 | 445 | } |
| 392 | 446 | |
| 393 | 447 | .block-ops { |
| ... | ... | @@ -420,14 +474,13 @@ export default { |
| 420 | 474 | } |
| 421 | 475 | } |
| 422 | 476 | |
| 423 | -.view-list { | |
| 424 | - padding: 26rpx 32rpx; | |
| 425 | - background: #ffffff; | |
| 477 | +.section { | |
| 478 | + background: #f1f1f1; | |
| 479 | + margin-bottom: 20rpx; | |
| 426 | 480 | |
| 427 | - .card { | |
| 428 | - background: #f3f3f3; | |
| 429 | - border-radius: 16rpx; | |
| 430 | - padding: 32rpx 44rpx; | |
| 481 | + .block { | |
| 482 | + background: #ffffff; | |
| 483 | + padding: 32rpx 0; | |
| 431 | 484 | margin-bottom: 20rpx; |
| 432 | 485 | |
| 433 | 486 | &:last-child { |
| ... | ... | @@ -437,11 +490,18 @@ export default { |
| 437 | 490 | |
| 438 | 491 | .row { |
| 439 | 492 | display: flex; |
| 440 | - margin-bottom: 24rpx; | |
| 493 | + // margin-bottom: 24rpx; | |
| 441 | 494 | line-height: 32rpx; |
| 495 | + padding: 32rpx; | |
| 496 | + border-bottom: 1rpx solid #f2f2f2; | |
| 497 | + | |
| 498 | + | |
| 499 | + &.noneStyle { | |
| 500 | + border-bottom: 0; | |
| 501 | + border-bottom: none; | |
| 502 | + } | |
| 442 | 503 | |
| 443 | 504 | &.row-spec { |
| 444 | - height: 60rpx; | |
| 445 | 505 | align-items: center; |
| 446 | 506 | } |
| 447 | 507 | } |
| ... | ... | @@ -451,22 +511,24 @@ export default { |
| 451 | 511 | } |
| 452 | 512 | |
| 453 | 513 | .label { |
| 454 | - width: 140rpx; | |
| 455 | - margin-right: 14rpx; | |
| 456 | - color: rgba(0, 0, 0, 0.6); | |
| 457 | - font-size: 28rpx; | |
| 514 | + width: 162rpx; | |
| 515 | + margin-right: 32rpx; | |
| 516 | + color: rgba(0, 0, 0, 0.9); | |
| 517 | + font-size: 32rpx; | |
| 518 | + line-height: 48rpx; | |
| 458 | 519 | } |
| 459 | 520 | |
| 460 | 521 | .value { |
| 461 | 522 | flex: 1; |
| 462 | 523 | color: rgba(0, 0, 0, 0.9); |
| 463 | - font-size: 28rpx; | |
| 524 | + font-size: 32rpx; | |
| 464 | 525 | white-space: pre-wrap; |
| 465 | 526 | word-break: break-all; |
| 527 | + line-height: 48rpx; | |
| 466 | 528 | } |
| 467 | 529 | |
| 468 | 530 | .value-spec { |
| 469 | - height: 60rpx; | |
| 531 | + height: 48rpx; | |
| 470 | 532 | display: flex; |
| 471 | 533 | align-items: center; |
| 472 | 534 | color: #000000; |
| ... | ... | @@ -474,19 +536,19 @@ export default { |
| 474 | 536 | &_box { |
| 475 | 537 | position: relative; |
| 476 | 538 | width: 60rpx; |
| 477 | - height: 60rpx; | |
| 539 | + height: 48rpx; | |
| 478 | 540 | |
| 479 | 541 | &_1 { |
| 480 | 542 | font-size: 16rpx; |
| 481 | 543 | position: absolute; |
| 482 | - top: 0; | |
| 544 | + top: -10rpx; | |
| 483 | 545 | left: 0; |
| 484 | 546 | } |
| 485 | 547 | |
| 486 | 548 | &_2 { |
| 487 | 549 | font-size: 16rpx; |
| 488 | 550 | position: absolute; |
| 489 | - bottom: 0; | |
| 551 | + bottom: -10rpx; | |
| 490 | 552 | left: 0; |
| 491 | 553 | } |
| 492 | 554 | } |
| ... | ... | @@ -537,8 +599,8 @@ export default { |
| 537 | 599 | } |
| 538 | 600 | } |
| 539 | 601 | |
| 540 | -.history-list { | |
| 541 | - padding: 20rpx 32rpx; | |
| 602 | +.view-list { | |
| 603 | + padding: 26rpx 32rpx; | |
| 542 | 604 | background: #ffffff; |
| 543 | 605 | |
| 544 | 606 | .card { |
| ... | ... | @@ -556,6 +618,11 @@ export default { |
| 556 | 618 | display: flex; |
| 557 | 619 | margin-bottom: 24rpx; |
| 558 | 620 | line-height: 32rpx; |
| 621 | + | |
| 622 | + &.row-spec { | |
| 623 | + height: 60rpx; | |
| 624 | + align-items: center; | |
| 625 | + } | |
| 559 | 626 | } |
| 560 | 627 | |
| 561 | 628 | .row:last-child { |
| ... | ... | @@ -563,7 +630,7 @@ export default { |
| 563 | 630 | } |
| 564 | 631 | |
| 565 | 632 | .label { |
| 566 | - width: 180rpx; | |
| 633 | + width: 140rpx; | |
| 567 | 634 | margin-right: 14rpx; |
| 568 | 635 | color: rgba(0, 0, 0, 0.6); |
| 569 | 636 | font-size: 28rpx; |
| ... | ... | @@ -575,9 +642,76 @@ export default { |
| 575 | 642 | font-size: 28rpx; |
| 576 | 643 | white-space: pre-wrap; |
| 577 | 644 | word-break: break-all; |
| 645 | + } | |
| 646 | + | |
| 647 | + .value-spec { | |
| 648 | + height: 60rpx; | |
| 649 | + display: flex; | |
| 650 | + align-items: center; | |
| 651 | + color: #000000; | |
| 652 | + | |
| 653 | + &_box { | |
| 654 | + position: relative; | |
| 655 | + width: 60rpx; | |
| 656 | + height: 60rpx; | |
| 657 | + | |
| 658 | + &_1 { | |
| 659 | + font-size: 16rpx; | |
| 660 | + position: absolute; | |
| 661 | + top: 0; | |
| 662 | + left: 0; | |
| 663 | + } | |
| 664 | + | |
| 665 | + &_2 { | |
| 666 | + font-size: 16rpx; | |
| 667 | + position: absolute; | |
| 668 | + bottom: 0; | |
| 669 | + left: 0; | |
| 670 | + } | |
| 671 | + } | |
| 672 | + | |
| 673 | + &_val { | |
| 674 | + font-size: 28rpx; | |
| 675 | + | |
| 676 | + &.p12 { | |
| 677 | + padding-right: 12rpx; | |
| 678 | + } | |
| 679 | + } | |
| 680 | + } | |
| 578 | 681 | |
| 579 | - &.change { | |
| 580 | - color: $theme-primary; | |
| 682 | + .view-total { | |
| 683 | + padding-top: 20rpx; | |
| 684 | + | |
| 685 | + .head { | |
| 686 | + font-size: 32rpx; | |
| 687 | + font-weight: 600; | |
| 688 | + line-height: 50rpx; | |
| 689 | + color: rgba(0, 0, 0, 0.9); | |
| 690 | + padding-bottom: 16rpx; | |
| 691 | + margin-bottom: 24rpx; | |
| 692 | + ; | |
| 693 | + border-bottom: 1px dashed #E7E7E7; | |
| 694 | + } | |
| 695 | + | |
| 696 | + .row { | |
| 697 | + display: flex; | |
| 698 | + margin-bottom: 24rpx; | |
| 699 | + line-height: 32rpx; | |
| 700 | + | |
| 701 | + .label { | |
| 702 | + width: 180rpx; | |
| 703 | + margin-right: 14rpx; | |
| 704 | + color: rgba(0, 0, 0, 0.6); | |
| 705 | + font-size: 28rpx; | |
| 706 | + } | |
| 707 | + | |
| 708 | + .value { | |
| 709 | + flex: 1; | |
| 710 | + color: rgba(0, 0, 0, 0.9); | |
| 711 | + font-size: 28rpx; | |
| 712 | + white-space: pre-wrap; | |
| 713 | + word-break: break-all; | |
| 714 | + } | |
| 581 | 715 | } |
| 582 | 716 | } |
| 583 | 717 | } | ... | ... |