Commit d9a12bd944517479c4af19bba75658589cd9b342
Merge remote-tracking branch 'origin/cjerp-1.0' into publish_cjerp
Showing
36 changed files
with
1585 additions
and
955 deletions
Too many changes to show.
To preserve performance only 36 of 80 files are displayed.
| @@ -5,13 +5,17 @@ export const statusStyle = [ | @@ -5,13 +5,17 @@ export const statusStyle = [ | ||
| 5 | { color: '#2BA471', bgColor:'#E3F9E9',text: '审核通过' }, | 5 | { color: '#2BA471', bgColor:'#E3F9E9',text: '审核通过' }, |
| 6 | { color: '#D54941', bgColor:'#FFF0ED',text: '已驳回' }, | 6 | { color: '#D54941', bgColor:'#FFF0ED',text: '已驳回' }, |
| 7 | { color: '#3D48A3', bgColor:'#F2F3FF',text: '审核中' }, | 7 | { color: '#3D48A3', bgColor:'#F2F3FF',text: '审核中' }, |
| 8 | + { color: '#000', bgColor:'#F2F3FF',text: '已取消' }, | ||
| 8 | ]; | 9 | ]; |
| 9 | 10 | ||
| 10 | export const statusMap = { | 11 | export const statusMap = { |
| 11 | '生产中': '#2BA471', | 12 | '生产中': '#2BA471', |
| 13 | + '审核通过': '#2BA471', | ||
| 12 | '审核中': '#3D48A3', | 14 | '审核中': '#3D48A3', |
| 13 | '已签收': '#E7E7E7', | 15 | '已签收': '#E7E7E7', |
| 16 | + '已取消': '#000', | ||
| 14 | '已发货': '#D54941', | 17 | '已发货': '#D54941', |
| 18 | + '已驳回': '#D54941', | ||
| 15 | } | 19 | } |
| 16 | 20 | ||
| 17 | const baseUrl = '/contract'; | 21 | const baseUrl = '/contract'; |
| @@ -23,6 +27,15 @@ export function queryApi(params) { | @@ -23,6 +27,15 @@ export function queryApi(params) { | ||
| 23 | params | 27 | params |
| 24 | }) | 28 | }) |
| 25 | } | 29 | } |
| 30 | +//取消锁价无规格申请单申请 | ||
| 31 | +export function cancelApi(id) { | ||
| 32 | + return request({ | ||
| 33 | + url: `${baseUrl}/specLockDelayApplication/cancel`, | ||
| 34 | + method: 'get', | ||
| 35 | + params: { id } | ||
| 36 | + }) | ||
| 37 | +} | ||
| 38 | + | ||
| 26 | // 查询锁价无规格申请单列表 | 39 | // 查询锁价无规格申请单列表 |
| 27 | export function querySpecLockApi(params) { | 40 | export function querySpecLockApi(params) { |
| 28 | return request({ | 41 | return request({ |
| @@ -126,4 +126,16 @@ export function getDeptUser() { | @@ -126,4 +126,16 @@ export function getDeptUser() { | ||
| 126 | url: '/customerCredit/getDeptUser', | 126 | url: '/customerCredit/getDeptUser', |
| 127 | method: 'get', | 127 | method: 'get', |
| 128 | }) | 128 | }) |
| 129 | +} | ||
| 130 | + | ||
| 131 | +// 获取区域 | ||
| 132 | +// type: ALL 代表获取全部区域的值 | ||
| 133 | +export function getArea(type) { | ||
| 134 | + return request({ | ||
| 135 | + url: '/system/dept/queryArea', | ||
| 136 | + method: 'get', | ||
| 137 | + params: { | ||
| 138 | + type, | ||
| 139 | + }, | ||
| 140 | + }) | ||
| 129 | } | 141 | } |
| @@ -47,6 +47,16 @@ export function createApi(params) { | @@ -47,6 +47,16 @@ export function createApi(params) { | ||
| 47 | }) | 47 | }) |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | +// 新增拜访记录 | ||
| 51 | +export function createVisitRecordApi(params) { | ||
| 52 | + return request({ | ||
| 53 | + url: `/customer/visitRecord`, | ||
| 54 | + method: 'post', | ||
| 55 | + data: params, | ||
| 56 | + contentType: ContentTypeEnum.FORM_URLENCODED | ||
| 57 | + }) | ||
| 58 | +} | ||
| 59 | + | ||
| 50 | 60 | ||
| 51 | // 修改保存 | 61 | // 修改保存 |
| 52 | export function updateApi(params) { | 62 | export function updateApi(params) { |
api/message.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +const baseUrl = '/system/message/site'; | ||
| 4 | + | ||
| 5 | +// 查询列表 | ||
| 6 | +export function queryApi(params) { | ||
| 7 | + return request({ | ||
| 8 | + url: `${baseUrl}/query/my`, | ||
| 9 | + method: 'get', | ||
| 10 | + params | ||
| 11 | + }) | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +// 查询内容 | ||
| 15 | +export function getContentApi(id) { | ||
| 16 | + return request({ | ||
| 17 | + url: `${baseUrl}/content`, | ||
| 18 | + method: 'get', | ||
| 19 | + params: { id } | ||
| 20 | + }) | ||
| 21 | +} |
| @@ -65,3 +65,13 @@ export function listCanRevokeOrChangeOrderInfo(params) { | @@ -65,3 +65,13 @@ export function listCanRevokeOrChangeOrderInfo(params) { | ||
| 65 | }) | 65 | }) |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | +// 申请发货-检查数据是否规范 | ||
| 69 | +export function checkApi(params) { | ||
| 70 | + return request({ | ||
| 71 | + url: `${baseUrl}/check`, | ||
| 72 | + method: 'get', | ||
| 73 | + params: { | ||
| 74 | + ...params, | ||
| 75 | + }, | ||
| 76 | + }) | ||
| 77 | +} |
| @@ -53,50 +53,50 @@ | @@ -53,50 +53,50 @@ | ||
| 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | </template> | 54 | </template> |
| 55 | </uni-list-item> | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | 56 | + <uni-list-item title="厚度mm"> |
| 57 | <template v-slot:footer> | 57 | <template v-slot:footer> |
| 58 | <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> | 58 | <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> |
| 59 | </template> | 59 | </template> |
| 60 | </uni-list-item> | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | 61 | + <uni-list-item title="厚度公差(单项+)mm"> |
| 62 | <template v-slot:footer> | 62 | <template v-slot:footer> |
| 63 | <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" | 63 | <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" |
| 64 | placeholder="请输入厚度公差(单项+)" /> | 64 | placeholder="请输入厚度公差(单项+)" /> |
| 65 | </template> | 65 | </template> |
| 66 | </uni-list-item> | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | 67 | + <uni-list-item title="厚度公差(单项-)mm"> |
| 68 | <template v-slot:footer> | 68 | <template v-slot:footer> |
| 69 | <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" | 69 | <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" |
| 70 | placeholder="请输入厚度公差(单项-)" /> | 70 | placeholder="请输入厚度公差(单项-)" /> |
| 71 | </template> | 71 | </template> |
| 72 | </uni-list-item> | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | 73 | + <uni-list-item title="宽度mm"> |
| 74 | <template v-slot:footer> | 74 | <template v-slot:footer> |
| 75 | <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> | 75 | <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> |
| 76 | </template> | 76 | </template> |
| 77 | </uni-list-item> | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | 78 | + <uni-list-item title="宽度公差(单项+)mm"> |
| 79 | <template v-slot:footer> | 79 | <template v-slot:footer> |
| 80 | <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> | 80 | <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> |
| 81 | </template> | 81 | </template> |
| 82 | </uni-list-item> | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | 83 | + <uni-list-item title="宽度公差(单项-)mm"> |
| 84 | <template v-slot:footer> | 84 | <template v-slot:footer> |
| 85 | <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> | 85 | <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> |
| 86 | </template> | 86 | </template> |
| 87 | </uni-list-item> | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | 88 | + <uni-list-item title="长度mm"> |
| 89 | <template v-slot:footer> | 89 | <template v-slot:footer> |
| 90 | <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> | 90 | <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> |
| 91 | </template> | 91 | </template> |
| 92 | </uni-list-item> | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | 93 | + <uni-list-item title="长度公差(单项+)mm"> |
| 94 | <template v-slot:footer> | 94 | <template v-slot:footer> |
| 95 | <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" | 95 | <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" |
| 96 | placeholder="请输入长度公差(单项+)" /> | 96 | placeholder="请输入长度公差(单项+)" /> |
| 97 | </template> | 97 | </template> |
| 98 | </uni-list-item> | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | 99 | + <uni-list-item title="长度公差(单项-)mm"> |
| 100 | <template v-slot:footer> | 100 | <template v-slot:footer> |
| 101 | <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" | 101 | <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" |
| 102 | placeholder="请输入长度公差(单项-)" /> | 102 | placeholder="请输入长度公差(单项-)" /> |
| @@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
| 129 | </uni-list-item> | 129 | </uni-list-item> |
| 130 | <uni-list-item title="发货日期"> | 130 | <uni-list-item title="发货日期"> |
| 131 | <template v-slot:footer> | 131 | <template v-slot:footer> |
| 132 | - <uni-datetime-picker type="date" v-model="item.orderDate" @change="onDateChange(idx, $event)" /> | 132 | + <uni-datetime-picker type="date" v-model="item.deliveryDate" @change="onDateChange(idx, $event)" /> |
| 133 | </template> | 133 | </template> |
| 134 | </uni-list-item> | 134 | </uni-list-item> |
| 135 | </uni-list> | 135 | </uni-list> |
| @@ -151,7 +151,30 @@ | @@ -151,7 +151,30 @@ | ||
| 151 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> | 151 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 152 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 152 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 153 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> | 153 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> |
| 154 | - <view class="row"><text class="label">规格</text><text class="value">{{ item.specDisplay }}</text></view> | 154 | + <!-- 厚(公差) * 宽(公差) * 长(公差) --> |
| 155 | + <view class="row row-spec"><text class="label">规格(mm)</text> | ||
| 156 | + <view class="value value-spec"> | ||
| 157 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 158 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 159 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }} | ||
| 160 | + </view> | ||
| 161 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }} | ||
| 162 | + </view> | ||
| 163 | + </view> | ||
| 164 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 165 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 166 | + <view v-if="item.width" class="value-spec_box"> | ||
| 167 | + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view> | ||
| 168 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view> | ||
| 169 | + </view> | ||
| 170 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 171 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 172 | + <view v-if="item.length" class="value-spec_box"> | ||
| 173 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view> | ||
| 174 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view> | ||
| 175 | + </view> | ||
| 176 | + </view> | ||
| 177 | + </view> | ||
| 155 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> | 178 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 156 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> | 179 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 157 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) | 180 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| @@ -162,7 +185,7 @@ | @@ -162,7 +185,7 @@ | ||
| 162 | }}</text></view> | 185 | }}</text></view> |
| 163 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) | 186 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 164 | }}</text></view> | 187 | }}</text></view> |
| 165 | - <view class="row"><text class="label">发货日期</text><text class="value">{{ item.orderDate }}</text></view> | 188 | + <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text></view> |
| 166 | </view> | 189 | </view> |
| 167 | </view> | 190 | </view> |
| 168 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> | 191 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> |
| @@ -176,7 +199,7 @@ export default { | @@ -176,7 +199,7 @@ export default { | ||
| 176 | mode: { type: String, default: 'add' }, | 199 | mode: { type: String, default: 'add' }, |
| 177 | list: { type: Array, default: () => [] }, | 200 | list: { type: Array, default: () => [] }, |
| 178 | max: { type: Number, default: 8 }, | 201 | max: { type: Number, default: 8 }, |
| 179 | - orderDateBase: { type: String, default: '' }, | 202 | + deliveryDateBase: { type: String, default: '' }, |
| 180 | options: { type: Array, default: () => [] } | 203 | options: { type: Array, default: () => [] } |
| 181 | }, | 204 | }, |
| 182 | components: { SingleSelectSheet }, | 205 | components: { SingleSelectSheet }, |
| @@ -218,7 +241,7 @@ export default { | @@ -218,7 +241,7 @@ export default { | ||
| 218 | }, | 241 | }, |
| 219 | methods: { | 242 | methods: { |
| 220 | defaultItem() { | 243 | defaultItem() { |
| 221 | - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, orderDate: '' } | 244 | + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '' } |
| 222 | }, | 245 | }, |
| 223 | onImmediateChange(idx) { | 246 | onImmediateChange(idx) { |
| 224 | this.$nextTick(() => this.recalculate(idx)) | 247 | this.$nextTick(() => this.recalculate(idx)) |
| @@ -319,15 +342,15 @@ export default { | @@ -319,15 +342,15 @@ export default { | ||
| 319 | onDateChange(idx, e) { | 342 | onDateChange(idx, e) { |
| 320 | const it = this.items[idx] | 343 | const it = this.items[idx] |
| 321 | if (!it) return | 344 | if (!it) return |
| 322 | - const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.orderDate | 345 | + const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.deliveryDate |
| 323 | const dateStr = String(val).slice(0, 10) | 346 | const dateStr = String(val).slice(0, 10) |
| 324 | - const base = this.orderDateBase ? new Date(this.orderDateBase) : null | 347 | + const base = this.deliveryDateBase ? new Date(this.deliveryDateBase) : null |
| 325 | const d = new Date(dateStr) | 348 | const d = new Date(dateStr) |
| 326 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { | 349 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 327 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) | 350 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 328 | - it.orderDate = this.orderDateBase | 351 | + it.deliveryDate = this.deliveryDateBase |
| 329 | } else { | 352 | } else { |
| 330 | - it.orderDate = dateStr | 353 | + it.deliveryDate = dateStr |
| 331 | } | 354 | } |
| 332 | this.$set(this.items, idx, it) | 355 | this.$set(this.items, idx, it) |
| 333 | }, | 356 | }, |
| @@ -500,8 +523,46 @@ export default { | @@ -500,8 +523,46 @@ export default { | ||
| 500 | 523 | ||
| 501 | .value { | 524 | .value { |
| 502 | flex: 1; | 525 | flex: 1; |
| 503 | - text-align: right; | 526 | + // text-align: right; |
| 504 | color: rgba(0, 0, 0, 0.9); | 527 | color: rgba(0, 0, 0, 0.9); |
| 505 | font-size: 28rpx; | 528 | font-size: 28rpx; |
| 506 | } | 529 | } |
| 530 | + .value-spec { | ||
| 531 | + height: 48rpx; | ||
| 532 | + display: flex; | ||
| 533 | + align-items: center; | ||
| 534 | + color: #000000; | ||
| 535 | + // justify-content: end; | ||
| 536 | + &_box { | ||
| 537 | + position: relative; | ||
| 538 | + width: 60rpx; | ||
| 539 | + height: 48rpx; | ||
| 540 | + | ||
| 541 | + &_1 { | ||
| 542 | + font-size: 16rpx; | ||
| 543 | + position: absolute; | ||
| 544 | + top: -10rpx; | ||
| 545 | + left: 0; | ||
| 546 | + } | ||
| 547 | + | ||
| 548 | + &_2 { | ||
| 549 | + font-size: 16rpx; | ||
| 550 | + position: absolute; | ||
| 551 | + bottom: -10rpx; | ||
| 552 | + left: 0; | ||
| 553 | + } | ||
| 554 | + } | ||
| 555 | + | ||
| 556 | + &_val { | ||
| 557 | + font-size: 28rpx; | ||
| 558 | + | ||
| 559 | + &.p12 { | ||
| 560 | + padding-right: 12rpx; | ||
| 561 | + } | ||
| 562 | + } | ||
| 563 | + } | ||
| 564 | + .row-spec { | ||
| 565 | + height: 60rpx; | ||
| 566 | + align-items: center; | ||
| 567 | + } | ||
| 507 | </style> | 568 | </style> |
| 1 | { | 1 | { |
| 2 | - "pages": [{ | 2 | + "pages": [ |
| 3 | + { | ||
| 3 | "path": "pages/login", | 4 | "path": "pages/login", |
| 4 | "style": { | 5 | "style": { |
| 5 | "navigationBarTitleText": "登录", | 6 | "navigationBarTitleText": "登录", |
| 6 | "navigationStyle": "custom" | 7 | "navigationStyle": "custom" |
| 7 | } | 8 | } |
| 8 | - }, { | 9 | + }, |
| 10 | + { | ||
| 9 | "path": "pages/register", | 11 | "path": "pages/register", |
| 10 | "style": { | 12 | "style": { |
| 11 | "navigationBarTitleText": "注册" | 13 | "navigationBarTitleText": "注册" |
| 12 | } | 14 | } |
| 13 | - }, { | 15 | + }, |
| 16 | + { | ||
| 14 | "path": "pages/index", | 17 | "path": "pages/index", |
| 15 | "style": { | 18 | "style": { |
| 16 | "navigationBarTitleText": "首页", | 19 | "navigationBarTitleText": "首页", |
| 17 | "navigationStyle": "custom" | 20 | "navigationStyle": "custom" |
| 18 | } | 21 | } |
| 19 | - }, { | 22 | + }, |
| 23 | + { | ||
| 20 | "path": "pages/mine/index", | 24 | "path": "pages/mine/index", |
| 21 | "style": { | 25 | "style": { |
| 22 | "navigationBarTitleText": "我的", | 26 | "navigationBarTitleText": "我的", |
| 23 | "navigationBarTextStyle": "white" | 27 | "navigationBarTextStyle": "white" |
| 24 | } | 28 | } |
| 25 | - }, { | 29 | + }, |
| 30 | + { | ||
| 26 | "path": "pages/mine/index2", | 31 | "path": "pages/mine/index2", |
| 27 | "style": { | 32 | "style": { |
| 28 | "navigationBarTitleText": "我的2" | 33 | "navigationBarTitleText": "我的2" |
| 29 | } | 34 | } |
| 30 | - }, { | 35 | + }, |
| 36 | + { | ||
| 31 | "path": "pages/mine/info/index", | 37 | "path": "pages/mine/info/index", |
| 32 | "style": { | 38 | "style": { |
| 33 | "navigationBarTitleText": "个人信息" | 39 | "navigationBarTitleText": "个人信息" |
| 34 | } | 40 | } |
| 35 | - }, { | 41 | + }, |
| 42 | + { | ||
| 36 | "path": "pages/mine/pwd/index", | 43 | "path": "pages/mine/pwd/index", |
| 37 | "style": { | 44 | "style": { |
| 38 | "navigationBarTitleText": "修改密码" | 45 | "navigationBarTitleText": "修改密码" |
| 39 | } | 46 | } |
| 40 | - }, { | 47 | + }, |
| 48 | + { | ||
| 41 | "path": "pages/mine/setting/index", | 49 | "path": "pages/mine/setting/index", |
| 42 | "style": { | 50 | "style": { |
| 43 | "navigationBarTitleText": "应用设置" | 51 | "navigationBarTitleText": "应用设置" |
| 44 | } | 52 | } |
| 45 | - }, { | 53 | + }, |
| 54 | + { | ||
| 46 | "path": "pages/mine/about/index", | 55 | "path": "pages/mine/about/index", |
| 47 | "style": { | 56 | "style": { |
| 48 | "navigationBarTitleText": "关于我们" | 57 | "navigationBarTitleText": "关于我们" |
| 49 | } | 58 | } |
| 50 | - }, { | 59 | + }, |
| 60 | + { | ||
| 51 | "path": "pages/dev_manage/index", | 61 | "path": "pages/dev_manage/index", |
| 52 | "style": { | 62 | "style": { |
| 53 | "navigationBarTitleText": "客户开发管理", | 63 | "navigationBarTitleText": "客户开发管理", |
| 54 | "navigationBarBackgroundColor": "#ffffff", | 64 | "navigationBarBackgroundColor": "#ffffff", |
| 55 | "navigationBarTextStyle": "black" | 65 | "navigationBarTextStyle": "black" |
| 56 | } | 66 | } |
| 57 | - }, { | ||
| 58 | - "path": "pages/dev_manage/add", | ||
| 59 | - "style": { | ||
| 60 | - "navigationBarTitleText": "新增客户开发", | ||
| 61 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 62 | - "navigationBarTextStyle": "black" | ||
| 63 | - } | ||
| 64 | - }, { | ||
| 65 | - "path": "pages/dev_manage/modify", | ||
| 66 | - "style": { | ||
| 67 | - "navigationBarTitleText": "编辑客户开发", | ||
| 68 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 69 | - "navigationBarTextStyle": "black" | ||
| 70 | - } | ||
| 71 | - }, { | 67 | + }, |
| 68 | + { | ||
| 72 | "path": "pages/dev_manage/add", | 69 | "path": "pages/dev_manage/add", |
| 73 | "style": { | 70 | "style": { |
| 74 | "navigationBarTitleText": "新增客户开发", | 71 | "navigationBarTitleText": "新增客户开发", |
| 75 | "navigationBarBackgroundColor": "#ffffff", | 72 | "navigationBarBackgroundColor": "#ffffff", |
| 76 | "navigationBarTextStyle": "black" | 73 | "navigationBarTextStyle": "black" |
| 77 | } | 74 | } |
| 78 | - }, { | ||
| 79 | - "path": "pages/dev_manage/detail", | ||
| 80 | - "style": { | ||
| 81 | - "navigationBarTitleText": "查看客户开发", | ||
| 82 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 83 | - "navigationBarTextStyle": "black" | ||
| 84 | - } | ||
| 85 | - }, { | ||
| 86 | - "path": "pages/credit_manage/index", | ||
| 87 | - "style": { | ||
| 88 | - "navigationBarTitleText": "客户资信管理", | ||
| 89 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 90 | - "navigationBarTextStyle": "black" | ||
| 91 | - } | ||
| 92 | - }, { | ||
| 93 | - "path": "pages/credit_manage/add", | ||
| 94 | - "style": { | ||
| 95 | - "navigationBarTitleText": "新增客户资信", | ||
| 96 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 97 | - "navigationBarTextStyle": "black" | ||
| 98 | - } | ||
| 99 | - }, { | ||
| 100 | - "path": "pages/credit_manage/detail", | ||
| 101 | - "style": { | ||
| 102 | - "navigationBarTitleText": "查看客户资信", | ||
| 103 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 104 | - "navigationBarTextStyle": "black" | ||
| 105 | - } | ||
| 106 | - }, { | ||
| 107 | - "path": "pages/credit_manage/modify", | ||
| 108 | - "style": { | ||
| 109 | - "navigationBarTitleText": "编辑客户资信", | ||
| 110 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 111 | - "navigationBarTextStyle": "black" | ||
| 112 | - } | ||
| 113 | - }, { | ||
| 114 | - "path": "pages/credit_manage/change", | 75 | + }, |
| 76 | + { | ||
| 77 | + "path": "pages/dev_manage/modify", | ||
| 115 | "style": { | 78 | "style": { |
| 116 | - "navigationBarTitleText": "申请客户资信变更", | 79 | + "navigationBarTitleText": "编辑客户开发", |
| 117 | "navigationBarBackgroundColor": "#ffffff", | 80 | "navigationBarBackgroundColor": "#ffffff", |
| 118 | "navigationBarTextStyle": "black" | 81 | "navigationBarTextStyle": "black" |
| 119 | } | 82 | } |
| 120 | - }, { | ||
| 121 | - "path": "pages/credit_manage/history_detail", | 83 | + }, |
| 84 | + { | ||
| 85 | + "path": "pages/dev_manage/visit_add", | ||
| 122 | "style": { | 86 | "style": { |
| 123 | - "navigationBarTitleText": "变更记录详情", | 87 | + "navigationBarTitleText": "新增拜访记录", |
| 124 | "navigationBarBackgroundColor": "#ffffff", | 88 | "navigationBarBackgroundColor": "#ffffff", |
| 125 | "navigationBarTextStyle": "black" | 89 | "navigationBarTextStyle": "black" |
| 126 | } | 90 | } |
| 127 | }, | 91 | }, |
| 128 | - { | ||
| 129 | - "path": "pages/flow/myflow", | ||
| 130 | - "style": { | ||
| 131 | - "navigationBarTitleText": "我发起的", | ||
| 132 | - "navigationBarBackgroundColor": "#ffffff", | 92 | + { |
| 93 | + "path": "pages/dev_manage/add", | ||
| 94 | + "style": { | ||
| 95 | + "navigationBarTitleText": "新增客户开发", | ||
| 96 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 97 | + "navigationBarTextStyle": "black" | ||
| 98 | + } | ||
| 99 | + }, | ||
| 100 | + { | ||
| 101 | + "path": "pages/dev_manage/detail", | ||
| 102 | + "style": { | ||
| 103 | + "navigationBarTitleText": "查看客户开发", | ||
| 104 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 105 | + "navigationBarTextStyle": "black" | ||
| 106 | + } | ||
| 107 | + }, | ||
| 108 | + { | ||
| 109 | + "path": "pages/credit_manage/index", | ||
| 110 | + "style": { | ||
| 111 | + "navigationBarTitleText": "客户资信管理", | ||
| 112 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 113 | + "navigationBarTextStyle": "black" | ||
| 114 | + } | ||
| 115 | + }, | ||
| 116 | + { | ||
| 117 | + "path": "pages/credit_manage/add", | ||
| 118 | + "style": { | ||
| 119 | + "navigationBarTitleText": "新增客户资信", | ||
| 120 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 121 | + "navigationBarTextStyle": "black" | ||
| 122 | + } | ||
| 123 | + }, | ||
| 124 | + { | ||
| 125 | + "path": "pages/credit_manage/detail", | ||
| 126 | + "style": { | ||
| 127 | + "navigationBarTitleText": "查看客户资信", | ||
| 128 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 129 | + "navigationBarTextStyle": "black" | ||
| 130 | + } | ||
| 131 | + }, | ||
| 132 | + { | ||
| 133 | + "path": "pages/credit_manage/modify", | ||
| 134 | + "style": { | ||
| 135 | + "navigationBarTitleText": "编辑客户资信", | ||
| 136 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 137 | + "navigationBarTextStyle": "black" | ||
| 138 | + } | ||
| 139 | + }, | ||
| 140 | + { | ||
| 141 | + "path": "pages/credit_manage/change", | ||
| 142 | + "style": { | ||
| 143 | + "navigationBarTitleText": "申请客户资信变更", | ||
| 144 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 145 | + "navigationBarTextStyle": "black" | ||
| 146 | + } | ||
| 147 | + }, | ||
| 148 | + { | ||
| 149 | + "path": "pages/credit_manage/history_detail", | ||
| 150 | + "style": { | ||
| 151 | + "navigationBarTitleText": "变更记录详情", | ||
| 152 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 153 | + "navigationBarTextStyle": "black" | ||
| 154 | + } | ||
| 155 | + }, | ||
| 156 | + { | ||
| 157 | + "path": "pages/flow/myflow", | ||
| 158 | + "style": { | ||
| 159 | + "navigationBarTitleText": "我发起的", | ||
| 160 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 133 | "navigationBarTextStyle": "black" | 161 | "navigationBarTextStyle": "black" |
| 134 | } | 162 | } |
| 135 | }, | 163 | }, |
| @@ -149,395 +177,452 @@ | @@ -149,395 +177,452 @@ | ||
| 149 | "navigationBarTextStyle": "black" | 177 | "navigationBarTextStyle": "black" |
| 150 | } | 178 | } |
| 151 | }, | 179 | }, |
| 152 | - { | ||
| 153 | - "path": "pages/flow/audit", | ||
| 154 | - "style": { | ||
| 155 | - "navigationBarTitleText": "审核", | ||
| 156 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 157 | - "navigationBarTextStyle": "black" | ||
| 158 | - } | ||
| 159 | - }, | ||
| 160 | - { | ||
| 161 | - "path": "pages/order_list/index", | ||
| 162 | - "style": { | ||
| 163 | - "navigationBarTitleText": "订货单列表", | ||
| 164 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 165 | - "navigationBarTextStyle": "black" | ||
| 166 | - } | ||
| 167 | - },{ | ||
| 168 | - "path": "pages/order_list/detail", | ||
| 169 | - "style": { | ||
| 170 | - "navigationBarTitleText": "查看订货单", | ||
| 171 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 172 | - "navigationBarTextStyle": "black" | ||
| 173 | - } | ||
| 174 | - }, | ||
| 175 | - { | ||
| 176 | - "path": "pages/order_list/modify", | ||
| 177 | - "style": { | ||
| 178 | - "navigationBarTitleText": "编辑订货单", | ||
| 179 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 180 | - "navigationBarTextStyle": "black" | ||
| 181 | - } | ||
| 182 | - }, | ||
| 183 | - { | ||
| 184 | - "path": "pages/order_list/shipment_apply", | ||
| 185 | - "style": { | ||
| 186 | - "navigationBarTitleText": "申请发货", | ||
| 187 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 188 | - "navigationBarTextStyle": "black" | ||
| 189 | - } | ||
| 190 | - }, | ||
| 191 | - { | ||
| 192 | - "path": "pages/revoke_list/index", | ||
| 193 | - "style": { | ||
| 194 | - "navigationBarTitleText": "撤销单列表", | ||
| 195 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 196 | - "navigationBarTextStyle": "black" | ||
| 197 | - } | ||
| 198 | - },{ | ||
| 199 | - "path": "pages/revoke_list/add", | ||
| 200 | - "style": { | ||
| 201 | - "navigationBarTitleText": "新增撤销单", | ||
| 202 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 203 | - "navigationBarTextStyle": "black" | ||
| 204 | - } | ||
| 205 | - },{ | ||
| 206 | - "path": "pages/revoke_list/detail", | ||
| 207 | - "style": { | ||
| 208 | - "navigationBarTitleText": "查看撤销单", | ||
| 209 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 210 | - "navigationBarTextStyle": "black" | ||
| 211 | - } | ||
| 212 | - },{ | ||
| 213 | - "path": "pages/revoke_list/modify", | ||
| 214 | - "style": { | ||
| 215 | - "navigationBarTitleText": "编辑撤销单", | ||
| 216 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 217 | - "navigationBarTextStyle": "black" | ||
| 218 | - } | ||
| 219 | - }, | ||
| 220 | - { | ||
| 221 | - "path": "pages/change_list/index", | ||
| 222 | - "style": { | ||
| 223 | - "navigationBarTitleText": "规格变更单", | ||
| 224 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 225 | - "navigationBarTextStyle": "black" | ||
| 226 | - } | ||
| 227 | - },{ | ||
| 228 | - "path": "pages/change_list/add", | ||
| 229 | - "style": { | ||
| 230 | - "navigationBarTitleText": "新增规格变更单", | ||
| 231 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 232 | - "navigationBarTextStyle": "black" | ||
| 233 | - } | ||
| 234 | - },{ | ||
| 235 | - "path": "pages/change_list/detail", | ||
| 236 | - "style": { | ||
| 237 | - "navigationBarTitleText": "查看规格变更单", | ||
| 238 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 239 | - "navigationBarTextStyle": "black" | ||
| 240 | - } | ||
| 241 | - },{ | ||
| 242 | - "path": "pages/change_list/modify", | ||
| 243 | - "style": { | ||
| 244 | - "navigationBarTitleText": "编辑规格变更单", | ||
| 245 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 246 | - "navigationBarTextStyle": "black" | ||
| 247 | - } | ||
| 248 | - }, | ||
| 249 | - { | ||
| 250 | - "path": "pages/contract_framework/index", | ||
| 251 | - "style": { | ||
| 252 | - "navigationBarTitleText": "框架合同", | ||
| 253 | - "navigationBarBackgroundColor": "#ffffff", | 180 | + { |
| 181 | + "path": "pages/flow/audit", | ||
| 182 | + "style": { | ||
| 183 | + "navigationBarTitleText": "审核", | ||
| 184 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 185 | + "navigationBarTextStyle": "black" | ||
| 186 | + } | ||
| 187 | + }, | ||
| 188 | + { | ||
| 189 | + "path": "pages/order_list/index", | ||
| 190 | + "style": { | ||
| 191 | + "navigationBarTitleText": "订货单列表", | ||
| 192 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 193 | + "navigationBarTextStyle": "black" | ||
| 194 | + } | ||
| 195 | + }, | ||
| 196 | + { | ||
| 197 | + "path": "pages/order_list/detail", | ||
| 198 | + "style": { | ||
| 199 | + "navigationBarTitleText": "查看订货单", | ||
| 200 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 201 | + "navigationBarTextStyle": "black" | ||
| 202 | + } | ||
| 203 | + }, | ||
| 204 | + { | ||
| 205 | + "path": "pages/order_list/modify", | ||
| 206 | + "style": { | ||
| 207 | + "navigationBarTitleText": "编辑订货单", | ||
| 208 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 209 | + "navigationBarTextStyle": "black" | ||
| 210 | + } | ||
| 211 | + }, | ||
| 212 | + { | ||
| 213 | + "path": "pages/order_list/shipment_apply", | ||
| 214 | + "style": { | ||
| 215 | + "navigationBarTitleText": "申请发货", | ||
| 216 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 254 | "navigationBarTextStyle": "black" | 217 | "navigationBarTextStyle": "black" |
| 255 | } | 218 | } |
| 256 | - }, { | 219 | + }, |
| 220 | + { | ||
| 221 | + "path": "pages/revoke_list/index", | ||
| 222 | + "style": { | ||
| 223 | + "navigationBarTitleText": "撤销单列表", | ||
| 224 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 225 | + "navigationBarTextStyle": "black" | ||
| 226 | + } | ||
| 227 | + }, | ||
| 228 | + { | ||
| 229 | + "path": "pages/revoke_list/add", | ||
| 230 | + "style": { | ||
| 231 | + "navigationBarTitleText": "新增撤销单", | ||
| 232 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 233 | + "navigationBarTextStyle": "black" | ||
| 234 | + } | ||
| 235 | + }, | ||
| 236 | + { | ||
| 237 | + "path": "pages/revoke_list/detail", | ||
| 238 | + "style": { | ||
| 239 | + "navigationBarTitleText": "查看撤销单", | ||
| 240 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 241 | + "navigationBarTextStyle": "black" | ||
| 242 | + } | ||
| 243 | + }, | ||
| 244 | + { | ||
| 245 | + "path": "pages/revoke_list/modify", | ||
| 246 | + "style": { | ||
| 247 | + "navigationBarTitleText": "编辑撤销单", | ||
| 248 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 249 | + "navigationBarTextStyle": "black" | ||
| 250 | + } | ||
| 251 | + }, | ||
| 252 | + { | ||
| 253 | + "path": "pages/change_list/index", | ||
| 254 | + "style": { | ||
| 255 | + "navigationBarTitleText": "规格变更单", | ||
| 256 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 257 | + "navigationBarTextStyle": "black" | ||
| 258 | + } | ||
| 259 | + }, | ||
| 260 | + { | ||
| 261 | + "path": "pages/change_list/add", | ||
| 262 | + "style": { | ||
| 263 | + "navigationBarTitleText": "新增规格变更单", | ||
| 264 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 265 | + "navigationBarTextStyle": "black" | ||
| 266 | + } | ||
| 267 | + }, | ||
| 268 | + { | ||
| 269 | + "path": "pages/change_list/detail", | ||
| 270 | + "style": { | ||
| 271 | + "navigationBarTitleText": "查看规格变更单", | ||
| 272 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 273 | + "navigationBarTextStyle": "black" | ||
| 274 | + } | ||
| 275 | + }, | ||
| 276 | + { | ||
| 277 | + "path": "pages/change_list/modify", | ||
| 278 | + "style": { | ||
| 279 | + "navigationBarTitleText": "编辑规格变更单", | ||
| 280 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 281 | + "navigationBarTextStyle": "black" | ||
| 282 | + } | ||
| 283 | + }, | ||
| 284 | + { | ||
| 285 | + "path": "pages/contract_framework/index", | ||
| 286 | + "style": { | ||
| 287 | + "navigationBarTitleText": "框架合同", | ||
| 288 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 289 | + "navigationBarTextStyle": "black" | ||
| 290 | + } | ||
| 291 | + }, | ||
| 292 | + { | ||
| 257 | "path": "pages/contract_framework/add", | 293 | "path": "pages/contract_framework/add", |
| 258 | "style": { | 294 | "style": { |
| 259 | "navigationBarTitleText": "新增框架合同", | 295 | "navigationBarTitleText": "新增框架合同", |
| 260 | "navigationBarBackgroundColor": "#ffffff", | 296 | "navigationBarBackgroundColor": "#ffffff", |
| 261 | "navigationBarTextStyle": "black" | 297 | "navigationBarTextStyle": "black" |
| 262 | } | 298 | } |
| 263 | - }, { | ||
| 264 | - "path": "pages/contract_framework/detail", | ||
| 265 | - "style": { | ||
| 266 | - "navigationBarTitleText": "框架合同详情", | ||
| 267 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 268 | - "navigationBarTextStyle": "black" | ||
| 269 | - } | ||
| 270 | - }, { | ||
| 271 | - "path": "pages/contract_framework/modify", | ||
| 272 | - "style": { | ||
| 273 | - "navigationBarTitleText": "编辑框架合同", | ||
| 274 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 275 | - "navigationBarTextStyle": "black" | ||
| 276 | - } | ||
| 277 | - },{ | ||
| 278 | - "path": "pages/contract_retail/index", | ||
| 279 | - "style": { | ||
| 280 | - "navigationBarTitleText": "经销标准合同", | ||
| 281 | - "navigationBarBackgroundColor": "#ffffff", | ||
| 282 | - "navigationBarTextStyle": "black" | ||
| 283 | - } | ||
| 284 | - }, { | 299 | + }, |
| 300 | + { | ||
| 301 | + "path": "pages/contract_framework/detail", | ||
| 302 | + "style": { | ||
| 303 | + "navigationBarTitleText": "框架合同详情", | ||
| 304 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 305 | + "navigationBarTextStyle": "black" | ||
| 306 | + } | ||
| 307 | + }, | ||
| 308 | + { | ||
| 309 | + "path": "pages/contract_framework/modify", | ||
| 310 | + "style": { | ||
| 311 | + "navigationBarTitleText": "编辑框架合同", | ||
| 312 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 313 | + "navigationBarTextStyle": "black" | ||
| 314 | + } | ||
| 315 | + }, | ||
| 316 | + { | ||
| 317 | + "path": "pages/contract_retail/index", | ||
| 318 | + "style": { | ||
| 319 | + "navigationBarTitleText": "经销标准合同", | ||
| 320 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 321 | + "navigationBarTextStyle": "black" | ||
| 322 | + } | ||
| 323 | + }, | ||
| 324 | + { | ||
| 285 | "path": "pages/contract_retail/add", | 325 | "path": "pages/contract_retail/add", |
| 286 | "style": { | 326 | "style": { |
| 287 | "navigationBarTitleText": "新增经销标准合同", | 327 | "navigationBarTitleText": "新增经销标准合同", |
| 288 | "navigationBarBackgroundColor": "#ffffff", | 328 | "navigationBarBackgroundColor": "#ffffff", |
| 289 | "navigationBarTextStyle": "black" | 329 | "navigationBarTextStyle": "black" |
| 290 | } | 330 | } |
| 291 | - },{ | 331 | + }, |
| 332 | + { | ||
| 292 | "path": "pages/contract_retail/detail", | 333 | "path": "pages/contract_retail/detail", |
| 293 | "style": { | 334 | "style": { |
| 294 | "navigationBarTitleText": "经销标准合同详情", | 335 | "navigationBarTitleText": "经销标准合同详情", |
| 295 | "navigationBarBackgroundColor": "#ffffff", | 336 | "navigationBarBackgroundColor": "#ffffff", |
| 296 | "navigationBarTextStyle": "black" | 337 | "navigationBarTextStyle": "black" |
| 297 | } | 338 | } |
| 298 | - },{ | 339 | + }, |
| 340 | + { | ||
| 299 | "path": "pages/contract_retail/modify", | 341 | "path": "pages/contract_retail/modify", |
| 300 | "style": { | 342 | "style": { |
| 301 | "navigationBarTitleText": "编辑经销标准合同", | 343 | "navigationBarTitleText": "编辑经销标准合同", |
| 302 | "navigationBarBackgroundColor": "#ffffff", | 344 | "navigationBarBackgroundColor": "#ffffff", |
| 303 | "navigationBarTextStyle": "black" | 345 | "navigationBarTextStyle": "black" |
| 304 | } | 346 | } |
| 305 | - },{ | 347 | + }, |
| 348 | + { | ||
| 306 | "path": "pages/contract_stock/index", | 349 | "path": "pages/contract_stock/index", |
| 307 | "style": { | 350 | "style": { |
| 308 | "navigationBarTitleText": "经销库存合同", | 351 | "navigationBarTitleText": "经销库存合同", |
| 309 | "navigationBarBackgroundColor": "#ffffff", | 352 | "navigationBarBackgroundColor": "#ffffff", |
| 310 | "navigationBarTextStyle": "black" | 353 | "navigationBarTextStyle": "black" |
| 311 | } | 354 | } |
| 312 | - }, { | 355 | + }, |
| 356 | + { | ||
| 313 | "path": "pages/contract_stock/add", | 357 | "path": "pages/contract_stock/add", |
| 314 | "style": { | 358 | "style": { |
| 315 | "navigationBarTitleText": "新增经销库存合同", | 359 | "navigationBarTitleText": "新增经销库存合同", |
| 316 | "navigationBarBackgroundColor": "#ffffff", | 360 | "navigationBarBackgroundColor": "#ffffff", |
| 317 | "navigationBarTextStyle": "black" | 361 | "navigationBarTextStyle": "black" |
| 318 | } | 362 | } |
| 319 | - },{ | 363 | + }, |
| 364 | + { | ||
| 320 | "path": "pages/contract_stock/detail", | 365 | "path": "pages/contract_stock/detail", |
| 321 | "style": { | 366 | "style": { |
| 322 | "navigationBarTitleText": "经销库存合同详情", | 367 | "navigationBarTitleText": "经销库存合同详情", |
| 323 | "navigationBarBackgroundColor": "#ffffff", | 368 | "navigationBarBackgroundColor": "#ffffff", |
| 324 | "navigationBarTextStyle": "black" | 369 | "navigationBarTextStyle": "black" |
| 325 | } | 370 | } |
| 326 | - },{ | 371 | + }, |
| 372 | + { | ||
| 327 | "path": "pages/contract_stock/modify", | 373 | "path": "pages/contract_stock/modify", |
| 328 | "style": { | 374 | "style": { |
| 329 | "navigationBarTitleText": "编辑经销库存合同", | 375 | "navigationBarTitleText": "编辑经销库存合同", |
| 330 | "navigationBarBackgroundColor": "#ffffff", | 376 | "navigationBarBackgroundColor": "#ffffff", |
| 331 | "navigationBarTextStyle": "black" | 377 | "navigationBarTextStyle": "black" |
| 332 | } | 378 | } |
| 333 | - },{ | 379 | + }, |
| 380 | + { | ||
| 334 | "path": "pages/contract_stock/lock", | 381 | "path": "pages/contract_stock/lock", |
| 335 | "style": { | 382 | "style": { |
| 336 | "navigationBarTitleText": "锁价", | 383 | "navigationBarTitleText": "锁价", |
| 337 | "navigationBarBackgroundColor": "#ffffff", | 384 | "navigationBarBackgroundColor": "#ffffff", |
| 338 | "navigationBarTextStyle": "black" | 385 | "navigationBarTextStyle": "black" |
| 339 | } | 386 | } |
| 340 | - },{ | 387 | + }, |
| 388 | + { | ||
| 341 | "path": "pages/contract_unplan/index", | 389 | "path": "pages/contract_unplan/index", |
| 342 | "style": { | 390 | "style": { |
| 343 | "navigationBarTitleText": "经销未锁规合同", | 391 | "navigationBarTitleText": "经销未锁规合同", |
| 344 | "navigationBarBackgroundColor": "#ffffff", | 392 | "navigationBarBackgroundColor": "#ffffff", |
| 345 | "navigationBarTextStyle": "black" | 393 | "navigationBarTextStyle": "black" |
| 346 | } | 394 | } |
| 347 | - },{ | 395 | + }, |
| 396 | + { | ||
| 348 | "path": "pages/contract_unplan/add", | 397 | "path": "pages/contract_unplan/add", |
| 349 | "style": { | 398 | "style": { |
| 350 | "navigationBarTitleText": "新增经销未锁规合同", | 399 | "navigationBarTitleText": "新增经销未锁规合同", |
| 351 | "navigationBarBackgroundColor": "#ffffff", | 400 | "navigationBarBackgroundColor": "#ffffff", |
| 352 | "navigationBarTextStyle": "black" | 401 | "navigationBarTextStyle": "black" |
| 353 | } | 402 | } |
| 354 | - },{ | 403 | + }, |
| 404 | + { | ||
| 355 | "path": "pages/contract_unplan/detail", | 405 | "path": "pages/contract_unplan/detail", |
| 356 | "style": { | 406 | "style": { |
| 357 | "navigationBarTitleText": "经销未锁规合同详情", | 407 | "navigationBarTitleText": "经销未锁规合同详情", |
| 358 | "navigationBarBackgroundColor": "#ffffff", | 408 | "navigationBarBackgroundColor": "#ffffff", |
| 359 | "navigationBarTextStyle": "black" | 409 | "navigationBarTextStyle": "black" |
| 360 | } | 410 | } |
| 361 | - },{ | 411 | + }, |
| 412 | + { | ||
| 362 | "path": "pages/contract_unplan/modify", | 413 | "path": "pages/contract_unplan/modify", |
| 363 | "style": { | 414 | "style": { |
| 364 | "navigationBarTitleText": "编辑经销未锁规合同", | 415 | "navigationBarTitleText": "编辑经销未锁规合同", |
| 365 | "navigationBarBackgroundColor": "#ffffff", | 416 | "navigationBarBackgroundColor": "#ffffff", |
| 366 | "navigationBarTextStyle": "black" | 417 | "navigationBarTextStyle": "black" |
| 367 | } | 418 | } |
| 368 | - },{ | 419 | + }, |
| 420 | + { | ||
| 369 | "path": "pages/contract_unplan/lock", | 421 | "path": "pages/contract_unplan/lock", |
| 370 | "style": { | 422 | "style": { |
| 371 | "navigationBarTitleText": "锁规", | 423 | "navigationBarTitleText": "锁规", |
| 372 | "navigationBarBackgroundColor": "#ffffff", | 424 | "navigationBarBackgroundColor": "#ffffff", |
| 373 | "navigationBarTextStyle": "black" | 425 | "navigationBarTextStyle": "black" |
| 374 | } | 426 | } |
| 375 | - }, { | 427 | + }, |
| 428 | + { | ||
| 376 | "path": "pages/contract_unplan/lock_apply", | 429 | "path": "pages/contract_unplan/lock_apply", |
| 377 | "style": { | 430 | "style": { |
| 378 | "navigationBarTitleText": "锁规延期申请", | 431 | "navigationBarTitleText": "锁规延期申请", |
| 379 | "navigationBarBackgroundColor": "#ffffff", | 432 | "navigationBarBackgroundColor": "#ffffff", |
| 380 | "navigationBarTextStyle": "black" | 433 | "navigationBarTextStyle": "black" |
| 381 | } | 434 | } |
| 382 | - },{ | 435 | + }, |
| 436 | + { | ||
| 383 | "path": "pages/contract_process/index", | 437 | "path": "pages/contract_process/index", |
| 384 | "style": { | 438 | "style": { |
| 385 | "navigationBarTitleText": "加工标准合同", | 439 | "navigationBarTitleText": "加工标准合同", |
| 386 | "navigationBarBackgroundColor": "#ffffff", | 440 | "navigationBarBackgroundColor": "#ffffff", |
| 387 | "navigationBarTextStyle": "black" | 441 | "navigationBarTextStyle": "black" |
| 388 | } | 442 | } |
| 389 | - },{ | 443 | + }, |
| 444 | + { | ||
| 390 | "path": "pages/contract_process/add", | 445 | "path": "pages/contract_process/add", |
| 391 | "style": { | 446 | "style": { |
| 392 | "navigationBarTitleText": "新增加工标准合同", | 447 | "navigationBarTitleText": "新增加工标准合同", |
| 393 | "navigationBarBackgroundColor": "#ffffff", | 448 | "navigationBarBackgroundColor": "#ffffff", |
| 394 | "navigationBarTextStyle": "black" | 449 | "navigationBarTextStyle": "black" |
| 395 | } | 450 | } |
| 396 | - },{ | 451 | + }, |
| 452 | + { | ||
| 397 | "path": "pages/contract_process/detail", | 453 | "path": "pages/contract_process/detail", |
| 398 | "style": { | 454 | "style": { |
| 399 | "navigationBarTitleText": "加工标准合同详情", | 455 | "navigationBarTitleText": "加工标准合同详情", |
| 400 | "navigationBarBackgroundColor": "#ffffff", | 456 | "navigationBarBackgroundColor": "#ffffff", |
| 401 | "navigationBarTextStyle": "black" | 457 | "navigationBarTextStyle": "black" |
| 402 | } | 458 | } |
| 403 | - },{ | 459 | + }, |
| 460 | + { | ||
| 404 | "path": "pages/contract_process/modify", | 461 | "path": "pages/contract_process/modify", |
| 405 | "style": { | 462 | "style": { |
| 406 | "navigationBarTitleText": "编辑加工标准合同", | 463 | "navigationBarTitleText": "编辑加工标准合同", |
| 407 | "navigationBarBackgroundColor": "#ffffff", | 464 | "navigationBarBackgroundColor": "#ffffff", |
| 408 | "navigationBarTextStyle": "black" | 465 | "navigationBarTextStyle": "black" |
| 409 | } | 466 | } |
| 410 | - }, { | 467 | + }, |
| 468 | + { | ||
| 411 | "path": "pages/contract_foreign_std/index", | 469 | "path": "pages/contract_foreign_std/index", |
| 412 | "style": { | 470 | "style": { |
| 413 | "navigationBarTitleText": "外贸标准合同", | 471 | "navigationBarTitleText": "外贸标准合同", |
| 414 | "navigationBarBackgroundColor": "#ffffff", | 472 | "navigationBarBackgroundColor": "#ffffff", |
| 415 | "navigationBarTextStyle": "black" | 473 | "navigationBarTextStyle": "black" |
| 416 | } | 474 | } |
| 417 | - },{ | 475 | + }, |
| 476 | + { | ||
| 418 | "path": "pages/contract_foreign_std/add", | 477 | "path": "pages/contract_foreign_std/add", |
| 419 | "style": { | 478 | "style": { |
| 420 | "navigationBarTitleText": "新增外贸标准合同", | 479 | "navigationBarTitleText": "新增外贸标准合同", |
| 421 | "navigationBarBackgroundColor": "#ffffff", | 480 | "navigationBarBackgroundColor": "#ffffff", |
| 422 | "navigationBarTextStyle": "black" | 481 | "navigationBarTextStyle": "black" |
| 423 | } | 482 | } |
| 424 | - },{ | 483 | + }, |
| 484 | + { | ||
| 425 | "path": "pages/contract_foreign_std/detail", | 485 | "path": "pages/contract_foreign_std/detail", |
| 426 | "style": { | 486 | "style": { |
| 427 | "navigationBarTitleText": "外贸标准合同详情", | 487 | "navigationBarTitleText": "外贸标准合同详情", |
| 428 | "navigationBarBackgroundColor": "#ffffff", | 488 | "navigationBarBackgroundColor": "#ffffff", |
| 429 | "navigationBarTextStyle": "black" | 489 | "navigationBarTextStyle": "black" |
| 430 | } | 490 | } |
| 431 | - },{ | 491 | + }, |
| 492 | + { | ||
| 432 | "path": "pages/contract_foreign_std/modify", | 493 | "path": "pages/contract_foreign_std/modify", |
| 433 | "style": { | 494 | "style": { |
| 434 | "navigationBarTitleText": "编辑外贸标准合同", | 495 | "navigationBarTitleText": "编辑外贸标准合同", |
| 435 | "navigationBarBackgroundColor": "#ffffff", | 496 | "navigationBarBackgroundColor": "#ffffff", |
| 436 | "navigationBarTextStyle": "black" | 497 | "navigationBarTextStyle": "black" |
| 437 | } | 498 | } |
| 438 | - }, { | 499 | + }, |
| 500 | + { | ||
| 439 | "path": "pages/contract_foreign_stock/index", | 501 | "path": "pages/contract_foreign_stock/index", |
| 440 | "style": { | 502 | "style": { |
| 441 | "navigationBarTitleText": "外贸库存合同", | 503 | "navigationBarTitleText": "外贸库存合同", |
| 442 | "navigationBarBackgroundColor": "#ffffff", | 504 | "navigationBarBackgroundColor": "#ffffff", |
| 443 | "navigationBarTextStyle": "black" | 505 | "navigationBarTextStyle": "black" |
| 444 | } | 506 | } |
| 445 | - },{ | 507 | + }, |
| 508 | + { | ||
| 446 | "path": "pages/contract_foreign_stock/add", | 509 | "path": "pages/contract_foreign_stock/add", |
| 447 | "style": { | 510 | "style": { |
| 448 | "navigationBarTitleText": "新增外贸库存合同", | 511 | "navigationBarTitleText": "新增外贸库存合同", |
| 449 | "navigationBarBackgroundColor": "#ffffff", | 512 | "navigationBarBackgroundColor": "#ffffff", |
| 450 | "navigationBarTextStyle": "black" | 513 | "navigationBarTextStyle": "black" |
| 451 | } | 514 | } |
| 452 | - },{ | 515 | + }, |
| 516 | + { | ||
| 453 | "path": "pages/contract_foreign_stock/detail", | 517 | "path": "pages/contract_foreign_stock/detail", |
| 454 | "style": { | 518 | "style": { |
| 455 | "navigationBarTitleText": "外贸库存合同详情", | 519 | "navigationBarTitleText": "外贸库存合同详情", |
| 456 | "navigationBarBackgroundColor": "#ffffff", | 520 | "navigationBarBackgroundColor": "#ffffff", |
| 457 | "navigationBarTextStyle": "black" | 521 | "navigationBarTextStyle": "black" |
| 458 | } | 522 | } |
| 459 | - },{ | 523 | + }, |
| 524 | + { | ||
| 460 | "path": "pages/contract_foreign_stock/modify", | 525 | "path": "pages/contract_foreign_stock/modify", |
| 461 | "style": { | 526 | "style": { |
| 462 | "navigationBarTitleText": "编辑外贸库存合同", | 527 | "navigationBarTitleText": "编辑外贸库存合同", |
| 463 | "navigationBarBackgroundColor": "#ffffff", | 528 | "navigationBarBackgroundColor": "#ffffff", |
| 464 | "navigationBarTextStyle": "black" | 529 | "navigationBarTextStyle": "black" |
| 465 | } | 530 | } |
| 466 | - },{ | 531 | + }, |
| 532 | + { | ||
| 467 | "path": "pages/contract_foreign_stock/lock", | 533 | "path": "pages/contract_foreign_stock/lock", |
| 468 | "style": { | 534 | "style": { |
| 469 | "navigationBarTitleText": "锁价", | 535 | "navigationBarTitleText": "锁价", |
| 470 | "navigationBarBackgroundColor": "#ffffff", | 536 | "navigationBarBackgroundColor": "#ffffff", |
| 471 | "navigationBarTextStyle": "black" | 537 | "navigationBarTextStyle": "black" |
| 472 | } | 538 | } |
| 473 | - },{ | 539 | + }, |
| 540 | + { | ||
| 474 | "path": "pages/contract_foreign_unplan/index", | 541 | "path": "pages/contract_foreign_unplan/index", |
| 475 | "style": { | 542 | "style": { |
| 476 | "navigationBarTitleText": "外贸未锁规合同", | 543 | "navigationBarTitleText": "外贸未锁规合同", |
| 477 | "navigationBarBackgroundColor": "#ffffff", | 544 | "navigationBarBackgroundColor": "#ffffff", |
| 478 | "navigationBarTextStyle": "black" | 545 | "navigationBarTextStyle": "black" |
| 479 | } | 546 | } |
| 480 | - },{ | 547 | + }, |
| 548 | + { | ||
| 481 | "path": "pages/contract_foreign_unplan/add", | 549 | "path": "pages/contract_foreign_unplan/add", |
| 482 | "style": { | 550 | "style": { |
| 483 | "navigationBarTitleText": "新增外贸未锁规合同", | 551 | "navigationBarTitleText": "新增外贸未锁规合同", |
| 484 | "navigationBarBackgroundColor": "#ffffff", | 552 | "navigationBarBackgroundColor": "#ffffff", |
| 485 | "navigationBarTextStyle": "black" | 553 | "navigationBarTextStyle": "black" |
| 486 | } | 554 | } |
| 487 | - },{ | 555 | + }, |
| 556 | + { | ||
| 488 | "path": "pages/contract_foreign_unplan/detail", | 557 | "path": "pages/contract_foreign_unplan/detail", |
| 489 | "style": { | 558 | "style": { |
| 490 | "navigationBarTitleText": "外贸未锁规合同详情", | 559 | "navigationBarTitleText": "外贸未锁规合同详情", |
| 491 | "navigationBarBackgroundColor": "#ffffff", | 560 | "navigationBarBackgroundColor": "#ffffff", |
| 492 | "navigationBarTextStyle": "black" | 561 | "navigationBarTextStyle": "black" |
| 493 | } | 562 | } |
| 494 | - },{ | 563 | + }, |
| 564 | + { | ||
| 495 | "path": "pages/contract_foreign_unplan/modify", | 565 | "path": "pages/contract_foreign_unplan/modify", |
| 496 | "style": { | 566 | "style": { |
| 497 | "navigationBarTitleText": "编辑外贸未锁规合同", | 567 | "navigationBarTitleText": "编辑外贸未锁规合同", |
| 498 | "navigationBarBackgroundColor": "#ffffff", | 568 | "navigationBarBackgroundColor": "#ffffff", |
| 499 | "navigationBarTextStyle": "black" | 569 | "navigationBarTextStyle": "black" |
| 500 | } | 570 | } |
| 501 | - },{ | 571 | + }, |
| 572 | + { | ||
| 502 | "path": "pages/contract_foreign_unplan/lock", | 573 | "path": "pages/contract_foreign_unplan/lock", |
| 503 | "style": { | 574 | "style": { |
| 504 | "navigationBarTitleText": "锁规", | 575 | "navigationBarTitleText": "锁规", |
| 505 | "navigationBarBackgroundColor": "#ffffff", | 576 | "navigationBarBackgroundColor": "#ffffff", |
| 506 | "navigationBarTextStyle": "black" | 577 | "navigationBarTextStyle": "black" |
| 507 | } | 578 | } |
| 508 | - },{ | 579 | + }, |
| 580 | + { | ||
| 509 | "path": "pages/contract_foreign_unplan/lock_apply", | 581 | "path": "pages/contract_foreign_unplan/lock_apply", |
| 510 | "style": { | 582 | "style": { |
| 511 | "navigationBarTitleText": "锁规延期申请", | 583 | "navigationBarTitleText": "锁规延期申请", |
| 512 | "navigationBarBackgroundColor": "#ffffff", | 584 | "navigationBarBackgroundColor": "#ffffff", |
| 513 | "navigationBarTextStyle": "black" | 585 | "navigationBarTextStyle": "black" |
| 514 | } | 586 | } |
| 515 | - },{ | 587 | + }, |
| 588 | + { | ||
| 516 | "path": "pages/contract_unlocked_operation/detail", | 589 | "path": "pages/contract_unlocked_operation/detail", |
| 517 | "style": { | 590 | "style": { |
| 518 | "navigationBarTitleText": "锁价无规格操作申请单详情", | 591 | "navigationBarTitleText": "锁价无规格操作申请单详情", |
| 519 | "navigationBarBackgroundColor": "#ffffff", | 592 | "navigationBarBackgroundColor": "#ffffff", |
| 520 | "navigationBarTextStyle": "black" | 593 | "navigationBarTextStyle": "black" |
| 521 | } | 594 | } |
| 522 | - },{ | 595 | + }, |
| 596 | + { | ||
| 523 | "path": "pages/contract_unlocked_operation/modify", | 597 | "path": "pages/contract_unlocked_operation/modify", |
| 524 | "style": { | 598 | "style": { |
| 525 | "navigationBarTitleText": "编辑锁价无规格操作申请单", | 599 | "navigationBarTitleText": "编辑锁价无规格操作申请单", |
| 526 | "navigationBarBackgroundColor": "#ffffff", | 600 | "navigationBarBackgroundColor": "#ffffff", |
| 527 | "navigationBarTextStyle": "black" | 601 | "navigationBarTextStyle": "black" |
| 528 | } | 602 | } |
| 529 | - },{ | 603 | + }, |
| 604 | + { | ||
| 530 | "path": "pages/contract_unlocked_operation/index", | 605 | "path": "pages/contract_unlocked_operation/index", |
| 531 | "style": { | 606 | "style": { |
| 532 | "navigationBarTitleText": "锁价无规格操作申请单", | 607 | "navigationBarTitleText": "锁价无规格操作申请单", |
| 533 | "navigationBarBackgroundColor": "#ffffff", | 608 | "navigationBarBackgroundColor": "#ffffff", |
| 534 | "navigationBarTextStyle": "black" | 609 | "navigationBarTextStyle": "black" |
| 535 | } | 610 | } |
| 611 | + }, | ||
| 612 | + { | ||
| 613 | + "path": "pages/message/index", | ||
| 614 | + "style": { | ||
| 615 | + "navigationBarTitleText": "消息列表", | ||
| 616 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 617 | + "navigationBarTextStyle": "black" | ||
| 618 | + } | ||
| 536 | } | 619 | } |
| 537 | ], | 620 | ], |
| 538 | - "subPackages": [{ | 621 | + "subPackages": [ |
| 622 | + { | ||
| 539 | "root": "pages-business", | 623 | "root": "pages-business", |
| 540 | - "pages": [{ | 624 | + "pages": [ |
| 625 | + { | ||
| 541 | "path": "purchase/config", | 626 | "path": "purchase/config", |
| 542 | "style": { | 627 | "style": { |
| 543 | "navigationBarTitleText": "采购设置" | 628 | "navigationBarTitleText": "采购设置" |
| @@ -571,7 +656,8 @@ | @@ -571,7 +656,8 @@ | ||
| 571 | }, | 656 | }, |
| 572 | { | 657 | { |
| 573 | "root": "pages-data", | 658 | "root": "pages-data", |
| 574 | - "pages": [{ | 659 | + "pages": [ |
| 660 | + { | ||
| 575 | "path": "address/index", | 661 | "path": "address/index", |
| 576 | "style": { | 662 | "style": { |
| 577 | "navigationBarTitleText": "地址管理" | 663 | "navigationBarTitleText": "地址管理" |
| @@ -656,17 +742,20 @@ | @@ -656,17 +742,20 @@ | ||
| 656 | "color": "rgba(0,0,0,0.9)", | 742 | "color": "rgba(0,0,0,0.9)", |
| 657 | "backgroundColor": "#ffffff", | 743 | "backgroundColor": "#ffffff", |
| 658 | "borderStyle": "white", | 744 | "borderStyle": "white", |
| 659 | - "list": [{ | ||
| 660 | - "pagePath": "pages/index", | ||
| 661 | - "iconPath": "static/images/tabbar/home.png", | ||
| 662 | - "selectedIconPath": "static/images/tabbar/home_act.png", | ||
| 663 | - "text": "首页" | ||
| 664 | - }, { | ||
| 665 | - "pagePath": "pages/mine/index", | ||
| 666 | - "iconPath": "static/images/tabbar/mine.png", | ||
| 667 | - "selectedIconPath": "static/images/tabbar/mine_act.png", | ||
| 668 | - "text": "我的" | ||
| 669 | - }] | 745 | + "list": [ |
| 746 | + { | ||
| 747 | + "pagePath": "pages/index", | ||
| 748 | + "iconPath": "static/images/tabbar/home.png", | ||
| 749 | + "selectedIconPath": "static/images/tabbar/home_act.png", | ||
| 750 | + "text": "首页" | ||
| 751 | + }, | ||
| 752 | + { | ||
| 753 | + "pagePath": "pages/mine/index", | ||
| 754 | + "iconPath": "static/images/tabbar/mine.png", | ||
| 755 | + "selectedIconPath": "static/images/tabbar/mine_act.png", | ||
| 756 | + "text": "我的" | ||
| 757 | + } | ||
| 758 | + ] | ||
| 670 | }, | 759 | }, |
| 671 | "globalStyle": { | 760 | "globalStyle": { |
| 672 | "navigationBarTitleText": "ERP", | 761 | "navigationBarTitleText": "ERP", |
| @@ -37,14 +37,14 @@ | @@ -37,14 +37,14 @@ | ||
| 37 | 37 | ||
| 38 | <uni-list-item title="交货方式"> | 38 | <uni-list-item title="交货方式"> |
| 39 | <template v-slot:footer> | 39 | <template v-slot:footer> |
| 40 | - <uni-easyinput v-model="form.deliveryMethod" placeholder="请输入交货方式" :inputBorder="false" /> | 40 | + <view class="readonly-text">{{ form.deliveryMethod }}</view> |
| 41 | </template> | 41 | </template> |
| 42 | </uni-list-item> | 42 | </uni-list-item> |
| 43 | </view> | 43 | </view> |
| 44 | 44 | ||
| 45 | <!-- 产品 --> | 45 | <!-- 产品 --> |
| 46 | <view class="section2"> | 46 | <view class="section2"> |
| 47 | - <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" /> | 47 | + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :orderDate="form.orderDate" /> |
| 48 | </view> | 48 | </view> |
| 49 | 49 | ||
| 50 | <view class="section"> | 50 | <view class="section"> |
| @@ -69,17 +69,6 @@ | @@ -69,17 +69,6 @@ | ||
| 69 | </view> | 69 | </view> |
| 70 | </template> | 70 | </template> |
| 71 | </uni-list-item> | 71 | </uni-list-item> |
| 72 | - <uni-list-item class="amount-item"> | ||
| 73 | - <template v-slot:body> | ||
| 74 | - <view class="item-title"><text>包装费</text></view> | ||
| 75 | - </template> | ||
| 76 | - <template v-slot:footer> | ||
| 77 | - <view class="amount-row"> | ||
| 78 | - <uni-easyinput type="number" v-model="form.packagingFee" placeholder="0.00" :inputBorder="false" /> | ||
| 79 | - <text class="unit">元</text> | ||
| 80 | - </view> | ||
| 81 | - </template> | ||
| 82 | - </uni-list-item> | ||
| 83 | <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | 72 | <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable |
| 84 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | 73 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> |
| 85 | <template v-slot:body> | 74 | <template v-slot:body> |
| @@ -91,6 +80,11 @@ | @@ -91,6 +80,11 @@ | ||
| 91 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> | 80 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> |
| 92 | </template> | 81 | </template> |
| 93 | </uni-list-item> | 82 | </uni-list-item> |
| 83 | + <uni-list-item title="变更说明"> | ||
| 84 | + <template v-slot:footer> | ||
| 85 | + <uni-easyinput v-model="form.changeDescription" placeholder="请输入变更说明" :inputBorder="false" /> | ||
| 86 | + </template> | ||
| 87 | + </uni-list-item> | ||
| 94 | </view> | 88 | </view> |
| 95 | 89 | ||
| 96 | 90 | ||
| @@ -185,6 +179,7 @@ export default { | @@ -185,6 +179,7 @@ export default { | ||
| 185 | packagingFee: '', | 179 | packagingFee: '', |
| 186 | executionStandard: '', | 180 | executionStandard: '', |
| 187 | executionStandardRemarks: '', | 181 | executionStandardRemarks: '', |
| 182 | + changeDescription: '', | ||
| 188 | totalQuantity: '', | 183 | totalQuantity: '', |
| 189 | afterTotalQuantity: '', | 184 | afterTotalQuantity: '', |
| 190 | pieceWeightHeader: '', | 185 | pieceWeightHeader: '', |
| @@ -297,7 +292,7 @@ export default { | @@ -297,7 +292,7 @@ export default { | ||
| 297 | delete next.id | 292 | delete next.id |
| 298 | delete next.status | 293 | delete next.status |
| 299 | this.form = next | 294 | this.form = next |
| 300 | - const lines = Array.isArray(item.purchaseOrderLineList) ? item.purchaseOrderLineList.map(x => ({ ...x, purchaseOrderId: x.id, id: '' })) : [] | 295 | + const lines = Array.isArray(item.purchaseOrderLineList) ? item.purchaseOrderLineList.map(x => ({ ...x, purchaseOrderId: x.id, afterId: x.id, id: '' })) : [] |
| 301 | this.initPurchaseOrderLineList = lines | 296 | this.initPurchaseOrderLineList = lines |
| 302 | const sum = lines.reduce((acc, it) => { | 297 | const sum = lines.reduce((acc, it) => { |
| 303 | const v = Number(it && it.quantity) | 298 | const v = Number(it && it.quantity) |
| @@ -29,10 +29,10 @@ | @@ -29,10 +29,10 @@ | ||
| 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> | 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> |
| 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> | 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> |
| 31 | <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view> | 31 | <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view> |
| 32 | - <view class="row"><text class="label">包装费</text><text class="value">{{ form.packagingFee }}</text></view> | ||
| 33 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', | 32 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', |
| 34 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> | 33 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> |
| 35 | <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ form.executionStandardRemarks }}</text></view> | 34 | <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ form.executionStandardRemarks }}</text></view> |
| 35 | + <view class="row"><text class="label">变更说明</text><text class="value">{{ form.changeDescription }}</text></view> | ||
| 36 | </view> | 36 | </view> |
| 37 | 37 | ||
| 38 | <view class="title-header"> | 38 | <view class="title-header"> |
| @@ -102,11 +102,11 @@ export default { | @@ -102,11 +102,11 @@ export default { | ||
| 102 | displayButtons() { | 102 | displayButtons() { |
| 103 | const f = this.statusFlags | 103 | const f = this.statusFlags |
| 104 | return [ | 104 | return [ |
| 105 | - { ...this.buttons[0], visible: f.canEdit }, | ||
| 106 | - { ...this.buttons[1], visible: true }, | ||
| 107 | - { ...this.buttons[2], visible: f.canAudit }, | ||
| 108 | - { ...this.buttons[3], visible: f.canConfirmChange }, | ||
| 109 | - { ...this.buttons[4], visible: f.canCancel }, | 105 | + { ...this.buttons[0], visible: f.canEdit && this.$auth.hasPermi('order-manage:change-list:modify') }, |
| 106 | + { ...this.buttons[1], visible: this.$auth.hasPermi('order-manage:change-list:review') }, | ||
| 107 | + { ...this.buttons[2], visible: f.canAudit && this.$auth.hasPermi('order-manage:change-list:approve') }, | ||
| 108 | + { ...this.buttons[3], visible: f.canConfirmChange && this.$auth.hasPermi('order-manage:change-list:confirm') }, | ||
| 109 | + { ...this.buttons[4], visible: f.canCancel && this.$auth.hasPermi('order-manage:change-list:cancel') }, | ||
| 110 | ] | 110 | ] |
| 111 | } | 111 | } |
| 112 | }, | 112 | }, |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入订货单位或订单编号" clearButton="auto" | 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入订货单位或订单编号" clearButton="auto" |
| 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="onSearchConfirm" | 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="onSearchConfirm" |
| 7 | @input="onSearchInput" /> | 7 | @input="onSearchInput" /> |
| 8 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 8 | + <image v-if="$auth.hasPermi('order-manage:change-list:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 10 | </view> | 10 | </view> |
| 11 | </view> | 11 | </view> |
| @@ -17,8 +17,9 @@ | @@ -17,8 +17,9 @@ | ||
| 17 | <view class="card" @click.stop="onCardClick(item)"> | 17 | <view class="card" @click.stop="onCardClick(item)"> |
| 18 | <view class="card-header"> | 18 | <view class="card-header"> |
| 19 | <text class="title omit2">{{ item.orderingUnitName }}</text> | 19 | <text class="title omit2">{{ item.orderingUnitName }}</text> |
| 20 | - <text v-if="item.examineStatus" :class="['status', `status_${item.examineStatus}`]">{{ filterStatus(item.examineStatus) | ||
| 21 | - }}</text> | 20 | + <text v-if="item.examineStatus" :class="['status', `status_${item.examineStatus}`]">{{ |
| 21 | + filterStatus(item.examineStatus) | ||
| 22 | + }}</text> | ||
| 22 | </view> | 23 | </view> |
| 23 | <view class="info-row"><text>订单编号</text><text>{{ item.orderNo }}</text></view> | 24 | <view class="info-row"><text>订单编号</text><text>{{ item.orderNo }}</text></view> |
| 24 | <view class="info-row"><text>生产厂</text><text>{{ item.workshopName }}</text></view> | 25 | <view class="info-row"><text>生产厂</text><text>{{ item.workshopName }}</text></view> |
| @@ -289,12 +290,12 @@ export default { | @@ -289,12 +290,12 @@ export default { | ||
| 289 | } | 290 | } |
| 290 | 291 | ||
| 291 | text { | 292 | text { |
| 292 | - width: 60%; | 293 | + width: 50%; |
| 293 | line-height: 32rpx; | 294 | line-height: 32rpx; |
| 295 | + word-wrap: break-word; | ||
| 294 | 296 | ||
| 295 | &:last-child { | 297 | &:last-child { |
| 296 | color: rgba(0, 0, 0, 0.9); | 298 | color: rgba(0, 0, 0, 0.9); |
| 297 | - width: 40%; | ||
| 298 | } | 299 | } |
| 299 | } | 300 | } |
| 300 | } | 301 | } |
| @@ -36,14 +36,14 @@ | @@ -36,14 +36,14 @@ | ||
| 36 | 36 | ||
| 37 | <uni-list-item title="交货方式"> | 37 | <uni-list-item title="交货方式"> |
| 38 | <template v-slot:footer> | 38 | <template v-slot:footer> |
| 39 | - <uni-easyinput v-model="form.deliveryMethod" placeholder="请输入交货方式" :inputBorder="false" /> | 39 | + <view class="readonly-text">{{ form.deliveryMethod }}</view> |
| 40 | </template> | 40 | </template> |
| 41 | </uni-list-item> | 41 | </uni-list-item> |
| 42 | </view> | 42 | </view> |
| 43 | 43 | ||
| 44 | <!-- 产品 --> | 44 | <!-- 产品 --> |
| 45 | <view class="section2"> | 45 | <view class="section2"> |
| 46 | - <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" /> | 46 | + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :orderDate="form.orderDate" /> |
| 47 | </view> | 47 | </view> |
| 48 | 48 | ||
| 49 | <view class="section"> | 49 | <view class="section"> |
| @@ -68,17 +68,6 @@ | @@ -68,17 +68,6 @@ | ||
| 68 | </view> | 68 | </view> |
| 69 | </template> | 69 | </template> |
| 70 | </uni-list-item> | 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 | 71 | <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable |
| 83 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | 72 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> |
| 84 | <template v-slot:body> | 73 | <template v-slot:body> |
| @@ -90,6 +79,11 @@ | @@ -90,6 +79,11 @@ | ||
| 90 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> | 79 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> |
| 91 | </template> | 80 | </template> |
| 92 | </uni-list-item> | 81 | </uni-list-item> |
| 82 | + <uni-list-item title="变更说明"> | ||
| 83 | + <template v-slot:footer> | ||
| 84 | + <uni-easyinput v-model="form.changeDescription" placeholder="请输入变更说明" :inputBorder="false" /> | ||
| 85 | + </template> | ||
| 86 | + </uni-list-item> | ||
| 93 | </view> | 87 | </view> |
| 94 | 88 | ||
| 95 | 89 | ||
| @@ -182,6 +176,7 @@ export default { | @@ -182,6 +176,7 @@ export default { | ||
| 182 | packagingFee: '', | 176 | packagingFee: '', |
| 183 | executionStandard: '', | 177 | executionStandard: '', |
| 184 | executionStandardRemarks: '', | 178 | executionStandardRemarks: '', |
| 179 | + changeDescription: '', | ||
| 185 | totalQuantity: '', | 180 | totalQuantity: '', |
| 186 | afterTotalQuantity: '', | 181 | afterTotalQuantity: '', |
| 187 | pieceWeightHeader: '', | 182 | pieceWeightHeader: '', |
| @@ -34,58 +34,74 @@ | @@ -34,58 +34,74 @@ | ||
| 34 | </template> | 34 | </template> |
| 35 | </uni-list-item> | 35 | </uni-list-item> |
| 36 | <view v-show="!item.collapsed"> | 36 | <view v-show="!item.collapsed"> |
| 37 | - <uni-list-item title="厚度"> | 37 | + <uni-list-item title="厚度(mm)"> |
| 38 | <template v-slot:footer> | 38 | <template v-slot:footer> |
| 39 | - <uni-easyinput type="digit" v-model="item.thickness" placeholder="请输入厚度" :inputBorder="false" | ||
| 40 | - @input="onNonNegativeNumberInput($event, item, idx, 'thickness')" @blur="onNonNegativeNumberBlur(item, idx, 'thickness')" /> | 39 | + <uni-easyinput type="digit" v-model="item.thickness" placeholder="请输入厚度" |
| 40 | + :inputBorder="false" | ||
| 41 | + @input="onNonNegativeNumberInput($event, item, idx, 'thickness')" | ||
| 42 | + @blur="onNonNegativeNumberBlur(item, idx, 'thickness')" /> | ||
| 41 | </template> | 43 | </template> |
| 42 | </uni-list-item> | 44 | </uni-list-item> |
| 43 | - <uni-list-item title="厚度公差 +"> | 45 | + <uni-list-item title="厚度公差 +(mm)"> |
| 44 | <template v-slot:footer> | 46 | <template v-slot:footer> |
| 45 | <uni-easyinput type="digit" v-model="item.thicknessTolPos" placeholder="请输入厚度公差 +" | 47 | <uni-easyinput type="digit" v-model="item.thicknessTolPos" placeholder="请输入厚度公差 +" |
| 46 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'thicknessTolPos')" @blur="onNonNegativeNumberBlur(item, idx, 'thicknessTolPos')" /> | 48 | + :inputBorder="false" |
| 49 | + @input="onNonNegativeNumberInput($event, item, idx, 'thicknessTolPos')" | ||
| 50 | + @blur="onNonNegativeNumberBlur(item, idx, 'thicknessTolPos')" /> | ||
| 47 | </template> | 51 | </template> |
| 48 | </uni-list-item> | 52 | </uni-list-item> |
| 49 | - <uni-list-item title="厚度公差 -"> | 53 | + <uni-list-item title="厚度公差 -(mm)"> |
| 50 | <template v-slot:footer> | 54 | <template v-slot:footer> |
| 51 | <uni-easyinput type="digit" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差 -" | 55 | <uni-easyinput type="digit" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差 -" |
| 52 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'thicknessTolNeg')" @blur="onNonNegativeNumberBlur(item, idx, 'thicknessTolNeg')" /> | 56 | + :inputBorder="false" |
| 57 | + @input="onNonNegativeNumberInput($event, item, idx, 'thicknessTolNeg')" | ||
| 58 | + @blur="onNonNegativeNumberBlur(item, idx, 'thicknessTolNeg')" /> | ||
| 53 | </template> | 59 | </template> |
| 54 | </uni-list-item> | 60 | </uni-list-item> |
| 55 | - <uni-list-item title="宽度"> | 61 | + <uni-list-item title="宽度(mm)"> |
| 56 | <template v-slot:footer> | 62 | <template v-slot:footer> |
| 57 | - <uni-easyinput type="digit" v-model="item.width" placeholder="请输入宽度" :inputBorder="false" | ||
| 58 | - @input="onNonNegativeNumberInput($event, item, idx, 'width')" @blur="onNonNegativeNumberBlur(item, idx, 'width')" /> | 63 | + <uni-easyinput type="digit" v-model="item.width" placeholder="请输入宽度" |
| 64 | + :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'width')" | ||
| 65 | + @blur="onNonNegativeNumberBlur(item, idx, 'width')" /> | ||
| 59 | </template> | 66 | </template> |
| 60 | </uni-list-item> | 67 | </uni-list-item> |
| 61 | - <uni-list-item title="宽度公差 +"> | 68 | + <uni-list-item title="宽度公差 +(mm)"> |
| 62 | <template v-slot:footer> | 69 | <template v-slot:footer> |
| 63 | <uni-easyinput type="digit" v-model="item.widthTolPos" placeholder="请输入宽度公差 +" | 70 | <uni-easyinput type="digit" v-model="item.widthTolPos" placeholder="请输入宽度公差 +" |
| 64 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'widthTolPos')" @blur="onNonNegativeNumberBlur(item, idx, 'widthTolPos')" /> | 71 | + :inputBorder="false" |
| 72 | + @input="onNonNegativeNumberInput($event, item, idx, 'widthTolPos')" | ||
| 73 | + @blur="onNonNegativeNumberBlur(item, idx, 'widthTolPos')" /> | ||
| 65 | </template> | 74 | </template> |
| 66 | </uni-list-item> | 75 | </uni-list-item> |
| 67 | - <uni-list-item title="宽度公差 -"> | 76 | + <uni-list-item title="宽度公差 -(mm)"> |
| 68 | <template v-slot:footer> | 77 | <template v-slot:footer> |
| 69 | <uni-easyinput type="digit" v-model="item.widthTolNeg" placeholder="请输入宽度公差 -" | 78 | <uni-easyinput type="digit" v-model="item.widthTolNeg" placeholder="请输入宽度公差 -" |
| 70 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'widthTolNeg')" @blur="onNonNegativeNumberBlur(item, idx, 'widthTolNeg')" /> | 79 | + :inputBorder="false" |
| 80 | + @input="onNonNegativeNumberInput($event, item, idx, 'widthTolNeg')" | ||
| 81 | + @blur="onNonNegativeNumberBlur(item, idx, 'widthTolNeg')" /> | ||
| 71 | </template> | 82 | </template> |
| 72 | </uni-list-item> | 83 | </uni-list-item> |
| 73 | - <uni-list-item title="长度"> | 84 | + <uni-list-item title="长度(mm)"> |
| 74 | <template v-slot:footer> | 85 | <template v-slot:footer> |
| 75 | - <uni-easyinput type="digit" v-model="item.length" placeholder="请输入长度" :inputBorder="false" | ||
| 76 | - @input="onNonNegativeNumberInput($event, item, idx, 'length')" @blur="onNonNegativeNumberBlur(item, idx, 'length')" /> | 86 | + <uni-easyinput type="digit" v-model="item.length" placeholder="请输入长度" |
| 87 | + :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'length')" | ||
| 88 | + @blur="onNonNegativeNumberBlur(item, idx, 'length')" /> | ||
| 77 | </template> | 89 | </template> |
| 78 | </uni-list-item> | 90 | </uni-list-item> |
| 79 | - <uni-list-item title="长度公差 +"> | 91 | + <uni-list-item title="长度公差 +(mm)"> |
| 80 | <template v-slot:footer> | 92 | <template v-slot:footer> |
| 81 | <uni-easyinput type="digit" v-model="item.lengthTolPos" placeholder="请输入长度公差 +" | 93 | <uni-easyinput type="digit" v-model="item.lengthTolPos" placeholder="请输入长度公差 +" |
| 82 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'lengthTolPos')" @blur="onNonNegativeNumberBlur(item, idx, 'lengthTolPos')" /> | 94 | + :inputBorder="false" |
| 95 | + @input="onNonNegativeNumberInput($event, item, idx, 'lengthTolPos')" | ||
| 96 | + @blur="onNonNegativeNumberBlur(item, idx, 'lengthTolPos')" /> | ||
| 83 | </template> | 97 | </template> |
| 84 | </uni-list-item> | 98 | </uni-list-item> |
| 85 | - <uni-list-item title="长度公差 -"> | 99 | + <uni-list-item title="长度公差 -(mm)"> |
| 86 | <template v-slot:footer> | 100 | <template v-slot:footer> |
| 87 | <uni-easyinput type="digit" v-model="item.lengthTolNeg" placeholder="请输入长度公差 -" | 101 | <uni-easyinput type="digit" v-model="item.lengthTolNeg" placeholder="请输入长度公差 -" |
| 88 | - :inputBorder="false" @input="onNonNegativeNumberInput($event, item, idx, 'lengthTolNeg')" @blur="onNonNegativeNumberBlur(item, idx, 'lengthTolNeg')" /> | 102 | + :inputBorder="false" |
| 103 | + @input="onNonNegativeNumberInput($event, item, idx, 'lengthTolNeg')" | ||
| 104 | + @blur="onNonNegativeNumberBlur(item, idx, 'lengthTolNeg')" /> | ||
| 89 | </template> | 105 | </template> |
| 90 | </uni-list-item> | 106 | </uni-list-item> |
| 91 | <uni-list-item title="状态"> | 107 | <uni-list-item title="状态"> |
| @@ -95,19 +111,38 @@ | @@ -95,19 +111,38 @@ | ||
| 95 | </uni-list-item> | 111 | </uni-list-item> |
| 96 | <uni-list-item title="数量kg"> | 112 | <uni-list-item title="数量kg"> |
| 97 | <template v-slot:footer> | 113 | <template v-slot:footer> |
| 98 | - <uni-easyinput type="digit" v-model="item.quantity" placeholder="请输入数量kg" :inputBorder="false" | ||
| 99 | - @input="onNonNegativeNumberInput($event, item, idx, 'quantity')" @blur="onNonNegativeNumberBlur(item, idx, 'quantity')" /> | 114 | + <uni-easyinput type="digit" v-model="item.quantity" placeholder="请输入数量kg" |
| 115 | + :inputBorder="false" | ||
| 116 | + @input="onNonNegativeNumberInput($event, item, idx, 'quantity')" | ||
| 117 | + @blur="onNonNegativeNumberBlur(item, idx, 'quantity')" /> | ||
| 100 | </template> | 118 | </template> |
| 101 | </uni-list-item> | 119 | </uni-list-item> |
| 102 | <uni-list-item v-if="item.showSalesPrice" title="销售价格"> | 120 | <uni-list-item v-if="item.showSalesPrice" title="销售价格"> |
| 103 | <template v-slot:footer> | 121 | <template v-slot:footer> |
| 104 | - <uni-easyinput type="digit" v-model="item.salesPrice" placeholder="请输入销售价格" :inputBorder="false" | ||
| 105 | - @input="onNonNegativeNumberInput($event, item, idx, 'salesPrice')" @blur="onNonNegativeNumberBlur(item, idx, 'salesPrice')" /> | 122 | + <uni-easyinput type="digit" v-model="item.salesPrice" placeholder="请输入销售价格" |
| 123 | + :inputBorder="false" | ||
| 124 | + @input="onNonNegativeNumberInput($event, item, idx, 'salesPrice')" | ||
| 125 | + @blur="onNonNegativeNumberBlur(item, idx, 'salesPrice')" /> | ||
| 126 | + </template> | ||
| 127 | + </uni-list-item> | ||
| 128 | + <uni-list-item class="amount-item"> | ||
| 129 | + <template v-slot:body> | ||
| 130 | + <view class="item-title"><text>包装费</text></view> | ||
| 131 | + </template> | ||
| 132 | + <template v-slot:footer> | ||
| 133 | + <view class="amount-row"> | ||
| 134 | + <uni-easyinput type="digit" v-model="item.packagingFee" placeholder="0.00" | ||
| 135 | + :inputBorder="false" | ||
| 136 | + @input="onNonNegativeNumberInput($event, item, idx, 'packagingFee')" | ||
| 137 | + @blur="onNonNegativeNumberBlur(item, idx, 'packagingFee')" /> | ||
| 138 | + <text class="unit">元</text> | ||
| 139 | + </view> | ||
| 106 | </template> | 140 | </template> |
| 107 | </uni-list-item> | 141 | </uni-list-item> |
| 108 | <uni-list-item title="发货日期"> | 142 | <uni-list-item title="发货日期"> |
| 109 | <template v-slot:footer> | 143 | <template v-slot:footer> |
| 110 | - <uni-datetime-picker type="date" v-model="item.deliveryDate" /> | 144 | + <uni-datetime-picker type="date" v-model="item.deliveryDate" :start="minDeliveryDate" |
| 145 | + @change="onDeliveryChange($event, item, idx)" /> | ||
| 111 | </template> | 146 | </template> |
| 112 | </uni-list-item> | 147 | </uni-list-item> |
| 113 | <uni-list-item title="考核超协"> | 148 | <uni-list-item title="考核超协"> |
| @@ -167,10 +202,12 @@ | @@ -167,10 +202,12 @@ | ||
| 167 | <!-- showSalesPrice 判断是否显示 --> | 202 | <!-- showSalesPrice 判断是否显示 --> |
| 168 | <view class="row" v-if="item.showSalesPrice"><text class="label">销售价格</text><text class="value">{{ | 203 | <view class="row" v-if="item.showSalesPrice"><text class="label">销售价格</text><text class="value">{{ |
| 169 | item.salesPrice }}</text></view> | 204 | item.salesPrice }}</text></view> |
| 205 | + <view class="row"><text class="label">包装费</text><text class="value">{{ | ||
| 206 | + item.packagingFee }}</text></view> | ||
| 170 | <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text> | 207 | <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text> |
| 171 | </view> | 208 | </view> |
| 172 | <view class="row"><text class="label">考核超协</text><text class="value">{{ item.assessmentExceedsAgreement | 209 | <view class="row"><text class="label">考核超协</text><text class="value">{{ item.assessmentExceedsAgreement |
| 173 | - }}</text></view> | 210 | + }}</text></view> |
| 174 | </view> | 211 | </view> |
| 175 | <view class="view-total"> | 212 | <view class="view-total"> |
| 176 | <view class="head">合计</view> | 213 | <view class="head">合计</view> |
| @@ -191,7 +228,8 @@ export default { | @@ -191,7 +228,8 @@ export default { | ||
| 191 | mode: { type: String, default: 'add' }, | 228 | mode: { type: String, default: 'add' }, |
| 192 | list: { type: Array, default: () => [] }, | 229 | list: { type: Array, default: () => [] }, |
| 193 | max: { type: Number, default: 8 }, | 230 | max: { type: Number, default: 8 }, |
| 194 | - totalQuantity: { type: Number, default: 0 } | 231 | + totalQuantity: { type: Number, default: 0 }, |
| 232 | + orderDate: { type: String, default: '' } | ||
| 195 | }, | 233 | }, |
| 196 | data() { | 234 | data() { |
| 197 | return { | 235 | return { |
| @@ -200,6 +238,21 @@ export default { | @@ -200,6 +238,21 @@ export default { | ||
| 200 | } | 238 | } |
| 201 | }, | 239 | }, |
| 202 | computed: { | 240 | computed: { |
| 241 | + minDeliveryDate() { | ||
| 242 | + const s = this.orderDate | ||
| 243 | + if (!s) return '' | ||
| 244 | + const parts = String(s).split('-') | ||
| 245 | + const y = Number(parts[0]) | ||
| 246 | + const m = Number(parts[1]) | ||
| 247 | + const d = Number(parts[2]) | ||
| 248 | + if (!y || !m || !d) return '' | ||
| 249 | + const dt = new Date(y, m - 1, d) | ||
| 250 | + dt.setDate(dt.getDate() + 1) | ||
| 251 | + const yy = dt.getFullYear() | ||
| 252 | + const mm = String(dt.getMonth() + 1).padStart(2, '0') | ||
| 253 | + const dd = String(dt.getDate()).padStart(2, '0') | ||
| 254 | + return `${yy}/${mm}/${dd}` | ||
| 255 | + } | ||
| 203 | }, | 256 | }, |
| 204 | watch: { | 257 | watch: { |
| 205 | items: { | 258 | items: { |
| @@ -247,7 +300,7 @@ export default { | @@ -247,7 +300,7 @@ export default { | ||
| 247 | assessmentExceedsAgreement: '' | 300 | assessmentExceedsAgreement: '' |
| 248 | } | 301 | } |
| 249 | }, | 302 | }, |
| 250 | - | 303 | + |
| 251 | onAdd() { | 304 | onAdd() { |
| 252 | if (this.items.length >= this.max) return uni.showToast({ title: `最多添加${this.max}个`, icon: 'none' }) | 305 | if (this.items.length >= this.max) return uni.showToast({ title: `最多添加${this.max}个`, icon: 'none' }) |
| 253 | const obj = this.defaultItem() | 306 | const obj = this.defaultItem() |
| @@ -307,6 +360,29 @@ export default { | @@ -307,6 +360,29 @@ export default { | ||
| 307 | }, | 360 | }, |
| 308 | toggleViewCollapse() { | 361 | toggleViewCollapse() { |
| 309 | this.collapsedView = !this.collapsedView | 362 | this.collapsedView = !this.collapsedView |
| 363 | + }, | ||
| 364 | + onDeliveryChange(e, item, idx) { | ||
| 365 | + const getStr = (x) => { | ||
| 366 | + if (x && x.detail && x.detail.value !== undefined) return x.detail.value | ||
| 367 | + if (typeof x === 'string') return x | ||
| 368 | + return item && item.deliveryDate ? item.deliveryDate : '' | ||
| 369 | + } | ||
| 370 | + const val = getStr(e) | ||
| 371 | + if (!val || !this.orderDate) return | ||
| 372 | + const parse = (s) => { | ||
| 373 | + const p = String(s).replace(/\//g, '-').split('-') | ||
| 374 | + const y = Number(p[0]) | ||
| 375 | + const m = Number(p[1]) | ||
| 376 | + const d = Number(p[2]) | ||
| 377 | + return new Date(y, m - 1, d) | ||
| 378 | + } | ||
| 379 | + const sel = parse(val) | ||
| 380 | + const ord = parse(this.orderDate) | ||
| 381 | + if (!(sel > ord)) { | ||
| 382 | + item.deliveryDate = '' | ||
| 383 | + this.$set(this.items, idx, { ...item }) | ||
| 384 | + uni.showToast({ title: '发货日期必须大于订货日期', icon: 'none' }) | ||
| 385 | + } | ||
| 310 | } | 386 | } |
| 311 | } | 387 | } |
| 312 | } | 388 | } |
| @@ -29,11 +29,12 @@ | @@ -29,11 +29,12 @@ | ||
| 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> | 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> |
| 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> | 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> |
| 31 | <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view> | 31 | <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view> |
| 32 | - <view class="row"><text class="label">包装费</text><text class="value">{{ form.packagingFee }}</text></view> | ||
| 33 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', | 32 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', |
| 34 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> | 33 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> |
| 35 | <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ | 34 | <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ |
| 36 | form.executionStandardRemarks }}</text></view> | 35 | form.executionStandardRemarks }}</text></view> |
| 36 | + <view class="row"><text class="label">变更说明</text><text class="value">{{ | ||
| 37 | + form.changeDescription }}</text></view> | ||
| 37 | </view> | 38 | </view> |
| 38 | 39 | ||
| 39 | <view class="title-header"> | 40 | <view class="title-header"> |
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | </template> | 40 | </template> |
| 41 | </uni-list-item> | 41 | </uni-list-item> |
| 42 | - <ProductRel mode="add" :orderDateBase="form.orderDate" @change="onProductsChange" :options="productList" /> | 42 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" @change="onProductsChange" :options="productList" /> |
| 43 | <uni-list-item title="合计人民币金额(大写)"> | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | <template v-slot:footer> | 44 | <template v-slot:footer> |
| 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| @@ -92,33 +92,25 @@ | @@ -92,33 +92,25 @@ | ||
| 92 | :inputBorder="false" /> | 92 | :inputBorder="false" /> |
| 93 | </template> | 93 | </template> |
| 94 | </uni-list-item> | 94 | </uni-list-item> |
| 95 | - <view class="group"> | ||
| 96 | - <view class="group-title">特别条款要求</view> | ||
| 97 | - <view class="radio-list"> | ||
| 98 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 99 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 100 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 101 | - <text class="label">{{ opt.label }}</text> | ||
| 102 | - </view> | ||
| 103 | - </view> | ||
| 104 | - </view> | ||
| 105 | - <view class="group"> | ||
| 106 | - <view class="group-title">执行标准</view> | ||
| 107 | - <view class="radio-list"> | ||
| 108 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 109 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 110 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 111 | - <text class="label">{{ opt.label }}</text> | ||
| 112 | - </view> | ||
| 113 | - </view> | ||
| 114 | - </view> | 95 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 96 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 97 | + <template v-slot:body> | ||
| 98 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 99 | + </template> | ||
| 100 | + </uni-list-item> | ||
| 101 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 102 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text>执行标准</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 115 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | <template v-slot:footer> | 108 | <template v-slot:footer> |
| 117 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | :inputBorder="false" /> | 110 | :inputBorder="false" /> |
| 119 | </template> | 111 | </template> |
| 120 | </uni-list-item> | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 122 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 123 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | </template> | 116 | </template> |
| @@ -181,23 +173,23 @@ | @@ -181,23 +173,23 @@ | ||
| 181 | 数量 | 173 | 数量 |
| 182 | </div> | 174 | </div> |
| 183 | <div class="total-item-price"> | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg |
| 185 | </div> | 177 | </div> |
| 186 | </div> | 178 | </div> |
| 187 | - <div class="total-item"> | 179 | + <!-- <div class="total-item"> |
| 188 | <div class="total-item-text"> | 180 | <div class="total-item-text"> |
| 189 | 不含税金额 | 181 | 不含税金额 |
| 190 | </div> | 182 | </div> |
| 191 | <div class="total-item-price text-red"> | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 193 | </div> | 185 | </div> |
| 194 | - </div> | 186 | + </div> --> |
| 195 | <div class="total-item"> | 187 | <div class="total-item"> |
| 196 | <div class="total-item-text"> | 188 | <div class="total-item-text"> |
| 197 | 总金额 | 189 | 总金额 |
| 198 | </div> | 190 | </div> |
| 199 | <div class="total-item-price text-red"> | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 201 | </div> | 193 | </div> |
| 202 | </div> | 194 | </div> |
| 203 | </div> | 195 | </div> |
| @@ -233,6 +225,7 @@ export default { | @@ -233,6 +225,7 @@ export default { | ||
| 233 | buyer: '', | 225 | buyer: '', |
| 234 | buyerName: '', | 226 | buyerName: '', |
| 235 | orderDate: '', | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | ||
| 236 | designatedConsignee: '', | 229 | designatedConsignee: '', |
| 237 | specialTerms: '', | 230 | specialTerms: '', |
| 238 | specialTermsName: '', | 231 | specialTermsName: '', |
| @@ -243,7 +236,7 @@ export default { | @@ -243,7 +236,7 @@ export default { | ||
| 243 | includesPackagingFeeName: '', | 236 | includesPackagingFeeName: '', |
| 244 | includesTransportFee: false, | 237 | includesTransportFee: false, |
| 245 | includesTransportFeeName: '', | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | 239 | + unit: '美元、公斤、元美/公斤', |
| 247 | totalAmountCapital: '', | 240 | totalAmountCapital: '', |
| 248 | destinationId: [], | 241 | destinationId: [], |
| 249 | destinationLabel: '', | 242 | destinationLabel: '', |
| @@ -263,9 +256,9 @@ export default { | @@ -263,9 +256,9 @@ export default { | ||
| 263 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 266 | - sumQuantity: 0, | ||
| 267 | - sumAmountExcl: 0, | ||
| 268 | - sumTotal: 0, | 259 | + totalQuantity: 0, |
| 260 | + // totalAmountExcludingTax: 0, | ||
| 261 | + totalAmountIncludingTax: 0, | ||
| 269 | productLineList: [], | 262 | productLineList: [], |
| 270 | productList: [], | 263 | productList: [], |
| 271 | customerRemarks: [], | 264 | customerRemarks: [], |
| @@ -365,11 +358,11 @@ export default { | @@ -365,11 +358,11 @@ export default { | ||
| 365 | onProductsChange(products) { | 358 | onProductsChange(products) { |
| 366 | const list = Array.isArray(products) ? products : [] | 359 | const list = Array.isArray(products) ? products : [] |
| 367 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 360 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 368 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 361 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 369 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 362 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 370 | - this.sumQuantity = sumQ | ||
| 371 | - this.sumAmountExcl = sumE | ||
| 372 | - this.sumTotal = sumT | 363 | + this.totalQuantity = sumQ |
| 364 | + // this.totalAmountExcludingTax = sumE | ||
| 365 | + this.totalAmountIncludingTax = sumT | ||
| 373 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 366 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 374 | this.productLineList = list | 367 | this.productLineList = list |
| 375 | }, | 368 | }, |
| @@ -445,6 +438,10 @@ export default { | @@ -445,6 +438,10 @@ export default { | ||
| 445 | setSheet('生产厂', opts) | 438 | setSheet('生产厂', opts) |
| 446 | } else if (field === 'supplier') { | 439 | } else if (field === 'supplier') { |
| 447 | setSheet('供方', this.supplierList) | 440 | setSheet('供方', this.supplierList) |
| 441 | + } else if (field === 'specialTerms') { | ||
| 442 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 443 | + } else if (field === 'executionStandard') { | ||
| 444 | + setSheet('执行标准', this.executionStandardList) | ||
| 448 | } else if (field === 'includesPackagingFee') { | 445 | } else if (field === 'includesPackagingFee') { |
| 449 | setSheet('单价中是否已包含包装费', this.yesNoList) | 446 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 450 | } else if (field === 'includesTransportFee') { | 447 | } else if (field === 'includesTransportFee') { |
| @@ -515,9 +512,9 @@ export default { | @@ -515,9 +512,9 @@ export default { | ||
| 515 | ...formForSubmit, | 512 | ...formForSubmit, |
| 516 | destination, | 513 | destination, |
| 517 | type: 'INTL_STD_CONTRACT', | 514 | type: 'INTL_STD_CONTRACT', |
| 518 | - sumQuantity: this.sumQuantity, | ||
| 519 | - sumAmountExcl: this.sumAmountExcl, | ||
| 520 | - sumTotal: this.sumTotal, | 515 | + totalQuantity: this.totalQuantity, |
| 516 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 517 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 521 | contractDistributorLineList: lines | 518 | contractDistributorLineList: lines |
| 522 | }) | 519 | }) |
| 523 | console.log('onSubmit__payload', payload) | 520 | console.log('onSubmit__payload', payload) |
| @@ -536,18 +533,31 @@ export default { | @@ -536,18 +533,31 @@ export default { | ||
| 536 | { key: 'supplier', label: '供方' }, | 533 | { key: 'supplier', label: '供方' }, |
| 537 | { key: 'buyer', label: '需方' }, | 534 | { key: 'buyer', label: '需方' }, |
| 538 | { key: 'orderDate', label: '订货日期' }, | 535 | { key: 'orderDate', label: '订货日期' }, |
| 536 | + { key: 'unit', label: '单位' }, | ||
| 539 | { key: 'workshopId', label: '生产厂' }, | 537 | { key: 'workshopId', label: '生产厂' }, |
| 538 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 540 | ] | 539 | ] |
| 541 | for (const it of checks) { | 540 | for (const it of checks) { |
| 542 | const val = this.form[it.key] | 541 | const val = this.form[it.key] |
| 543 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 542 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 544 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 543 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 545 | } | 544 | } |
| 546 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 545 | + const list = Array.isArray(this.productLineList) ? this.productLineList : [] |
| 546 | + if (list.length === 0) { | ||
| 547 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 547 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 548 | } | 548 | } |
| 549 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 550 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 549 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 550 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 551 | + for (const [idx, it] of list.entries()) { | ||
| 552 | + if ( | ||
| 553 | + strEmpty(it.productName) || | ||
| 554 | + strEmpty(it.industry) || | ||
| 555 | + strEmpty(it.quality) || | ||
| 556 | + strEmpty(it.brand) || | ||
| 557 | + numEmpty(it.quantity) || | ||
| 558 | + numEmpty(it.unitPrice) || | ||
| 559 | + strEmpty(it.deliveryDate) | ||
| 560 | + ) { | ||
| 551 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 561 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 552 | } | 562 | } |
| 553 | } | 563 | } |
| @@ -575,7 +585,7 @@ export default { | @@ -575,7 +585,7 @@ export default { | ||
| 575 | color: rgba(0, 0, 0, 0.6); | 585 | color: rgba(0, 0, 0, 0.6); |
| 576 | line-height: 32rpx; | 586 | line-height: 32rpx; |
| 577 | width: 240rpx; | 587 | width: 240rpx; |
| 578 | - padding: 24rpx 0; | 588 | + padding: 12rpx 0; |
| 579 | } | 589 | } |
| 580 | .total-item-price { | 590 | .total-item-price { |
| 581 | font-weight: 600; | 591 | font-weight: 600; |
| @@ -597,7 +607,7 @@ export default { | @@ -597,7 +607,7 @@ export default { | ||
| 597 | 607 | ||
| 598 | .scroll { | 608 | .scroll { |
| 599 | flex: 1; | 609 | flex: 1; |
| 600 | - padding: 12rpx 0 480rpx !important; | 610 | + padding: 12rpx 0 392rpx !important; |
| 601 | } | 611 | } |
| 602 | 612 | ||
| 603 | .footer { | 613 | .footer { |
| @@ -211,12 +211,12 @@ export default { | @@ -211,12 +211,12 @@ export default { | ||
| 211 | const t = this.detail.standardApproved || false | 211 | const t = this.detail.standardApproved || false |
| 212 | const e = this.detail.standardShowExamine || false | 212 | const e = this.detail.standardShowExamine || false |
| 213 | return [ | 213 | return [ |
| 214 | - { ...this.buttons[0], visible: (s === 'DRAFT') }, | ||
| 215 | - { ...this.buttons[1], visible: (s === 'DRAFT') }, | ||
| 216 | - { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') }, | ||
| 217 | - { ...this.buttons[3], visible: (s === 'STANDARD') }, | ||
| 218 | - { ...this.buttons[4], visible: (s === 'STANDARD' && e && t === 'AUDIT') }, | ||
| 219 | - { ...this.buttons[5], visible: (s === 'STANDARD') } | 214 | + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:modifyx')) }, |
| 215 | + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:delete')) }, | ||
| 216 | + { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:upload')) }, | ||
| 217 | + { ...this.buttons[3], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:upload-seal')) }, | ||
| 218 | + { ...this.buttons[4], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:approve')) }, | ||
| 219 | + { ...this.buttons[5], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:review')) } | ||
| 220 | ] | 220 | ] |
| 221 | } | 221 | } |
| 222 | }, | 222 | }, |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | @input="onSearchInput" | 14 | @input="onSearchInput" |
| 15 | /> | 15 | /> |
| 16 | <view class="tool-icons"> | 16 | <view class="tool-icons"> |
| 17 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 17 | + <image v-if="$auth.hasPermi('contract-manage:foreign-trade-standard-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| @@ -40,9 +40,7 @@ | @@ -40,9 +40,7 @@ | ||
| 40 | <uni-easyinput v-model="form.unit" :inputBorder="false" disabled /> | 40 | <uni-easyinput v-model="form.unit" :inputBorder="false" disabled /> |
| 41 | </template> | 41 | </template> |
| 42 | </uni-list-item> | 42 | </uni-list-item> |
| 43 | - | ||
| 44 | - <ProductRel mode="add" :orderDateBase="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" /> | ||
| 45 | - | 43 | + <ProductRel mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" /> |
| 46 | <uni-list-item title="合计人民币金额(大写)"> | 44 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | <template v-slot:footer> | 45 | <template v-slot:footer> |
| 48 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" | 46 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" |
| @@ -98,34 +96,25 @@ | @@ -98,34 +96,25 @@ | ||
| 98 | :inputBorder="false" /> | 96 | :inputBorder="false" /> |
| 99 | </template> | 97 | </template> |
| 100 | </uni-list-item> | 98 | </uni-list-item> |
| 101 | - | ||
| 102 | - <view class="group"> | ||
| 103 | - <view class="group-title">特别条款要求</view> | ||
| 104 | - <view class="radio-list"> | ||
| 105 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 106 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 107 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 108 | - <text class="label">{{ opt.label }}</text> | ||
| 109 | - </view> | ||
| 110 | - </view> | ||
| 111 | - </view> | ||
| 112 | - <view class="group"> | ||
| 113 | - <view class="group-title">执行标准</view> | ||
| 114 | - <view class="radio-list"> | ||
| 115 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 116 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 117 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 118 | - <text class="label">{{ opt.label }}</text> | ||
| 119 | - </view> | ||
| 120 | - </view> | ||
| 121 | - </view> | 99 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 100 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 101 | + <template v-slot:body> | ||
| 102 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 103 | + </template> | ||
| 104 | + </uni-list-item> | ||
| 105 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 106 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 107 | + <template v-slot:body> | ||
| 108 | + <view class="item-title"><text>执行标准</text></view> | ||
| 109 | + </template> | ||
| 110 | + </uni-list-item> | ||
| 122 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 111 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | <template v-slot:footer> | 112 | <template v-slot:footer> |
| 124 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 113 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | :inputBorder="false" /> | 114 | :inputBorder="false" /> |
| 126 | </template> | 115 | </template> |
| 127 | </uni-list-item> | 116 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | 117 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 129 | <template v-slot:footer> | 118 | <template v-slot:footer> |
| 130 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 119 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | </template> | 120 | </template> |
| @@ -177,15 +166,15 @@ | @@ -177,15 +166,15 @@ | ||
| 177 | <div class="total-text">合计</div> | 166 | <div class="total-text">合计</div> |
| 178 | <div class="total-item"> | 167 | <div class="total-item"> |
| 179 | <div class="total-item-text">数量</div> | 168 | <div class="total-item-text">数量</div> |
| 180 | - <div class="total-item-price">{{ (sumQuantity || 0).toFixed(2) }}t</div> | 169 | + <div class="total-item-price">{{ (totalQuantity || 0).toFixed(2) }}kg</div> |
| 181 | </div> | 170 | </div> |
| 182 | - <div class="total-item"> | 171 | + <!-- <div class="total-item"> |
| 183 | <div class="total-item-text">不含税金额</div> | 172 | <div class="total-item-text">不含税金额</div> |
| 184 | - <div class="total-item-price text-red">¥{{ (sumAmountExcl || 0).toFixed(2) }}</div> | ||
| 185 | - </div> | 173 | + <div class="total-item-price text-red">¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}</div> |
| 174 | + </div> --> | ||
| 186 | <div class="total-item"> | 175 | <div class="total-item"> |
| 187 | <div class="total-item-text">总金额</div> | 176 | <div class="total-item-text">总金额</div> |
| 188 | - <div class="total-item-price text-red">¥{{ (sumTotal || 0).toFixed(2) }}</div> | 177 | + <div class="total-item-price text-red">¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}</div> |
| 189 | </div> | 178 | </div> |
| 190 | </div> | 179 | </div> |
| 191 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> | 180 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| @@ -223,6 +212,7 @@ export default { | @@ -223,6 +212,7 @@ export default { | ||
| 223 | workshopId: '', | 212 | workshopId: '', |
| 224 | workshopName: '', | 213 | workshopName: '', |
| 225 | orderDate: '', | 214 | orderDate: '', |
| 215 | + deliveryDate: '', | ||
| 226 | designatedConsignee: '', | 216 | designatedConsignee: '', |
| 227 | specialTerms: '', | 217 | specialTerms: '', |
| 228 | specialTermsName: '', | 218 | specialTermsName: '', |
| @@ -233,7 +223,7 @@ export default { | @@ -233,7 +223,7 @@ export default { | ||
| 233 | includesPackagingFeeName: '', | 223 | includesPackagingFeeName: '', |
| 234 | includesTransportFee: false, | 224 | includesTransportFee: false, |
| 235 | includesTransportFeeName: '', | 225 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | 226 | + unit: '美元、公斤、美元/公斤', |
| 237 | totalAmountCapital: '', | 227 | totalAmountCapital: '', |
| 238 | depositInfo: '', | 228 | depositInfo: '', |
| 239 | packagingRequirements: '', | 229 | packagingRequirements: '', |
| @@ -256,9 +246,9 @@ export default { | @@ -256,9 +246,9 @@ export default { | ||
| 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 246 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 247 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 248 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 259 | - sumQuantity: 0, | ||
| 260 | - sumAmountExcl: 0, | ||
| 261 | - sumTotal: 0, | 249 | + totalQuantity: 0, |
| 250 | + // totalAmountExcludingTax: 0, | ||
| 251 | + totalAmountIncludingTax: 0, | ||
| 262 | productLineList: [], | 252 | productLineList: [], |
| 263 | newProductLineList: [], | 253 | newProductLineList: [], |
| 264 | productList: [] | 254 | productList: [] |
| @@ -347,11 +337,11 @@ export default { | @@ -347,11 +337,11 @@ export default { | ||
| 347 | const list = Array.isArray(products) ? products : [] | 337 | const list = Array.isArray(products) ? products : [] |
| 348 | this.newProductLineList = list | 338 | this.newProductLineList = list |
| 349 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 339 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 350 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 340 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 351 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 341 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 352 | - this.sumQuantity = sumQ | ||
| 353 | - this.sumAmountExcl = sumE | ||
| 354 | - this.sumTotal = sumT | 342 | + this.totalQuantity = sumQ |
| 343 | + // this.totalAmountExcludingTax = sumE | ||
| 344 | + this.totalAmountIncludingTax = sumT | ||
| 355 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 345 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | }, | 346 | }, |
| 357 | async loadSuppliers() { | 347 | async loadSuppliers() { |
| @@ -399,6 +389,10 @@ export default { | @@ -399,6 +389,10 @@ export default { | ||
| 399 | setSheet('生产厂', opts) | 389 | setSheet('生产厂', opts) |
| 400 | } else if (field === 'supplier') { | 390 | } else if (field === 'supplier') { |
| 401 | setSheet('供方', this.supplierList) | 391 | setSheet('供方', this.supplierList) |
| 392 | + } else if (field === 'specialTerms') { | ||
| 393 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 394 | + } else if (field === 'executionStandard') { | ||
| 395 | + setSheet('执行标准', this.executionStandardList) | ||
| 402 | } else if (field === 'includesPackagingFee') { | 396 | } else if (field === 'includesPackagingFee') { |
| 403 | setSheet('单价中是否已包含包装费', this.yesNoList) | 397 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | } else if (field === 'includesTransportFee') { | 398 | } else if (field === 'includesTransportFee') { |
| @@ -443,18 +437,32 @@ export default { | @@ -443,18 +437,32 @@ export default { | ||
| 443 | { key: 'supplier', label: '供方' }, | 437 | { key: 'supplier', label: '供方' }, |
| 444 | { key: 'buyer', label: '需方' }, | 438 | { key: 'buyer', label: '需方' }, |
| 445 | { key: 'orderDate', label: '订货日期' }, | 439 | { key: 'orderDate', label: '订货日期' }, |
| 440 | + { key: 'unit', label: '单位' }, | ||
| 446 | { key: 'workshopId', label: '生产厂' }, | 441 | { key: 'workshopId', label: '生产厂' }, |
| 442 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 447 | ] | 443 | ] |
| 448 | for (const it of checks) { | 444 | for (const it of checks) { |
| 449 | const val = this.form[it.key] | 445 | const val = this.form[it.key] |
| 450 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 446 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 447 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 452 | } | 448 | } |
| 453 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 449 | + const list = Array.isArray(this.newProductLineList) ? this.newProductLineList : [] |
| 450 | + if (list.length === 0) { | ||
| 454 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 451 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 455 | } | 452 | } |
| 456 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 457 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 453 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 454 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 455 | + for (const [idx, it] of list.entries()) { | ||
| 456 | + console.log('it111', it) | ||
| 457 | + if ( | ||
| 458 | + strEmpty(it.productName) || | ||
| 459 | + strEmpty(it.industry) || | ||
| 460 | + strEmpty(it.quality) || | ||
| 461 | + strEmpty(it.brand) || | ||
| 462 | + numEmpty(it.quantity) || | ||
| 463 | + numEmpty(it.unitPrice) || | ||
| 464 | + strEmpty(it.deliveryDate) | ||
| 465 | + ) { | ||
| 458 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 466 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | } | 467 | } |
| 460 | } | 468 | } |
| @@ -479,25 +487,25 @@ export default { | @@ -479,25 +487,25 @@ export default { | ||
| 479 | return out | 487 | return out |
| 480 | } | 488 | } |
| 481 | const lines = (this.newProductLineList || []).map(it => clean(it)) | 489 | const lines = (this.newProductLineList || []).map(it => clean(it)) |
| 482 | - const { destinationLabel, destinationId, ...formForSubmit } = this.form; | ||
| 483 | - const destination = destinationId && destinationId.length > 0 ? destinationId[destinationId.length - 1] : ''; | ||
| 484 | - const payload = clean({ | ||
| 485 | - ...formForSubmit, | ||
| 486 | - id: this.form.id, | ||
| 487 | - destination, | ||
| 488 | - type: 'INTL_STD_CONTRACT', | ||
| 489 | - sumQuantity: this.sumQuantity, | ||
| 490 | - sumAmountExcl: this.sumAmountExcl, | ||
| 491 | - sumTotal: this.sumTotal, | ||
| 492 | - contractDistributorLineList: lines | ||
| 493 | - }) | ||
| 494 | - try { | ||
| 495 | - await updateContractApi(payload) | ||
| 496 | - uni.showToast({ title: '保存成功', icon: 'none' }) | ||
| 497 | - setTimeout(() => { uni.redirectTo({ url: '/pages/contract_foreign_std/index' }) }, 400) | ||
| 498 | - } catch (e) { | ||
| 499 | - uni.showToast({ title: '提交失败', icon: 'none' }) | ||
| 500 | - } | 490 | + const { destinationLabel, destinationId, ...formForSubmit } = this.form; |
| 491 | + const destination = destinationId && destinationId.length > 0 ? destinationId[destinationId.length - 1] : ''; | ||
| 492 | + const payload = clean({ | ||
| 493 | + ...formForSubmit, | ||
| 494 | + id: this.form.id, | ||
| 495 | + destination, | ||
| 496 | + type: 'INTL_STD_CONTRACT', | ||
| 497 | + totalQuantity: this.totalQuantity, | ||
| 498 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 499 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 500 | + contractDistributorLineList: lines | ||
| 501 | + }) | ||
| 502 | + try { | ||
| 503 | + await updateContractApi(payload) | ||
| 504 | + uni.showToast({ title: '保存成功', icon: 'none' }) | ||
| 505 | + setTimeout(() => { uni.redirectTo({ url: '/pages/contract_foreign_std/index' }) }, 400) | ||
| 506 | + } catch (e) { | ||
| 507 | + uni.showToast({ title: '提交失败', icon: 'none' }) | ||
| 508 | + } | ||
| 501 | } | 509 | } |
| 502 | } | 510 | } |
| 503 | } | 511 | } |
| @@ -524,7 +532,7 @@ export default { | @@ -524,7 +532,7 @@ export default { | ||
| 524 | color: rgba(0, 0, 0, 0.6); | 532 | color: rgba(0, 0, 0, 0.6); |
| 525 | line-height: 32rpx; | 533 | line-height: 32rpx; |
| 526 | width: 240rpx; | 534 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | 535 | + padding: 12rpx 0; |
| 528 | } | 536 | } |
| 529 | 537 | ||
| 530 | .total-item-price { | 538 | .total-item-price { |
| @@ -547,7 +555,7 @@ export default { | @@ -547,7 +555,7 @@ export default { | ||
| 547 | 555 | ||
| 548 | .scroll { | 556 | .scroll { |
| 549 | flex: 1; | 557 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | 558 | + padding: 12rpx 0 392rpx !important; |
| 551 | } | 559 | } |
| 552 | 560 | ||
| 553 | .footer { | 561 | .footer { |
| @@ -53,53 +53,53 @@ | @@ -53,53 +53,53 @@ | ||
| 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | </template> | 54 | </template> |
| 55 | </uni-list-item> | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | 56 | + <uni-list-item title="厚度(mm)"> |
| 57 | <template v-slot:footer> | 57 | <template v-slot:footer> |
| 58 | - <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> | 58 | + <uni-easyinput type="digit" v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" @input="onNonNegativeInput(idx, 'thickness')" @blur="onNonNegativeBlur(idx, 'thickness', 2)" /> |
| 59 | </template> | 59 | </template> |
| 60 | </uni-list-item> | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | 61 | + <uni-list-item title="厚度公差上限(mm)"> |
| 62 | <template v-slot:footer> | 62 | <template v-slot:footer> |
| 63 | - <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" | ||
| 64 | - placeholder="请输入厚度公差(单项+)" /> | 63 | + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false" |
| 64 | + placeholder="请输入厚度公差上限" @input="onNonNegativeInput(idx, 'thicknessTolPos')" @blur="onNonNegativeBlur(idx, 'thicknessTolPos', 2)" /> | ||
| 65 | </template> | 65 | </template> |
| 66 | </uni-list-item> | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | 67 | + <uni-list-item title="厚度公差下限(mm)"> |
| 68 | <template v-slot:footer> | 68 | <template v-slot:footer> |
| 69 | - <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" | ||
| 70 | - placeholder="请输入厚度公差(单项-)" /> | 69 | + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false" |
| 70 | + placeholder="请输入厚度公差下限" @input="onNonNegativeInput(idx, 'thicknessTolNeg')" @blur="onNonNegativeBlur(idx, 'thicknessTolNeg', 2)" /> | ||
| 71 | </template> | 71 | </template> |
| 72 | </uni-list-item> | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | 73 | + <uni-list-item title="宽度(mm)"> |
| 74 | <template v-slot:footer> | 74 | <template v-slot:footer> |
| 75 | - <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> | 75 | + <uni-easyinput type="digit" v-model="item.width" :inputBorder="false" placeholder="请输入宽度" @input="onNonNegativeInput(idx, 'width')" @blur="onNonNegativeBlur(idx, 'width', 2)" /> |
| 76 | </template> | 76 | </template> |
| 77 | </uni-list-item> | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | 78 | + <uni-list-item title="宽度公差上限(mm)"> |
| 79 | <template v-slot:footer> | 79 | <template v-slot:footer> |
| 80 | - <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> | 80 | + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNonNegativeInput(idx, 'widthTolPos')" @blur="onNonNegativeBlur(idx, 'widthTolPos', 2)" /> |
| 81 | </template> | 81 | </template> |
| 82 | </uni-list-item> | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | 83 | + <uni-list-item title="宽度公差下限(mm)"> |
| 84 | <template v-slot:footer> | 84 | <template v-slot:footer> |
| 85 | - <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> | 85 | + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNonNegativeInput(idx, 'widthTolNeg')" @blur="onNonNegativeBlur(idx, 'widthTolNeg', 2)" /> |
| 86 | </template> | 86 | </template> |
| 87 | </uni-list-item> | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | 88 | + <uni-list-item title="长度(mm)"> |
| 89 | <template v-slot:footer> | 89 | <template v-slot:footer> |
| 90 | - <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> | 90 | + <uni-easyinput type="digit" v-model="item.length" :inputBorder="false" placeholder="请输入长度" @input="onNonNegativeInput(idx, 'length')" @blur="onNonNegativeBlur(idx, 'length', 2)" /> |
| 91 | </template> | 91 | </template> |
| 92 | </uni-list-item> | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | 93 | + <uni-list-item title="长度公差上限(mm)"> |
| 94 | <template v-slot:footer> | 94 | <template v-slot:footer> |
| 95 | - <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" | ||
| 96 | - placeholder="请输入长度公差(单项+)" /> | 95 | + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false" |
| 96 | + placeholder="请输入长度公差上限" @input="onNonNegativeInput(idx, 'lengthTolPos')" @blur="onNonNegativeBlur(idx, 'lengthTolPos', 2)" /> | ||
| 97 | </template> | 97 | </template> |
| 98 | </uni-list-item> | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | 99 | + <uni-list-item title="长度公差下限(mm)"> |
| 100 | <template v-slot:footer> | 100 | <template v-slot:footer> |
| 101 | - <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" | ||
| 102 | - placeholder="请输入长度公差(单项-)" /> | 101 | + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false" |
| 102 | + placeholder="请输入长度公差下限" @input="onNonNegativeInput(idx, 'lengthTolNeg')" @blur="onNonNegativeBlur(idx, 'lengthTolNeg', 2)" /> | ||
| 103 | </template> | 103 | </template> |
| 104 | </uni-list-item> | 104 | </uni-list-item> |
| 105 | <uni-list-item title="状态"> | 105 | <uni-list-item title="状态"> |
| @@ -109,12 +109,12 @@ | @@ -109,12 +109,12 @@ | ||
| 109 | </uni-list-item> | 109 | </uni-list-item> |
| 110 | <uni-list-item title="数量"> | 110 | <uni-list-item title="数量"> |
| 111 | <template v-slot:footer> | 111 | <template v-slot:footer> |
| 112 | - <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" placeholder="请输入数量" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'quantity', 0)" /> | 112 | + <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 2)" /> |
| 113 | </template> | 113 | </template> |
| 114 | </uni-list-item> | 114 | </uni-list-item> |
| 115 | <uni-list-item title="单价"> | 115 | <uni-list-item title="单价"> |
| 116 | <template v-slot:footer> | 116 | <template v-slot:footer> |
| 117 | - <uni-easyinput v-model="item.unitPrice" disabled type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" /> | 117 | + <uni-easyinput v-model="item.unitPrice" type="digit" :inputBorder="false" placeholder="请输入销售价格" @input="onNonNegativeInput(idx, 'unitPrice')" @blur="onNonNegativeBlur(idx, 'unitPrice', 2)" /> |
| 118 | </template> | 118 | </template> |
| 119 | </uni-list-item> | 119 | </uni-list-item> |
| 120 | <uni-list-item title="外贸加工费"> | 120 | <uni-list-item title="外贸加工费"> |
| @@ -122,11 +122,11 @@ | @@ -122,11 +122,11 @@ | ||
| 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> | 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> |
| 123 | </template> | 123 | </template> |
| 124 | </uni-list-item> | 124 | </uni-list-item> |
| 125 | - <uni-list-item title="不含税金额"> | 125 | + <!-- <uni-list-item title="不含税金额"> |
| 126 | <template v-slot:footer> | 126 | <template v-slot:footer> |
| 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 128 | </template> | 128 | </template> |
| 129 | - </uni-list-item> | 129 | + </uni-list-item> --> |
| 130 | <uni-list-item title="总金额"> | 130 | <uni-list-item title="总金额"> |
| 131 | <template v-slot:footer> | 131 | <template v-slot:footer> |
| 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| @@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
| 134 | </uni-list-item> | 134 | </uni-list-item> |
| 135 | <uni-list-item title="发货日期"> | 135 | <uni-list-item title="发货日期"> |
| 136 | <template v-slot:footer> | 136 | <template v-slot:footer> |
| 137 | - <uni-datetime-picker type="date" v-model="item.orderDate" @change="onDateChange(idx, $event)" /> | 137 | + <uni-datetime-picker :start="minDeliveryDate" type="date" v-model="item.deliveryDate" @change="onDateChange(idx, $event)" /> |
| 138 | </template> | 138 | </template> |
| 139 | </uni-list-item> | 139 | </uni-list-item> |
| 140 | </uni-list> | 140 | </uni-list> |
| @@ -156,18 +156,41 @@ | @@ -156,18 +156,41 @@ | ||
| 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 158 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> | 158 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> |
| 159 | - <view class="row"><text class="label">规格</text><text class="value">{{ item.specDisplay }}</text></view> | 159 | + <!-- 厚(公差) * 宽(公差) * 长(公差) --> |
| 160 | + <view class="row row-spec"><text class="label">规格(mm)</text> | ||
| 161 | + <view class="value value-spec"> | ||
| 162 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 163 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 164 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }} | ||
| 165 | + </view> | ||
| 166 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }} | ||
| 167 | + </view> | ||
| 168 | + </view> | ||
| 169 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 170 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 171 | + <view v-if="item.width" class="value-spec_box"> | ||
| 172 | + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view> | ||
| 173 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view> | ||
| 174 | + </view> | ||
| 175 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 176 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 177 | + <view v-if="item.length" class="value-spec_box"> | ||
| 178 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view> | ||
| 179 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view> | ||
| 180 | + </view> | ||
| 181 | + </view> | ||
| 182 | + </view> | ||
| 160 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 161 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 162 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 163 | }}</text> | 186 | }}</text> |
| 164 | </view> | 187 | </view> |
| 165 | - <view class="row"><text class="label">不含税金额</text><text class="value">{{ | 188 | + <!-- <view class="row"><text class="label">不含税金额</text><text class="value">{{ |
| 166 | formatCurrency(item.amountExcludingTax) | 189 | formatCurrency(item.amountExcludingTax) |
| 167 | - }}</text></view> | 190 | + }}</text></view> --> |
| 168 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 169 | }}</text></view> | 192 | }}</text></view> |
| 170 | - <view class="row"><text class="label">发货日期</text><text class="value">{{ item.orderDate }}</text></view> | 193 | + <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text></view> |
| 171 | </view> | 194 | </view> |
| 172 | </view> | 195 | </view> |
| 173 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> | 196 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> |
| @@ -181,7 +204,8 @@ export default { | @@ -181,7 +204,8 @@ export default { | ||
| 181 | mode: { type: String, default: 'add' }, | 204 | mode: { type: String, default: 'add' }, |
| 182 | list: { type: Array, default: () => [] }, | 205 | list: { type: Array, default: () => [] }, |
| 183 | max: { type: Number, default: 8 }, | 206 | max: { type: Number, default: 8 }, |
| 184 | - orderDateBase: { type: String, default: '' }, | 207 | + deliveryDateBase: { type: String, default: '' }, |
| 208 | + deliveryDate: { type: String, default: '' }, | ||
| 185 | options: { type: Array, default: () => [] } | 209 | options: { type: Array, default: () => [] } |
| 186 | }, | 210 | }, |
| 187 | components: { SingleSelectSheet }, | 211 | components: { SingleSelectSheet }, |
| @@ -199,6 +223,21 @@ export default { | @@ -199,6 +223,21 @@ export default { | ||
| 199 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), | 223 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), |
| 200 | value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) | 224 | value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) |
| 201 | })) | 225 | })) |
| 226 | + }, | ||
| 227 | + minDeliveryDate() { | ||
| 228 | + const s = this.deliveryDate | ||
| 229 | + if (!s) return '' | ||
| 230 | + const parts = String(s).split('-') | ||
| 231 | + const y = Number(parts[0]) | ||
| 232 | + const m = Number(parts[1]) | ||
| 233 | + const d = Number(parts[2]) | ||
| 234 | + if (!y || !m || !d) return '' | ||
| 235 | + const dt = new Date(y, m - 1, d) | ||
| 236 | + dt.setDate(dt.getDate() + 1) | ||
| 237 | + const yy = dt.getFullYear() | ||
| 238 | + const mm = String(dt.getMonth() + 1).padStart(2, '0') | ||
| 239 | + const dd = String(dt.getDate() - 1).padStart(2, '0') | ||
| 240 | + return `${yy}/${mm}/${dd}` | ||
| 202 | } | 241 | } |
| 203 | }, | 242 | }, |
| 204 | watch: { | 243 | watch: { |
| @@ -223,10 +262,18 @@ export default { | @@ -223,10 +262,18 @@ export default { | ||
| 223 | }, | 262 | }, |
| 224 | methods: { | 263 | methods: { |
| 225 | defaultItem() { | 264 | defaultItem() { |
| 226 | - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, amountExcludingTax: 0, totalAmount: 0, orderDate: '' } | 265 | + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '',processingFee: undefined, status: '', quantity: '', unitPrice: '', totalAmount: 0, deliveryDate: '' } |
| 227 | }, | 266 | }, |
| 228 | - onImmediateChange(idx) { | ||
| 229 | - this.$nextTick(() => this.recalculate(idx)) | 267 | + onNonNegativeInput(idx, field) { |
| 268 | + const it = this.items[idx] | ||
| 269 | + if (!it) return | ||
| 270 | + let v = String(it[field] != null ? it[field] : '') | ||
| 271 | + v = v.replace(/[^0-9.]/g, '') | ||
| 272 | + v = v.replace(/(\..*)\./g, '$1') | ||
| 273 | + if (v.startsWith('.')) v = '0' + v | ||
| 274 | + it[field] = v | ||
| 275 | + this.$set(this.items, idx, it) | ||
| 276 | + if (field === 'quantity' || field === 'unitPrice') this.$nextTick(() => this.recalculate(idx)) | ||
| 230 | }, | 277 | }, |
| 231 | toNumber(val) { | 278 | toNumber(val) { |
| 232 | if (typeof val === 'number') return isNaN(val) ? 0 : val | 279 | if (typeof val === 'number') return isNaN(val) ? 0 : val |
| @@ -239,21 +286,21 @@ export default { | @@ -239,21 +286,21 @@ export default { | ||
| 239 | const m = Math.pow(10, digits) | 286 | const m = Math.pow(10, digits) |
| 240 | return Math.round(n * m) / m | 287 | return Math.round(n * m) / m |
| 241 | }, | 288 | }, |
| 242 | - onNumberBlur(idx, field, digits) { | 289 | + onNonNegativeBlur(idx, field, digits) { |
| 243 | const it = this.items[idx] | 290 | const it = this.items[idx] |
| 244 | if (!it) return | 291 | if (!it) return |
| 245 | const raw = it[field] | 292 | const raw = it[field] |
| 246 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | ||
| 247 | if (raw === '' || raw === null || raw === undefined) { | 293 | if (raw === '' || raw === null || raw === undefined) { |
| 248 | this.$set(this.items, idx, it) | 294 | this.$set(this.items, idx, it) |
| 249 | - this.recalculate(idx) | 295 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 250 | return | 296 | return |
| 251 | } | 297 | } |
| 252 | - const num = this.toNumber(raw) | 298 | + let num = this.toNumber(raw) |
| 299 | + if (isNaN(num) || num < 0) num = 0 | ||
| 253 | const rounded = this.round(num, digits) | 300 | const rounded = this.round(num, digits) |
| 254 | it[field] = rounded | 301 | it[field] = rounded |
| 255 | this.$set(this.items, idx, it) | 302 | this.$set(this.items, idx, it) |
| 256 | - this.recalculate(idx) | 303 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 257 | }, | 304 | }, |
| 258 | formatCurrency(val) { | 305 | formatCurrency(val) { |
| 259 | if (val == null || val === '') return '' | 306 | if (val == null || val === '') return '' |
| @@ -291,8 +338,8 @@ export default { | @@ -291,8 +338,8 @@ export default { | ||
| 291 | const qty = this.toNumber(it.quantity) | 338 | const qty = this.toNumber(it.quantity) |
| 292 | const price = this.toNumber(it.unitPrice) | 339 | const price = this.toNumber(it.unitPrice) |
| 293 | const total = this.round(qty * price, 2) | 340 | const total = this.round(qty * price, 2) |
| 294 | - const excl = this.round(total / (1 + TAX_RATE), 2) | ||
| 295 | - const next = { ...it, totalAmount: total, amountExcludingTax: excl } | 341 | + // const excl = this.round(total / (1 + TAX_RATE), 2) |
| 342 | + const next = { ...it, totalAmount: total } | ||
| 296 | this.$set(this.items, idx, next) | 343 | this.$set(this.items, idx, next) |
| 297 | }, | 344 | }, |
| 298 | recalculateAll() { | 345 | recalculateAll() { |
| @@ -324,15 +371,15 @@ export default { | @@ -324,15 +371,15 @@ export default { | ||
| 324 | onDateChange(idx, e) { | 371 | onDateChange(idx, e) { |
| 325 | const it = this.items[idx] | 372 | const it = this.items[idx] |
| 326 | if (!it) return | 373 | if (!it) return |
| 327 | - const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.orderDate | 374 | + const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.deliveryDate |
| 328 | const dateStr = String(val).slice(0, 10) | 375 | const dateStr = String(val).slice(0, 10) |
| 329 | - const base = this.orderDateBase ? new Date(this.orderDateBase) : null | 376 | + const base = this.deliveryDateBase ? new Date(this.deliveryDateBase) : null |
| 330 | const d = new Date(dateStr) | 377 | const d = new Date(dateStr) |
| 331 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { | 378 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 332 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) | 379 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 333 | - it.orderDate = this.orderDateBase | 380 | + it.deliveryDate = this.deliveryDateBase |
| 334 | } else { | 381 | } else { |
| 335 | - it.orderDate = dateStr | 382 | + it.deliveryDate = dateStr |
| 336 | } | 383 | } |
| 337 | this.$set(this.items, idx, it) | 384 | this.$set(this.items, idx, it) |
| 338 | }, | 385 | }, |
| @@ -388,12 +435,13 @@ export default { | @@ -388,12 +435,13 @@ export default { | ||
| 388 | height: 40rpx; | 435 | height: 40rpx; |
| 389 | } | 436 | } |
| 390 | 437 | ||
| 391 | - .opCollapse { | ||
| 392 | - color: rgba(0, 0, 0, 0.6); | ||
| 393 | - width: 32rpx; | ||
| 394 | - height: 28rpx; | ||
| 395 | - margin-right: 16rpx; | ||
| 396 | - } | 438 | +.opCollapse { |
| 439 | + color: rgba(0, 0, 0, 0.6); | ||
| 440 | + width: 32rpx; | ||
| 441 | + height: 28rpx; | ||
| 442 | + margin-right: 16rpx; | ||
| 443 | + margin-top: 8rpx; | ||
| 444 | +} | ||
| 397 | 445 | ||
| 398 | 446 | ||
| 399 | .block { | 447 | .block { |
| @@ -504,8 +552,46 @@ export default { | @@ -504,8 +552,46 @@ export default { | ||
| 504 | 552 | ||
| 505 | .value { | 553 | .value { |
| 506 | flex: 1; | 554 | flex: 1; |
| 507 | - text-align: right; | 555 | + // text-align: right; |
| 508 | color: rgba(0, 0, 0, 0.9); | 556 | color: rgba(0, 0, 0, 0.9); |
| 509 | font-size: 28rpx; | 557 | font-size: 28rpx; |
| 510 | } | 558 | } |
| 559 | + .value-spec { | ||
| 560 | + height: 48rpx; | ||
| 561 | + display: flex; | ||
| 562 | + align-items: center; | ||
| 563 | + color: #000000; | ||
| 564 | + // justify-content: end; | ||
| 565 | + &_box { | ||
| 566 | + position: relative; | ||
| 567 | + width: 60rpx; | ||
| 568 | + height: 48rpx; | ||
| 569 | + | ||
| 570 | + &_1 { | ||
| 571 | + font-size: 16rpx; | ||
| 572 | + position: absolute; | ||
| 573 | + top: -10rpx; | ||
| 574 | + left: 0; | ||
| 575 | + } | ||
| 576 | + | ||
| 577 | + &_2 { | ||
| 578 | + font-size: 16rpx; | ||
| 579 | + position: absolute; | ||
| 580 | + bottom: -10rpx; | ||
| 581 | + left: 0; | ||
| 582 | + } | ||
| 583 | + } | ||
| 584 | + | ||
| 585 | + &_val { | ||
| 586 | + font-size: 28rpx; | ||
| 587 | + | ||
| 588 | + &.p12 { | ||
| 589 | + padding-right: 12rpx; | ||
| 590 | + } | ||
| 591 | + } | ||
| 592 | + } | ||
| 593 | + .row-spec { | ||
| 594 | + height: 60rpx; | ||
| 595 | + align-items: center; | ||
| 596 | + } | ||
| 511 | </style> | 597 | </style> |
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | </template> | 40 | </template> |
| 41 | </uni-list-item> | 41 | </uni-list-item> |
| 42 | - <ProductRel mode="add" :orderDateBase="form.orderDate" @change="onProductsChange" :options="productList" /> | 42 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" @change="onProductsChange" :options="productList" /> |
| 43 | <uni-list-item title="合计人民币金额(大写)"> | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | <template v-slot:footer> | 44 | <template v-slot:footer> |
| 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| @@ -92,33 +92,25 @@ | @@ -92,33 +92,25 @@ | ||
| 92 | :inputBorder="false" /> | 92 | :inputBorder="false" /> |
| 93 | </template> | 93 | </template> |
| 94 | </uni-list-item> | 94 | </uni-list-item> |
| 95 | - <view class="group"> | ||
| 96 | - <view class="group-title">特别条款要求</view> | ||
| 97 | - <view class="radio-list"> | ||
| 98 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 99 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 100 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 101 | - <text class="label">{{ opt.label }}</text> | ||
| 102 | - </view> | ||
| 103 | - </view> | ||
| 104 | - </view> | ||
| 105 | - <view class="group"> | ||
| 106 | - <view class="group-title">执行标准</view> | ||
| 107 | - <view class="radio-list"> | ||
| 108 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 109 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 110 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 111 | - <text class="label">{{ opt.label }}</text> | ||
| 112 | - </view> | ||
| 113 | - </view> | ||
| 114 | - </view> | 95 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 96 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 97 | + <template v-slot:body> | ||
| 98 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 99 | + </template> | ||
| 100 | + </uni-list-item> | ||
| 101 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 102 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text>执行标准</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 115 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | <template v-slot:footer> | 108 | <template v-slot:footer> |
| 117 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | :inputBorder="false" /> | 110 | :inputBorder="false" /> |
| 119 | </template> | 111 | </template> |
| 120 | </uni-list-item> | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 122 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 123 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | </template> | 116 | </template> |
| @@ -181,23 +173,23 @@ | @@ -181,23 +173,23 @@ | ||
| 181 | 数量 | 173 | 数量 |
| 182 | </div> | 174 | </div> |
| 183 | <div class="total-item-price"> | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg |
| 185 | </div> | 177 | </div> |
| 186 | </div> | 178 | </div> |
| 187 | - <div class="total-item"> | 179 | + <!-- <div class="total-item"> |
| 188 | <div class="total-item-text"> | 180 | <div class="total-item-text"> |
| 189 | 不含税金额 | 181 | 不含税金额 |
| 190 | </div> | 182 | </div> |
| 191 | <div class="total-item-price text-red"> | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 193 | </div> | 185 | </div> |
| 194 | - </div> | 186 | + </div> --> |
| 195 | <div class="total-item"> | 187 | <div class="total-item"> |
| 196 | <div class="total-item-text"> | 188 | <div class="total-item-text"> |
| 197 | 总金额 | 189 | 总金额 |
| 198 | </div> | 190 | </div> |
| 199 | <div class="total-item-price text-red"> | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 201 | </div> | 193 | </div> |
| 202 | </div> | 194 | </div> |
| 203 | </div> | 195 | </div> |
| @@ -233,6 +225,7 @@ export default { | @@ -233,6 +225,7 @@ export default { | ||
| 233 | buyer: '', | 225 | buyer: '', |
| 234 | buyerName: '', | 226 | buyerName: '', |
| 235 | orderDate: '', | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | ||
| 236 | designatedConsignee: '', | 229 | designatedConsignee: '', |
| 237 | specialTerms: '', | 230 | specialTerms: '', |
| 238 | specialTermsName: '', | 231 | specialTermsName: '', |
| @@ -243,7 +236,7 @@ export default { | @@ -243,7 +236,7 @@ export default { | ||
| 243 | includesPackagingFeeName: '', | 236 | includesPackagingFeeName: '', |
| 244 | includesTransportFee: false, | 237 | includesTransportFee: false, |
| 245 | includesTransportFeeName: '', | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | 239 | + unit: '美元、公斤、美元/公斤', |
| 247 | totalAmountCapital: '', | 240 | totalAmountCapital: '', |
| 248 | destinationId: [], | 241 | destinationId: [], |
| 249 | destinationLabel: '', | 242 | destinationLabel: '', |
| @@ -263,9 +256,9 @@ export default { | @@ -263,9 +256,9 @@ export default { | ||
| 263 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 266 | - sumQuantity: 0, | ||
| 267 | - sumAmountExcl: 0, | ||
| 268 | - sumTotal: 0, | 259 | + totalQuantity: 0, |
| 260 | + // totalAmountExcludingTax: 0, | ||
| 261 | + totalAmountIncludingTax: 0, | ||
| 269 | productLineList: [], | 262 | productLineList: [], |
| 270 | productList: [], | 263 | productList: [], |
| 271 | customerRemarks: [], | 264 | customerRemarks: [], |
| @@ -367,11 +360,11 @@ export default { | @@ -367,11 +360,11 @@ export default { | ||
| 367 | onProductsChange(products) { | 360 | onProductsChange(products) { |
| 368 | const list = Array.isArray(products) ? products : [] | 361 | const list = Array.isArray(products) ? products : [] |
| 369 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 362 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 370 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 363 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 371 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 364 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 372 | - this.sumQuantity = sumQ | ||
| 373 | - this.sumAmountExcl = sumE | ||
| 374 | - this.sumTotal = sumT | 365 | + this.totalQuantity = sumQ |
| 366 | + // this.totalAmountExcludingTax = sumE | ||
| 367 | + this.totalAmountIncludingTax = sumT | ||
| 375 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 368 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 376 | this.productLineList = list | 369 | this.productLineList = list |
| 377 | }, | 370 | }, |
| @@ -447,6 +440,10 @@ export default { | @@ -447,6 +440,10 @@ export default { | ||
| 447 | setSheet('生产厂', opts) | 440 | setSheet('生产厂', opts) |
| 448 | } else if (field === 'supplier') { | 441 | } else if (field === 'supplier') { |
| 449 | setSheet('供方', this.supplierList) | 442 | setSheet('供方', this.supplierList) |
| 443 | + } else if (field === 'specialTerms') { | ||
| 444 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 445 | + } else if (field === 'executionStandard') { | ||
| 446 | + setSheet('执行标准', this.executionStandardList) | ||
| 450 | } else if (field === 'includesPackagingFee') { | 447 | } else if (field === 'includesPackagingFee') { |
| 451 | setSheet('单价中是否已包含包装费', this.yesNoList) | 448 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 452 | } else if (field === 'includesTransportFee') { | 449 | } else if (field === 'includesTransportFee') { |
| @@ -517,9 +514,9 @@ export default { | @@ -517,9 +514,9 @@ export default { | ||
| 517 | ...formForSubmit, | 514 | ...formForSubmit, |
| 518 | destination, | 515 | destination, |
| 519 | type: 'INTL_INVENTORY_AGMT', | 516 | type: 'INTL_INVENTORY_AGMT', |
| 520 | - sumQuantity: this.sumQuantity, | ||
| 521 | - sumAmountExcl: this.sumAmountExcl, | ||
| 522 | - sumTotal: this.sumTotal, | 517 | + totalQuantity: this.totalQuantity, |
| 518 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 519 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 523 | contractDistributorLineList: lines | 520 | contractDistributorLineList: lines |
| 524 | }) | 521 | }) |
| 525 | console.log('onSubmit__payload', payload) | 522 | console.log('onSubmit__payload', payload) |
| @@ -538,18 +535,30 @@ export default { | @@ -538,18 +535,30 @@ export default { | ||
| 538 | { key: 'supplier', label: '供方' }, | 535 | { key: 'supplier', label: '供方' }, |
| 539 | { key: 'buyer', label: '需方' }, | 536 | { key: 'buyer', label: '需方' }, |
| 540 | { key: 'orderDate', label: '订货日期' }, | 537 | { key: 'orderDate', label: '订货日期' }, |
| 538 | + { key: 'unit', label: '单位' }, | ||
| 541 | { key: 'workshopId', label: '生产厂' }, | 539 | { key: 'workshopId', label: '生产厂' }, |
| 540 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 542 | ] | 541 | ] |
| 543 | for (const it of checks) { | 542 | for (const it of checks) { |
| 544 | const val = this.form[it.key] | 543 | const val = this.form[it.key] |
| 545 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 544 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 546 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 545 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 547 | } | 546 | } |
| 548 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 547 | + const list = Array.isArray(this.productLineList) ? this.productLineList : [] |
| 548 | + if (list.length === 0) { | ||
| 549 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 549 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 550 | } | 550 | } |
| 551 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 552 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 551 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 552 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 553 | + for (const [idx, it] of list.entries()) { | ||
| 554 | + if ( | ||
| 555 | + strEmpty(it.productName) || | ||
| 556 | + strEmpty(it.industry) || | ||
| 557 | + strEmpty(it.quality) || | ||
| 558 | + strEmpty(it.brand) || | ||
| 559 | + numEmpty(it.quantity) || | ||
| 560 | + strEmpty(it.deliveryDate) | ||
| 561 | + ) { | ||
| 553 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 562 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 554 | } | 563 | } |
| 555 | } | 564 | } |
| @@ -577,7 +586,7 @@ export default { | @@ -577,7 +586,7 @@ export default { | ||
| 577 | color: rgba(0, 0, 0, 0.6); | 586 | color: rgba(0, 0, 0, 0.6); |
| 578 | line-height: 32rpx; | 587 | line-height: 32rpx; |
| 579 | width: 240rpx; | 588 | width: 240rpx; |
| 580 | - padding: 24rpx 0; | 589 | + padding: 12rpx 0; |
| 581 | } | 590 | } |
| 582 | .total-item-price { | 591 | .total-item-price { |
| 583 | font-weight: 600; | 592 | font-weight: 600; |
| @@ -599,7 +608,7 @@ export default { | @@ -599,7 +608,7 @@ export default { | ||
| 599 | 608 | ||
| 600 | .scroll { | 609 | .scroll { |
| 601 | flex: 1; | 610 | flex: 1; |
| 602 | - padding: 12rpx 0 480rpx !important; | 611 | + padding: 12rpx 0 392rpx !important; |
| 603 | } | 612 | } |
| 604 | 613 | ||
| 605 | .footer { | 614 | .footer { |
| @@ -53,13 +53,13 @@ | @@ -53,13 +53,13 @@ | ||
| 53 | }}</text></view> | 53 | }}</text></view> |
| 54 | </view> | 54 | </view> |
| 55 | 55 | ||
| 56 | - <view class="section" v-if="status === 'STANDARD'"> | 56 | + <view class="section" v-if="detail.status === 'STANDARD'"> |
| 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ | 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 58 | detail.standardFileName || '-' }}</text></view> | 58 | detail.standardFileName || '-' }}</text></view> |
| 59 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ | 59 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ |
| 60 | detail.standardStandardized ? '是' : '否' }}</text></view> | 60 | detail.standardStandardized ? '是' : '否' }}</text></view> |
| 61 | </view> | 61 | </view> |
| 62 | - <view class="section" v-if="status === 'FORMAL'"> | 62 | + <view class="section" v-if="detail.status === 'FORMAL'"> |
| 63 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ | 63 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 64 | detail.formalFileName || '-' }}</text></view> | 64 | detail.formalFileName || '-' }}</text></view> |
| 65 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized | 65 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized |
| @@ -265,19 +265,19 @@ export default { | @@ -265,19 +265,19 @@ export default { | ||
| 265 | const e = this.detail.showExamine || false | 265 | const e = this.detail.showExamine || false |
| 266 | const f = this.detail.standardShowExamine || false | 266 | const f = this.detail.standardShowExamine || false |
| 267 | return [ | 267 | return [ |
| 268 | - { ...this.buttons[0], visible: (s === 'DRAFT') }, //编辑 | ||
| 269 | - { ...this.buttons[1], visible: (s === 'DRAFT') }, //删除 | ||
| 270 | - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) }, //锁价 | ||
| 271 | - { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') }, | ||
| 272 | - { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') }, | ||
| 273 | - { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') }, | ||
| 274 | - { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT') }, | ||
| 275 | - { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT') }, | ||
| 276 | - { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT') }, | ||
| 277 | - { ...this.buttons[9], visible: (s === 'FORMAL' && t) }, | ||
| 278 | - { ...this.buttons[10], visible: (s === 'STANDARD' && t) }, | ||
| 279 | - { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, | ||
| 280 | - { ...this.buttons[12], visible: (s === 'STANDARD') }, | 268 | + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:modify')) }, //编辑 |
| 269 | + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:delete')) }, //删除 | ||
| 270 | + { ...this.buttons[2], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:lock')) }, //锁价 | ||
| 271 | + { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload')) }, | ||
| 272 | + { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload')) }, | ||
| 273 | + { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-upload')) }, | ||
| 274 | + { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) }, | ||
| 275 | + { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) }, | ||
| 276 | + { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-approve')) }, | ||
| 277 | + { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:review')) }, | ||
| 278 | + { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:review')) }, | ||
| 279 | + { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-review')) }, | ||
| 280 | + { ...this.buttons[12], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload-seal')) }, | ||
| 281 | ] | 281 | ] |
| 282 | } | 282 | } |
| 283 | }, | 283 | }, |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | @input="onSearchInput" | 14 | @input="onSearchInput" |
| 15 | /> | 15 | /> |
| 16 | <view class="tool-icons"> | 16 | <view class="tool-icons"> |
| 17 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 17 | + <image v-if="$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| @@ -61,7 +61,9 @@ | @@ -61,7 +61,9 @@ | ||
| 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> | 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> |
| 62 | </view> | 62 | </view> |
| 63 | <view class="info-row" v-if="item.status === 'STANDARD' || item.status === 'FORMAL'"> | 63 | <view class="info-row" v-if="item.status === 'STANDARD' || item.status === 'FORMAL'"> |
| 64 | - <text>{{ item.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span> | 64 | + <text>{{ item.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text> |
| 65 | + <span v-if="item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName" class="info-status" :style="getStatusCss(item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName)">{{ item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName }}</span> | ||
| 66 | + <span v-else>-</span> | ||
| 65 | </view> | 67 | </view> |
| 66 | <view class="info-row"> | 68 | <view class="info-row"> |
| 67 | <text>订货日期</text><text>{{ item.orderDate }}</text> | 69 | <text>订货日期</text><text>{{ item.orderDate }}</text> |
| @@ -108,23 +108,23 @@ | @@ -108,23 +108,23 @@ | ||
| 108 | 数量 | 108 | 数量 |
| 109 | </div> | 109 | </div> |
| 110 | <div class="total-item-price"> | 110 | <div class="total-item-price"> |
| 111 | - {{ (sumQuantity || 0).toFixed(2) }}t | 111 | + {{ (totalQuantity || 0).toFixed(2) }}kg |
| 112 | </div> | 112 | </div> |
| 113 | </div> | 113 | </div> |
| 114 | - <div class="total-item"> | 114 | + <!-- <div class="total-item"> |
| 115 | <div class="total-item-text"> | 115 | <div class="total-item-text"> |
| 116 | 不含税金额 | 116 | 不含税金额 |
| 117 | </div> | 117 | </div> |
| 118 | <div class="total-item-price text-red"> | 118 | <div class="total-item-price text-red"> |
| 119 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 119 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 120 | </div> | 120 | </div> |
| 121 | - </div> | 121 | + </div> --> |
| 122 | <div class="total-item"> | 122 | <div class="total-item"> |
| 123 | <div class="total-item-text"> | 123 | <div class="total-item-text"> |
| 124 | 总金额 | 124 | 总金额 |
| 125 | </div> | 125 | </div> |
| 126 | <div class="total-item-price text-red"> | 126 | <div class="total-item-price text-red"> |
| 127 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 127 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 128 | </div> | 128 | </div> |
| 129 | </div> | 129 | </div> |
| 130 | </div> | 130 | </div> |
| @@ -147,15 +147,15 @@ export default { | @@ -147,15 +147,15 @@ export default { | ||
| 147 | } | 147 | } |
| 148 | }, | 148 | }, |
| 149 | computed: { | 149 | computed: { |
| 150 | - sumQuantity() { | 150 | + totalQuantity() { |
| 151 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) | 151 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) |
| 152 | return this.round(qty, 2) | 152 | return this.round(qty, 2) |
| 153 | }, | 153 | }, |
| 154 | - sumAmountExcl() { | ||
| 155 | - const sum = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.amountExcludingTax), 0) | ||
| 156 | - return this.round(sum, 2) | ||
| 157 | - }, | ||
| 158 | - sumTotal() { return this.totalAmount }, | 154 | + // totalAmountExcludingTax() { |
| 155 | + // const sum = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.amountExcludingTax), 0) | ||
| 156 | + // return this.round(sum, 2) | ||
| 157 | + // }, | ||
| 158 | + totalAmountIncludingTax() { return this.totalAmount }, | ||
| 159 | totalAmount() { | 159 | totalAmount() { |
| 160 | let sum = 0 | 160 | let sum = 0 |
| 161 | for (const it of this.items) { | 161 | for (const it of this.items) { |
| @@ -213,7 +213,7 @@ export default { | @@ -213,7 +213,7 @@ export default { | ||
| 213 | status: v.status || '', | 213 | status: v.status || '', |
| 214 | quantity: v.productQuantity || v.quantity || '', | 214 | quantity: v.productQuantity || v.quantity || '', |
| 215 | unitPrice: v.unitPrice || '', | 215 | unitPrice: v.unitPrice || '', |
| 216 | - amountExcludingTax: v.amountExcludingTax || 0, | 216 | + // amountExcludingTax: v.amountExcludingTax || 0, |
| 217 | totalAmount: v.totalAmount || 0, | 217 | totalAmount: v.totalAmount || 0, |
| 218 | deliveryDate: v.deliveryDate || '', | 218 | deliveryDate: v.deliveryDate || '', |
| 219 | specDisplay: '' | 219 | specDisplay: '' |
| @@ -255,8 +255,8 @@ export default { | @@ -255,8 +255,8 @@ export default { | ||
| 255 | const qty = this.toNumber(it.quantity) | 255 | const qty = this.toNumber(it.quantity) |
| 256 | const price = this.toNumber(it.unitPrice) | 256 | const price = this.toNumber(it.unitPrice) |
| 257 | const total = this.round(qty * price, 2) | 257 | const total = this.round(qty * price, 2) |
| 258 | - const excl = this.round(total / (1 + TAX_RATE), 2) | ||
| 259 | - it.amountExcludingTax = excl | 258 | + // const excl = this.round(total / (1 + TAX_RATE), 2) |
| 259 | + // it.amountExcludingTax = excl | ||
| 260 | it.totalAmount = total | 260 | it.totalAmount = total |
| 261 | this.$set(this.items, idx, it) | 261 | this.$set(this.items, idx, it) |
| 262 | }, | 262 | }, |
| @@ -292,7 +292,7 @@ export default { | @@ -292,7 +292,7 @@ export default { | ||
| 292 | ...it, | 292 | ...it, |
| 293 | quantity: '', | 293 | quantity: '', |
| 294 | unitPrice: '', | 294 | unitPrice: '', |
| 295 | - amountExcludingTax: 0 | 295 | + // amountExcludingTax: 0 |
| 296 | })) | 296 | })) |
| 297 | }, | 297 | }, |
| 298 | async onSubmit() { | 298 | async onSubmit() { |
| @@ -301,12 +301,12 @@ export default { | @@ -301,12 +301,12 @@ export default { | ||
| 301 | const qty = this.toNumber(it.quantity) | 301 | const qty = this.toNumber(it.quantity) |
| 302 | const price = this.toNumber(it.unitPrice) | 302 | const price = this.toNumber(it.unitPrice) |
| 303 | const total = this.toNumber(it.totalAmount) | 303 | const total = this.toNumber(it.totalAmount) |
| 304 | - const excl = this.toNumber(it.amountExcludingTax) | 304 | + // const excl = this.toNumber(it.amountExcludingTax) |
| 305 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty | 305 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty |
| 306 | else raw.quantity = qty | 306 | else raw.quantity = qty |
| 307 | raw.unitPrice = price | 307 | raw.unitPrice = price |
| 308 | raw.totalAmount = total | 308 | raw.totalAmount = total |
| 309 | - raw.amountExcludingTax = excl | 309 | + // raw.amountExcludingTax = excl |
| 310 | return raw | 310 | return raw |
| 311 | }) | 311 | }) |
| 312 | if (!selected.length) { | 312 | if (!selected.length) { |
| @@ -325,9 +325,9 @@ export default { | @@ -325,9 +325,9 @@ export default { | ||
| 325 | const payload = { | 325 | const payload = { |
| 326 | id: this.id, | 326 | id: this.id, |
| 327 | totalAmountCapital: formatCurrencyToChinese(this.sumTotal), | 327 | totalAmountCapital: formatCurrencyToChinese(this.sumTotal), |
| 328 | - totalAmountExcludingTax: this.sumAmountExcl, | ||
| 329 | - totalAmountIncludingTax: this.sumTotal, | ||
| 330 | - totalQuantity: this.sumQuantity, | 328 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, |
| 329 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 330 | + totalQuantity: this.totalQuantity, | ||
| 331 | type:'INTL_INVENTORY_AGMT', | 331 | type:'INTL_INVENTORY_AGMT', |
| 332 | contractDistributorLineList: selected | 332 | contractDistributorLineList: selected |
| 333 | } | 333 | } |
| @@ -362,7 +362,7 @@ export default { | @@ -362,7 +362,7 @@ export default { | ||
| 362 | 362 | ||
| 363 | .scroll { | 363 | .scroll { |
| 364 | flex: 1; | 364 | flex: 1; |
| 365 | - padding: 12rpx 0 480rpx !important; | 365 | + padding: 12rpx 0 392rpx !important; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | .header { | 368 | .header { |
| @@ -646,7 +646,7 @@ export default { | @@ -646,7 +646,7 @@ export default { | ||
| 646 | color: rgba(0, 0, 0, 0.6); | 646 | color: rgba(0, 0, 0, 0.6); |
| 647 | line-height: 32rpx; | 647 | line-height: 32rpx; |
| 648 | width: 240rpx; | 648 | width: 240rpx; |
| 649 | - padding: 24rpx 0; | 649 | + padding: 12rpx 0; |
| 650 | } | 650 | } |
| 651 | 651 | ||
| 652 | .total-item-price { | 652 | .total-item-price { |
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | </template> | 41 | </template> |
| 42 | </uni-list-item> | 42 | </uni-list-item> |
| 43 | 43 | ||
| 44 | - <ProductRel mode="add" :orderDateBase="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" /> | 44 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :list="productLineList" @change="onProductsChange" :options="productList" /> |
| 45 | 45 | ||
| 46 | <uni-list-item title="合计人民币金额(大写)"> | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | <template v-slot:footer> | 47 | <template v-slot:footer> |
| @@ -98,34 +98,25 @@ | @@ -98,34 +98,25 @@ | ||
| 98 | :inputBorder="false" /> | 98 | :inputBorder="false" /> |
| 99 | </template> | 99 | </template> |
| 100 | </uni-list-item> | 100 | </uni-list-item> |
| 101 | - | ||
| 102 | - <view class="group"> | ||
| 103 | - <view class="group-title">特别条款要求</view> | ||
| 104 | - <view class="radio-list"> | ||
| 105 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 106 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 107 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 108 | - <text class="label">{{ opt.label }}</text> | ||
| 109 | - </view> | ||
| 110 | - </view> | ||
| 111 | - </view> | ||
| 112 | - <view class="group"> | ||
| 113 | - <view class="group-title">执行标准</view> | ||
| 114 | - <view class="radio-list"> | ||
| 115 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 116 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 117 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 118 | - <text class="label">{{ opt.label }}</text> | ||
| 119 | - </view> | ||
| 120 | - </view> | ||
| 121 | - </view> | 101 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 102 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 107 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 108 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 109 | + <template v-slot:body> | ||
| 110 | + <view class="item-title"><text>执行标准</text></view> | ||
| 111 | + </template> | ||
| 112 | + </uni-list-item> | ||
| 122 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 113 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 124 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 115 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | :inputBorder="false" /> | 116 | :inputBorder="false" /> |
| 126 | </template> | 117 | </template> |
| 127 | </uni-list-item> | 118 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | 119 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 129 | <template v-slot:footer> | 120 | <template v-slot:footer> |
| 130 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 121 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | </template> | 122 | </template> |
| @@ -177,15 +168,15 @@ | @@ -177,15 +168,15 @@ | ||
| 177 | <div class="total-text">合计</div> | 168 | <div class="total-text">合计</div> |
| 178 | <div class="total-item"> | 169 | <div class="total-item"> |
| 179 | <div class="total-item-text">数量</div> | 170 | <div class="total-item-text">数量</div> |
| 180 | - <div class="total-item-price">{{ (sumQuantity || 0).toFixed(2) }}t</div> | 171 | + <div class="total-item-price">{{ (totalQuantity || 0).toFixed(2) }}kg</div> |
| 181 | </div> | 172 | </div> |
| 182 | - <div class="total-item"> | 173 | + <!-- <div class="total-item"> |
| 183 | <div class="total-item-text">不含税金额</div> | 174 | <div class="total-item-text">不含税金额</div> |
| 184 | - <div class="total-item-price text-red">¥{{ (sumAmountExcl || 0).toFixed(2) }}</div> | ||
| 185 | - </div> | 175 | + <div class="total-item-price text-red">¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}</div> |
| 176 | + </div> --> | ||
| 186 | <div class="total-item"> | 177 | <div class="total-item"> |
| 187 | <div class="total-item-text">总金额</div> | 178 | <div class="total-item-text">总金额</div> |
| 188 | - <div class="total-item-price text-red">¥{{ (sumTotal || 0).toFixed(2) }}</div> | 179 | + <div class="total-item-price text-red">¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}</div> |
| 189 | </div> | 180 | </div> |
| 190 | </div> | 181 | </div> |
| 191 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> | 182 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| @@ -223,6 +214,7 @@ export default { | @@ -223,6 +214,7 @@ export default { | ||
| 223 | workshopId: '', | 214 | workshopId: '', |
| 224 | workshopName: '', | 215 | workshopName: '', |
| 225 | orderDate: '', | 216 | orderDate: '', |
| 217 | + deliveryDate: '', | ||
| 226 | designatedConsignee: '', | 218 | designatedConsignee: '', |
| 227 | specialTerms: '', | 219 | specialTerms: '', |
| 228 | specialTermsName: '', | 220 | specialTermsName: '', |
| @@ -233,7 +225,7 @@ export default { | @@ -233,7 +225,7 @@ export default { | ||
| 233 | includesPackagingFeeName: '', | 225 | includesPackagingFeeName: '', |
| 234 | includesTransportFee: false, | 226 | includesTransportFee: false, |
| 235 | includesTransportFeeName: '', | 227 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | 228 | + unit: '美元、公斤、美元/公斤', |
| 237 | totalAmountCapital: '', | 229 | totalAmountCapital: '', |
| 238 | depositInfo: '', | 230 | depositInfo: '', |
| 239 | packagingRequirements: '', | 231 | packagingRequirements: '', |
| @@ -256,9 +248,9 @@ export default { | @@ -256,9 +248,9 @@ export default { | ||
| 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 248 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 249 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 250 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 259 | - sumQuantity: 0, | ||
| 260 | - sumAmountExcl: 0, | ||
| 261 | - sumTotal: 0, | 251 | + totalQuantity: 0, |
| 252 | + // totalAmountExcludingTax: 0, | ||
| 253 | + totalAmountIncludingTax: 0, | ||
| 262 | productLineList: [], | 254 | productLineList: [], |
| 263 | newProductLineList: [], | 255 | newProductLineList: [], |
| 264 | productList: [] | 256 | productList: [] |
| @@ -347,11 +339,11 @@ export default { | @@ -347,11 +339,11 @@ export default { | ||
| 347 | const list = Array.isArray(products) ? products : [] | 339 | const list = Array.isArray(products) ? products : [] |
| 348 | this.newProductLineList = list | 340 | this.newProductLineList = list |
| 349 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 341 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 350 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 342 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 351 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 343 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 352 | - this.sumQuantity = sumQ | ||
| 353 | - this.sumAmountExcl = sumE | ||
| 354 | - this.sumTotal = sumT | 344 | + this.totalQuantity = sumQ |
| 345 | + // this.totalAmountExcludingTax = sumE | ||
| 346 | + this.totalAmountIncludingTax = sumT | ||
| 355 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 347 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | }, | 348 | }, |
| 357 | async loadSuppliers() { | 349 | async loadSuppliers() { |
| @@ -399,6 +391,10 @@ export default { | @@ -399,6 +391,10 @@ export default { | ||
| 399 | setSheet('生产厂', opts) | 391 | setSheet('生产厂', opts) |
| 400 | } else if (field === 'supplier') { | 392 | } else if (field === 'supplier') { |
| 401 | setSheet('供方', this.supplierList) | 393 | setSheet('供方', this.supplierList) |
| 394 | + } else if (field === 'specialTerms') { | ||
| 395 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 396 | + } else if (field === 'executionStandard') { | ||
| 397 | + setSheet('执行标准', this.executionStandardList) | ||
| 402 | } else if (field === 'includesPackagingFee') { | 398 | } else if (field === 'includesPackagingFee') { |
| 403 | setSheet('单价中是否已包含包装费', this.yesNoList) | 399 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | } else if (field === 'includesTransportFee') { | 400 | } else if (field === 'includesTransportFee') { |
| @@ -443,18 +439,30 @@ export default { | @@ -443,18 +439,30 @@ export default { | ||
| 443 | { key: 'supplier', label: '供方' }, | 439 | { key: 'supplier', label: '供方' }, |
| 444 | { key: 'buyer', label: '需方' }, | 440 | { key: 'buyer', label: '需方' }, |
| 445 | { key: 'orderDate', label: '订货日期' }, | 441 | { key: 'orderDate', label: '订货日期' }, |
| 442 | + { key: 'unit', label: '单位' }, | ||
| 446 | { key: 'workshopId', label: '生产厂' }, | 443 | { key: 'workshopId', label: '生产厂' }, |
| 444 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 447 | ] | 445 | ] |
| 448 | for (const it of checks) { | 446 | for (const it of checks) { |
| 449 | const val = this.form[it.key] | 447 | const val = this.form[it.key] |
| 450 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 448 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 449 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 452 | } | 450 | } |
| 453 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 451 | + const list = Array.isArray(this.newProductLineList) ? this.newProductLineList : [] |
| 452 | + if (list.length === 0) { | ||
| 454 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 453 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 455 | } | 454 | } |
| 456 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 457 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 455 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 456 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 457 | + for (const [idx, it] of list.entries()) { | ||
| 458 | + if ( | ||
| 459 | + strEmpty(it.productName) || | ||
| 460 | + strEmpty(it.industry) || | ||
| 461 | + strEmpty(it.quality) || | ||
| 462 | + strEmpty(it.brand) || | ||
| 463 | + numEmpty(it.quantity) || | ||
| 464 | + strEmpty(it.deliveryDate) | ||
| 465 | + ) { | ||
| 458 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 466 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | } | 467 | } |
| 460 | } | 468 | } |
| @@ -486,9 +494,9 @@ export default { | @@ -486,9 +494,9 @@ export default { | ||
| 486 | id: this.form.id, | 494 | id: this.form.id, |
| 487 | destination, | 495 | destination, |
| 488 | type: 'INTL_INVENTORY_AGMT', | 496 | type: 'INTL_INVENTORY_AGMT', |
| 489 | - sumQuantity: this.sumQuantity, | ||
| 490 | - sumAmountExcl: this.sumAmountExcl, | ||
| 491 | - sumTotal: this.sumTotal, | 497 | + totalQuantity: this.totalQuantity, |
| 498 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 499 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 492 | contractDistributorLineList: lines | 500 | contractDistributorLineList: lines |
| 493 | }) | 501 | }) |
| 494 | try { | 502 | try { |
| @@ -524,7 +532,7 @@ export default { | @@ -524,7 +532,7 @@ export default { | ||
| 524 | color: rgba(0, 0, 0, 0.6); | 532 | color: rgba(0, 0, 0, 0.6); |
| 525 | line-height: 32rpx; | 533 | line-height: 32rpx; |
| 526 | width: 240rpx; | 534 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | 535 | + padding: 12rpx 0; |
| 528 | } | 536 | } |
| 529 | 537 | ||
| 530 | .total-item-price { | 538 | .total-item-price { |
| @@ -547,7 +555,7 @@ export default { | @@ -547,7 +555,7 @@ export default { | ||
| 547 | 555 | ||
| 548 | .scroll { | 556 | .scroll { |
| 549 | flex: 1; | 557 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | 558 | + padding: 12rpx 0 392rpx !important; |
| 551 | } | 559 | } |
| 552 | 560 | ||
| 553 | .footer { | 561 | .footer { |
| @@ -53,53 +53,53 @@ | @@ -53,53 +53,53 @@ | ||
| 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | </template> | 54 | </template> |
| 55 | </uni-list-item> | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | 56 | + <uni-list-item title="厚度(mm)"> |
| 57 | <template v-slot:footer> | 57 | <template v-slot:footer> |
| 58 | - <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> | 58 | + <uni-easyinput type="digit" v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" @input="onNonNegativeInput(idx, 'thickness')" @blur="onNonNegativeBlur(idx, 'thickness', 2)" /> |
| 59 | </template> | 59 | </template> |
| 60 | </uni-list-item> | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | 61 | + <uni-list-item title="厚度公差上限(mm)"> |
| 62 | <template v-slot:footer> | 62 | <template v-slot:footer> |
| 63 | - <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" | ||
| 64 | - placeholder="请输入厚度公差(单项+)" /> | 63 | + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false" |
| 64 | + placeholder="请输入厚度公差上限" @input="onNonNegativeInput(idx, 'thicknessTolPos')" @blur="onNonNegativeBlur(idx, 'thicknessTolPos', 2)" /> | ||
| 65 | </template> | 65 | </template> |
| 66 | </uni-list-item> | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | 67 | + <uni-list-item title="厚度公差下限(mm)"> |
| 68 | <template v-slot:footer> | 68 | <template v-slot:footer> |
| 69 | - <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" | ||
| 70 | - placeholder="请输入厚度公差(单项-)" /> | 69 | + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false" |
| 70 | + placeholder="请输入厚度公差下限" @input="onNonNegativeInput(idx, 'thicknessTolNeg')" @blur="onNonNegativeBlur(idx, 'thicknessTolNeg', 2)" /> | ||
| 71 | </template> | 71 | </template> |
| 72 | </uni-list-item> | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | 73 | + <uni-list-item title="宽度(mm)"> |
| 74 | <template v-slot:footer> | 74 | <template v-slot:footer> |
| 75 | - <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> | 75 | + <uni-easyinput type="digit" v-model="item.width" :inputBorder="false" placeholder="请输入宽度" @input="onNonNegativeInput(idx, 'width')" @blur="onNonNegativeBlur(idx, 'width', 2)" /> |
| 76 | </template> | 76 | </template> |
| 77 | </uni-list-item> | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | 78 | + <uni-list-item title="宽度公差上限(mm)"> |
| 79 | <template v-slot:footer> | 79 | <template v-slot:footer> |
| 80 | - <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> | 80 | + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" @input="onNonNegativeInput(idx, 'widthTolPos')" @blur="onNonNegativeBlur(idx, 'widthTolPos', 2)" /> |
| 81 | </template> | 81 | </template> |
| 82 | </uni-list-item> | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | 83 | + <uni-list-item title="宽度公差下限(mm)"> |
| 84 | <template v-slot:footer> | 84 | <template v-slot:footer> |
| 85 | - <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> | 85 | + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNonNegativeInput(idx, 'widthTolNeg')" @blur="onNonNegativeBlur(idx, 'widthTolNeg', 2)" /> |
| 86 | </template> | 86 | </template> |
| 87 | </uni-list-item> | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | 88 | + <uni-list-item title="长度(mm)"> |
| 89 | <template v-slot:footer> | 89 | <template v-slot:footer> |
| 90 | - <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> | 90 | + <uni-easyinput type="digit" v-model="item.length" :inputBorder="false" placeholder="请输入长度" @input="onNonNegativeInput(idx, 'length')" @blur="onNonNegativeBlur(idx, 'length', 2)" /> |
| 91 | </template> | 91 | </template> |
| 92 | </uni-list-item> | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | 93 | + <uni-list-item title="长度公差上限(mm)"> |
| 94 | <template v-slot:footer> | 94 | <template v-slot:footer> |
| 95 | - <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" | ||
| 96 | - placeholder="请输入长度公差(单项+)" /> | 95 | + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false" |
| 96 | + placeholder="请输入长度公差上限" @input="onNonNegativeInput(idx, 'lengthTolPos')" @blur="onNonNegativeBlur(idx, 'lengthTolPos', 2)" /> | ||
| 97 | </template> | 97 | </template> |
| 98 | </uni-list-item> | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | 99 | + <uni-list-item title="长度公差下限(mm)"> |
| 100 | <template v-slot:footer> | 100 | <template v-slot:footer> |
| 101 | - <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" | ||
| 102 | - placeholder="请输入长度公差(单项-)" /> | 101 | + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false" |
| 102 | + placeholder="请输入长度公差下限" @input="onNonNegativeInput(idx, 'lengthTolNeg')" @blur="onNonNegativeBlur(idx, 'lengthTolNeg', 2)" /> | ||
| 103 | </template> | 103 | </template> |
| 104 | </uni-list-item> | 104 | </uni-list-item> |
| 105 | <uni-list-item title="状态"> | 105 | <uni-list-item title="状态"> |
| @@ -109,7 +109,7 @@ | @@ -109,7 +109,7 @@ | ||
| 109 | </uni-list-item> | 109 | </uni-list-item> |
| 110 | <uni-list-item title="数量"> | 110 | <uni-list-item title="数量"> |
| 111 | <template v-slot:footer> | 111 | <template v-slot:footer> |
| 112 | - <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" placeholder="请输入数量" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'quantity', 0)" /> | 112 | + <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 2)" /> |
| 113 | </template> | 113 | </template> |
| 114 | </uni-list-item> | 114 | </uni-list-item> |
| 115 | <uni-list-item title="单价"> | 115 | <uni-list-item title="单价"> |
| @@ -122,11 +122,11 @@ | @@ -122,11 +122,11 @@ | ||
| 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> | 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> |
| 123 | </template> | 123 | </template> |
| 124 | </uni-list-item> | 124 | </uni-list-item> |
| 125 | - <uni-list-item title="不含税金额"> | 125 | + <!-- <uni-list-item title="不含税金额"> |
| 126 | <template v-slot:footer> | 126 | <template v-slot:footer> |
| 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 128 | </template> | 128 | </template> |
| 129 | - </uni-list-item> | 129 | + </uni-list-item> --> |
| 130 | <uni-list-item title="总金额"> | 130 | <uni-list-item title="总金额"> |
| 131 | <template v-slot:footer> | 131 | <template v-slot:footer> |
| 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| @@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
| 134 | </uni-list-item> | 134 | </uni-list-item> |
| 135 | <uni-list-item title="发货日期"> | 135 | <uni-list-item title="发货日期"> |
| 136 | <template v-slot:footer> | 136 | <template v-slot:footer> |
| 137 | - <uni-datetime-picker type="date" v-model="item.orderDate" @change="onDateChange(idx, $event)" /> | 137 | + <uni-datetime-picker :start="minDeliveryDate" type="date" v-model="item.deliveryDate" @change="onDateChange(idx, $event)" /> |
| 138 | </template> | 138 | </template> |
| 139 | </uni-list-item> | 139 | </uni-list-item> |
| 140 | </uni-list> | 140 | </uni-list> |
| @@ -156,18 +156,41 @@ | @@ -156,18 +156,41 @@ | ||
| 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 158 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> | 158 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> |
| 159 | - <view class="row"><text class="label">规格</text><text class="value">{{ item.specDisplay }}</text></view> | 159 | + <!-- 厚(公差) * 宽(公差) * 长(公差) --> |
| 160 | + <view class="row row-spec"><text class="label">规格(mm)</text> | ||
| 161 | + <view class="value value-spec"> | ||
| 162 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 163 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 164 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }} | ||
| 165 | + </view> | ||
| 166 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }} | ||
| 167 | + </view> | ||
| 168 | + </view> | ||
| 169 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 170 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 171 | + <view v-if="item.width" class="value-spec_box"> | ||
| 172 | + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view> | ||
| 173 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view> | ||
| 174 | + </view> | ||
| 175 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 176 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 177 | + <view v-if="item.length" class="value-spec_box"> | ||
| 178 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view> | ||
| 179 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view> | ||
| 180 | + </view> | ||
| 181 | + </view> | ||
| 182 | + </view> | ||
| 160 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 161 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 162 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 163 | }}</text> | 186 | }}</text> |
| 164 | </view> | 187 | </view> |
| 165 | - <view class="row"><text class="label">不含税金额</text><text class="value">{{ | 188 | + <!-- <view class="row"><text class="label">不含税金额</text><text class="value">{{ |
| 166 | formatCurrency(item.amountExcludingTax) | 189 | formatCurrency(item.amountExcludingTax) |
| 167 | - }}</text></view> | 190 | + }}</text></view> --> |
| 168 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 169 | }}</text></view> | 192 | }}</text></view> |
| 170 | - <view class="row"><text class="label">发货日期</text><text class="value">{{ item.orderDate }}</text></view> | 193 | + <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text></view> |
| 171 | </view> | 194 | </view> |
| 172 | </view> | 195 | </view> |
| 173 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> | 196 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> |
| @@ -181,7 +204,8 @@ export default { | @@ -181,7 +204,8 @@ export default { | ||
| 181 | mode: { type: String, default: 'add' }, | 204 | mode: { type: String, default: 'add' }, |
| 182 | list: { type: Array, default: () => [] }, | 205 | list: { type: Array, default: () => [] }, |
| 183 | max: { type: Number, default: 8 }, | 206 | max: { type: Number, default: 8 }, |
| 184 | - orderDateBase: { type: String, default: '' }, | 207 | + deliveryDateBase: { type: String, default: '' }, |
| 208 | + deliveryDate: { type: String, default: '' }, | ||
| 185 | options: { type: Array, default: () => [] } | 209 | options: { type: Array, default: () => [] } |
| 186 | }, | 210 | }, |
| 187 | components: { SingleSelectSheet }, | 211 | components: { SingleSelectSheet }, |
| @@ -192,15 +216,6 @@ export default { | @@ -192,15 +216,6 @@ export default { | ||
| 192 | sheet: { visible: false, title: '请选择产品', options: [], value: '', idx: -1 } | 216 | sheet: { visible: false, title: '请选择产品', options: [], value: '', idx: -1 } |
| 193 | } | 217 | } |
| 194 | }, | 218 | }, |
| 195 | - computed: { | ||
| 196 | - selectOptions() { | ||
| 197 | - const list = Array.isArray(this.options) ? this.options : [] | ||
| 198 | - return list.map(o => ({ | ||
| 199 | - label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), | ||
| 200 | - value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) | ||
| 201 | - })) | ||
| 202 | - } | ||
| 203 | - }, | ||
| 204 | watch: { | 219 | watch: { |
| 205 | items: { | 220 | items: { |
| 206 | handler() { this.emitChange() }, | 221 | handler() { this.emitChange() }, |
| @@ -221,9 +236,44 @@ export default { | @@ -221,9 +236,44 @@ export default { | ||
| 221 | this.items = init | 236 | this.items = init |
| 222 | this.recalculateAll() | 237 | this.recalculateAll() |
| 223 | }, | 238 | }, |
| 239 | + computed: { | ||
| 240 | + selectOptions() { | ||
| 241 | + const list = Array.isArray(this.options) ? this.options : [] | ||
| 242 | + return list.map(o => ({ | ||
| 243 | + label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), | ||
| 244 | + value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) | ||
| 245 | + })) | ||
| 246 | + }, | ||
| 247 | + minDeliveryDate() { | ||
| 248 | + const s = this.deliveryDate | ||
| 249 | + if (!s) return '' | ||
| 250 | + const parts = String(s).split('-') | ||
| 251 | + const y = Number(parts[0]) | ||
| 252 | + const m = Number(parts[1]) | ||
| 253 | + const d = Number(parts[2]) | ||
| 254 | + if (!y || !m || !d) return '' | ||
| 255 | + const dt = new Date(y, m - 1, d) | ||
| 256 | + dt.setDate(dt.getDate() + 1) | ||
| 257 | + const yy = dt.getFullYear() | ||
| 258 | + const mm = String(dt.getMonth() + 1).padStart(2, '0') | ||
| 259 | + const dd = String(dt.getDate() - 1).padStart(2, '0') | ||
| 260 | + return `${yy}/${mm}/${dd}` | ||
| 261 | + } | ||
| 262 | + }, | ||
| 224 | methods: { | 263 | methods: { |
| 225 | defaultItem() { | 264 | defaultItem() { |
| 226 | - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, amountExcludingTax: 0, totalAmount: 0, orderDate: '' } | 265 | + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', processingFee: undefined, totalAmount: 0, deliveryDate: '' } |
| 266 | + }, | ||
| 267 | + onNonNegativeInput(idx, field) { | ||
| 268 | + const it = this.items[idx] | ||
| 269 | + if (!it) return | ||
| 270 | + let v = String(it[field] != null ? it[field] : '') | ||
| 271 | + v = v.replace(/[^0-9.]/g, '') | ||
| 272 | + v = v.replace(/(\..*)\./g, '$1') | ||
| 273 | + if (v.startsWith('.')) v = '0' + v | ||
| 274 | + it[field] = v | ||
| 275 | + this.$set(this.items, idx, it) | ||
| 276 | + if (field === 'quantity' || field === 'unitPrice') this.$nextTick(() => this.recalculate(idx)) | ||
| 227 | }, | 277 | }, |
| 228 | onImmediateChange(idx) { | 278 | onImmediateChange(idx) { |
| 229 | this.$nextTick(() => this.recalculate(idx)) | 279 | this.$nextTick(() => this.recalculate(idx)) |
| @@ -239,21 +289,21 @@ export default { | @@ -239,21 +289,21 @@ export default { | ||
| 239 | const m = Math.pow(10, digits) | 289 | const m = Math.pow(10, digits) |
| 240 | return Math.round(n * m) / m | 290 | return Math.round(n * m) / m |
| 241 | }, | 291 | }, |
| 242 | - onNumberBlur(idx, field, digits) { | 292 | + onNonNegativeBlur(idx, field, digits) { |
| 243 | const it = this.items[idx] | 293 | const it = this.items[idx] |
| 244 | if (!it) return | 294 | if (!it) return |
| 245 | const raw = it[field] | 295 | const raw = it[field] |
| 246 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | ||
| 247 | if (raw === '' || raw === null || raw === undefined) { | 296 | if (raw === '' || raw === null || raw === undefined) { |
| 248 | this.$set(this.items, idx, it) | 297 | this.$set(this.items, idx, it) |
| 249 | - this.recalculate(idx) | 298 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 250 | return | 299 | return |
| 251 | } | 300 | } |
| 252 | - const num = this.toNumber(raw) | 301 | + let num = this.toNumber(raw) |
| 302 | + if (isNaN(num) || num < 0) num = 0 | ||
| 253 | const rounded = this.round(num, digits) | 303 | const rounded = this.round(num, digits) |
| 254 | it[field] = rounded | 304 | it[field] = rounded |
| 255 | this.$set(this.items, idx, it) | 305 | this.$set(this.items, idx, it) |
| 256 | - this.recalculate(idx) | 306 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 257 | }, | 307 | }, |
| 258 | formatCurrency(val) { | 308 | formatCurrency(val) { |
| 259 | if (val == null || val === '') return '' | 309 | if (val == null || val === '') return '' |
| @@ -269,9 +319,9 @@ export default { | @@ -269,9 +319,9 @@ export default { | ||
| 269 | return [t, w, l].filter(Boolean).join(' × ') | 319 | return [t, w, l].filter(Boolean).join(' × ') |
| 270 | }, | 320 | }, |
| 271 | openProductSheet(idx) { | 321 | openProductSheet(idx) { |
| 272 | - const opts = this.selectOptions | 322 | + const opts = Array.isArray(this.selectOptions) ? this.selectOptions : [] |
| 273 | const current = this.items[idx] && this.items[idx].productId | 323 | const current = this.items[idx] && this.items[idx].productId |
| 274 | - const match = opts.find(o => o.value === current) | 324 | + const match = (opts || []).find(o => String(o.value) === String(current)) |
| 275 | this.sheet = { ...this.sheet, visible: true, title: '请选择产品', options: opts, idx, value: match ? match.value : '' } | 325 | this.sheet = { ...this.sheet, visible: true, title: '请选择产品', options: opts, idx, value: match ? match.value : '' } |
| 276 | }, | 326 | }, |
| 277 | onProductConfirm({ value, label }) { | 327 | onProductConfirm({ value, label }) { |
| @@ -285,14 +335,14 @@ export default { | @@ -285,14 +335,14 @@ export default { | ||
| 285 | this.emitChange() | 335 | this.emitChange() |
| 286 | }, | 336 | }, |
| 287 | recalculate(idx) { | 337 | recalculate(idx) { |
| 288 | - const TAX_RATE = 0.13 | 338 | + // const TAX_RATE = 0.13 |
| 289 | const it = this.items[idx] | 339 | const it = this.items[idx] |
| 290 | if (!it) return | 340 | if (!it) return |
| 291 | const qty = this.toNumber(it.quantity) | 341 | const qty = this.toNumber(it.quantity) |
| 292 | const price = this.toNumber(it.unitPrice) | 342 | const price = this.toNumber(it.unitPrice) |
| 293 | const total = this.round(qty * price, 2) | 343 | const total = this.round(qty * price, 2) |
| 294 | - const excl = this.round(total / (1 + TAX_RATE), 2) | ||
| 295 | - const next = { ...it, totalAmount: total, amountExcludingTax: excl } | 344 | + // const excl = this.round(total / (1 + TAX_RATE), 2) |
| 345 | + const next = { ...it, totalAmount: total } | ||
| 296 | this.$set(this.items, idx, next) | 346 | this.$set(this.items, idx, next) |
| 297 | }, | 347 | }, |
| 298 | recalculateAll() { | 348 | recalculateAll() { |
| @@ -324,15 +374,15 @@ export default { | @@ -324,15 +374,15 @@ export default { | ||
| 324 | onDateChange(idx, e) { | 374 | onDateChange(idx, e) { |
| 325 | const it = this.items[idx] | 375 | const it = this.items[idx] |
| 326 | if (!it) return | 376 | if (!it) return |
| 327 | - const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.orderDate | 377 | + const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.deliveryDate |
| 328 | const dateStr = String(val).slice(0, 10) | 378 | const dateStr = String(val).slice(0, 10) |
| 329 | - const base = this.orderDateBase ? new Date(this.orderDateBase) : null | 379 | + const base = this.deliveryDateBase ? new Date(this.deliveryDateBase) : null |
| 330 | const d = new Date(dateStr) | 380 | const d = new Date(dateStr) |
| 331 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { | 381 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 332 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) | 382 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 333 | - it.orderDate = this.orderDateBase | 383 | + it.deliveryDate = this.deliveryDateBase |
| 334 | } else { | 384 | } else { |
| 335 | - it.orderDate = dateStr | 385 | + it.deliveryDate = dateStr |
| 336 | } | 386 | } |
| 337 | this.$set(this.items, idx, it) | 387 | this.$set(this.items, idx, it) |
| 338 | }, | 388 | }, |
| @@ -505,8 +555,46 @@ export default { | @@ -505,8 +555,46 @@ export default { | ||
| 505 | 555 | ||
| 506 | .value { | 556 | .value { |
| 507 | flex: 1; | 557 | flex: 1; |
| 508 | - text-align: right; | 558 | + // text-align: right; |
| 509 | color: rgba(0, 0, 0, 0.9); | 559 | color: rgba(0, 0, 0, 0.9); |
| 510 | font-size: 28rpx; | 560 | font-size: 28rpx; |
| 511 | } | 561 | } |
| 562 | + .value-spec { | ||
| 563 | + height: 48rpx; | ||
| 564 | + display: flex; | ||
| 565 | + align-items: center; | ||
| 566 | + color: #000000; | ||
| 567 | + // justify-content: end; | ||
| 568 | + &_box { | ||
| 569 | + position: relative; | ||
| 570 | + width: 60rpx; | ||
| 571 | + height: 48rpx; | ||
| 572 | + | ||
| 573 | + &_1 { | ||
| 574 | + font-size: 16rpx; | ||
| 575 | + position: absolute; | ||
| 576 | + top: -10rpx; | ||
| 577 | + left: 0; | ||
| 578 | + } | ||
| 579 | + | ||
| 580 | + &_2 { | ||
| 581 | + font-size: 16rpx; | ||
| 582 | + position: absolute; | ||
| 583 | + bottom: -10rpx; | ||
| 584 | + left: 0; | ||
| 585 | + } | ||
| 586 | + } | ||
| 587 | + | ||
| 588 | + &_val { | ||
| 589 | + font-size: 28rpx; | ||
| 590 | + | ||
| 591 | + &.p12 { | ||
| 592 | + padding-right: 12rpx; | ||
| 593 | + } | ||
| 594 | + } | ||
| 595 | + } | ||
| 596 | + .row-spec { | ||
| 597 | + height: 60rpx; | ||
| 598 | + align-items: center; | ||
| 599 | + } | ||
| 512 | </style> | 600 | </style> |
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | </template> | 40 | </template> |
| 41 | </uni-list-item> | 41 | </uni-list-item> |
| 42 | - <ProductRel mode="add" :orderDateBase="form.orderDate" @change="onProductsChange" :options="productList" /> | 42 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" @change="onProductsChange" :options="productList" /> |
| 43 | <uni-list-item title="合计人民币金额(大写)"> | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | <template v-slot:footer> | 44 | <template v-slot:footer> |
| 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| @@ -92,33 +92,25 @@ | @@ -92,33 +92,25 @@ | ||
| 92 | :inputBorder="false" /> | 92 | :inputBorder="false" /> |
| 93 | </template> | 93 | </template> |
| 94 | </uni-list-item> | 94 | </uni-list-item> |
| 95 | - <view class="group"> | ||
| 96 | - <view class="group-title">特别条款要求</view> | ||
| 97 | - <view class="radio-list"> | ||
| 98 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 99 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 100 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 101 | - <text class="label">{{ opt.label }}</text> | ||
| 102 | - </view> | ||
| 103 | - </view> | ||
| 104 | - </view> | ||
| 105 | - <view class="group"> | ||
| 106 | - <view class="group-title">执行标准</view> | ||
| 107 | - <view class="radio-list"> | ||
| 108 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 109 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 110 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 111 | - <text class="label">{{ opt.label }}</text> | ||
| 112 | - </view> | ||
| 113 | - </view> | ||
| 114 | - </view> | 95 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 96 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 97 | + <template v-slot:body> | ||
| 98 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 99 | + </template> | ||
| 100 | + </uni-list-item> | ||
| 101 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 102 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text>执行标准</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 115 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | <template v-slot:footer> | 108 | <template v-slot:footer> |
| 117 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | :inputBorder="false" /> | 110 | :inputBorder="false" /> |
| 119 | </template> | 111 | </template> |
| 120 | </uni-list-item> | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 122 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 123 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | </template> | 116 | </template> |
| @@ -180,24 +172,24 @@ | @@ -180,24 +172,24 @@ | ||
| 180 | <div class="total-item-text"> | 172 | <div class="total-item-text"> |
| 181 | 数量 | 173 | 数量 |
| 182 | </div> | 174 | </div> |
| 183 | - <div class="total-item-price"> | ||
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | 175 | + <div class="total-item-price"> |
| 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg | ||
| 185 | </div> | 177 | </div> |
| 186 | </div> | 178 | </div> |
| 187 | - <div class="total-item"> | 179 | + <!-- <div class="total-item"> |
| 188 | <div class="total-item-text"> | 180 | <div class="total-item-text"> |
| 189 | 不含税金额 | 181 | 不含税金额 |
| 190 | </div> | 182 | </div> |
| 191 | <div class="total-item-price text-red"> | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 193 | </div> | 185 | </div> |
| 194 | - </div> | 186 | + </div> --> |
| 195 | <div class="total-item"> | 187 | <div class="total-item"> |
| 196 | <div class="total-item-text"> | 188 | <div class="total-item-text"> |
| 197 | 总金额 | 189 | 总金额 |
| 198 | </div> | 190 | </div> |
| 199 | <div class="total-item-price text-red"> | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 201 | </div> | 193 | </div> |
| 202 | </div> | 194 | </div> |
| 203 | </div> | 195 | </div> |
| @@ -233,6 +225,7 @@ export default { | @@ -233,6 +225,7 @@ export default { | ||
| 233 | buyer: '', | 225 | buyer: '', |
| 234 | buyerName: '', | 226 | buyerName: '', |
| 235 | orderDate: '', | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | ||
| 236 | designatedConsignee: '', | 229 | designatedConsignee: '', |
| 237 | specialTerms: '', | 230 | specialTerms: '', |
| 238 | specialTermsName: '', | 231 | specialTermsName: '', |
| @@ -243,7 +236,7 @@ export default { | @@ -243,7 +236,7 @@ export default { | ||
| 243 | includesPackagingFeeName: '', | 236 | includesPackagingFeeName: '', |
| 244 | includesTransportFee: false, | 237 | includesTransportFee: false, |
| 245 | includesTransportFeeName: '', | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | 239 | + unit: '美元、公斤、美元/公斤', |
| 247 | totalAmountCapital: '', | 240 | totalAmountCapital: '', |
| 248 | destinationId: [], | 241 | destinationId: [], |
| 249 | destinationLabel: '', | 242 | destinationLabel: '', |
| @@ -263,9 +256,9 @@ export default { | @@ -263,9 +256,9 @@ export default { | ||
| 263 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 266 | - sumQuantity: 0, | ||
| 267 | - sumAmountExcl: 0, | ||
| 268 | - sumTotal: 0, | 259 | + totalQuantity: 0, |
| 260 | + // totalAmountExcludingTax: 0, | ||
| 261 | + totalAmountIncludingTax: 0, | ||
| 269 | productLineList: [], | 262 | productLineList: [], |
| 270 | productList: [], | 263 | productList: [], |
| 271 | customerRemarks: [], | 264 | customerRemarks: [], |
| @@ -366,11 +359,11 @@ export default { | @@ -366,11 +359,11 @@ export default { | ||
| 366 | onProductsChange(products) { | 359 | onProductsChange(products) { |
| 367 | const list = Array.isArray(products) ? products : [] | 360 | const list = Array.isArray(products) ? products : [] |
| 368 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 361 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 369 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 362 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 370 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 363 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 371 | - this.sumQuantity = sumQ | ||
| 372 | - this.sumAmountExcl = sumE | ||
| 373 | - this.sumTotal = sumT | 364 | + this.totalQuantity = sumQ |
| 365 | + // this.totalAmountExcludingTax = sumE | ||
| 366 | + this.totalAmountIncludingTax = sumT | ||
| 374 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 367 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 375 | this.productLineList = list | 368 | this.productLineList = list |
| 376 | }, | 369 | }, |
| @@ -446,6 +439,10 @@ export default { | @@ -446,6 +439,10 @@ export default { | ||
| 446 | setSheet('生产厂', opts) | 439 | setSheet('生产厂', opts) |
| 447 | } else if (field === 'supplier') { | 440 | } else if (field === 'supplier') { |
| 448 | setSheet('供方', this.supplierList) | 441 | setSheet('供方', this.supplierList) |
| 442 | + } else if (field === 'specialTerms') { | ||
| 443 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 444 | + } else if (field === 'executionStandard') { | ||
| 445 | + setSheet('执行标准', this.executionStandardList) | ||
| 449 | } else if (field === 'includesPackagingFee') { | 446 | } else if (field === 'includesPackagingFee') { |
| 450 | setSheet('单价中是否已包含包装费', this.yesNoList) | 447 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 451 | } else if (field === 'includesTransportFee') { | 448 | } else if (field === 'includesTransportFee') { |
| @@ -516,9 +513,9 @@ export default { | @@ -516,9 +513,9 @@ export default { | ||
| 516 | ...formForSubmit, | 513 | ...formForSubmit, |
| 517 | destination, | 514 | destination, |
| 518 | type: 'INTL_OPEN_SPEC_AGMT', | 515 | type: 'INTL_OPEN_SPEC_AGMT', |
| 519 | - sumQuantity: this.sumQuantity, | ||
| 520 | - sumAmountExcl: this.sumAmountExcl, | ||
| 521 | - sumTotal: this.sumTotal, | 516 | + totalQuantity: this.totalQuantity, |
| 517 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 518 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 522 | contractDistributorLineList: lines | 519 | contractDistributorLineList: lines |
| 523 | }) | 520 | }) |
| 524 | console.log('onSubmit__payload', payload) | 521 | console.log('onSubmit__payload', payload) |
| @@ -537,18 +534,31 @@ export default { | @@ -537,18 +534,31 @@ export default { | ||
| 537 | { key: 'supplier', label: '供方' }, | 534 | { key: 'supplier', label: '供方' }, |
| 538 | { key: 'buyer', label: '需方' }, | 535 | { key: 'buyer', label: '需方' }, |
| 539 | { key: 'orderDate', label: '订货日期' }, | 536 | { key: 'orderDate', label: '订货日期' }, |
| 537 | + { key: 'unit', label: '单位' }, | ||
| 540 | { key: 'workshopId', label: '生产厂' }, | 538 | { key: 'workshopId', label: '生产厂' }, |
| 539 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 541 | ] | 540 | ] |
| 542 | for (const it of checks) { | 541 | for (const it of checks) { |
| 543 | const val = this.form[it.key] | 542 | const val = this.form[it.key] |
| 544 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 543 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 545 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 544 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 546 | } | 545 | } |
| 547 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 546 | + const list = Array.isArray(this.productLineList) ? this.productLineList : [] |
| 547 | + if (list.length === 0) { | ||
| 548 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 548 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 549 | } | 549 | } |
| 550 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 551 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 550 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 551 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 552 | + for (const [idx, it] of list.entries()) { | ||
| 553 | + if ( | ||
| 554 | + strEmpty(it.productName) || | ||
| 555 | + strEmpty(it.industry) || | ||
| 556 | + strEmpty(it.quality) || | ||
| 557 | + strEmpty(it.brand) || | ||
| 558 | + numEmpty(it.quantity) || | ||
| 559 | + numEmpty(it.unitPrice) || | ||
| 560 | + strEmpty(it.deliveryDate) | ||
| 561 | + ) { | ||
| 552 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 562 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 553 | } | 563 | } |
| 554 | } | 564 | } |
| @@ -576,7 +586,7 @@ export default { | @@ -576,7 +586,7 @@ export default { | ||
| 576 | color: rgba(0, 0, 0, 0.6); | 586 | color: rgba(0, 0, 0, 0.6); |
| 577 | line-height: 32rpx; | 587 | line-height: 32rpx; |
| 578 | width: 240rpx; | 588 | width: 240rpx; |
| 579 | - padding: 24rpx 0; | 589 | + padding: 12rpx 0; |
| 580 | } | 590 | } |
| 581 | .total-item-price { | 591 | .total-item-price { |
| 582 | font-weight: 600; | 592 | font-weight: 600; |
| @@ -598,7 +608,7 @@ export default { | @@ -598,7 +608,7 @@ export default { | ||
| 598 | 608 | ||
| 599 | .scroll { | 609 | .scroll { |
| 600 | flex: 1; | 610 | flex: 1; |
| 601 | - padding: 12rpx 0 480rpx !important; | 611 | + padding: 12rpx 0 392rpx !important; |
| 602 | } | 612 | } |
| 603 | 613 | ||
| 604 | .footer { | 614 | .footer { |
| @@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
| 53 | }}</text></view> | 53 | }}</text></view> |
| 54 | </view> | 54 | </view> |
| 55 | 55 | ||
| 56 | - <view class="section"> | 56 | + <view class="section" v-if="detail.status === 'STANDARD'"> |
| 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ | 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 58 | detail.standardFileName || '-' | 58 | detail.standardFileName || '-' |
| 59 | }}</text></view> | 59 | }}</text></view> |
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | detail.standardStandardized ? '是' : '否' | 61 | detail.standardStandardized ? '是' : '否' |
| 62 | }}</text></view> | 62 | }}</text></view> |
| 63 | </view> | 63 | </view> |
| 64 | - <view class="section" v-if="status === 'FORMAL'"> | 64 | + <view class="section" v-if="detail.status === 'FORMAL'"> |
| 65 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ | 65 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 66 | detail.formalFileName || '-' }}</text></view> | 66 | detail.formalFileName || '-' }}</text></view> |
| 67 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized | 67 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized |
| @@ -271,20 +271,20 @@ export default { | @@ -271,20 +271,20 @@ export default { | ||
| 271 | const e = this.detail.showExamine || false | 271 | const e = this.detail.showExamine || false |
| 272 | const f = this.detail.standardShowExamine || false | 272 | const f = this.detail.standardShowExamine || false |
| 273 | return [ | 273 | return [ |
| 274 | - { ...this.buttons[0], visible: (s === 'DRAFT') }, //编辑 | ||
| 275 | - { ...this.buttons[1], visible: (s === 'DRAFT') }, //删除 | ||
| 276 | - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) }, //锁规 | ||
| 277 | - { ...this.buttons[3], visible: (s === 'FORMAL' && !l) }, //锁规延期申请 | ||
| 278 | - { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && a !== 'AUDIT' && a !== 'PASS') }, //上传正式合同附件 | ||
| 279 | - { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') }, //上传正式合同附件 | ||
| 280 | - { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') }, //上传标准合同附件 | ||
| 281 | - { ...this.buttons[7], visible: (s === 'FORMAL' && e && a === 'AUDIT') }, //审核正式合同 | ||
| 282 | - { ...this.buttons[8], visible: (s === 'STANDARD' && e && a === 'AUDIT') }, //审核正式合同 | ||
| 283 | - { ...this.buttons[9], visible: (s === 'STANDARD' && f && t === 'AUDIT') }, //审核标准合同 | ||
| 284 | - { ...this.buttons[10], visible: (s === 'FORMAL' && a) }, //正式合同审核详情 | ||
| 285 | - { ...this.buttons[11], visible: (s === 'STANDARD' && a) }, //正式合同审核详情 | ||
| 286 | - { ...this.buttons[12], visible: (s === 'STANDARD' && t) }, //标准合同审核详情 | ||
| 287 | - { ...this.buttons[13], visible: (s === 'STANDARD') }, //上传双方盖章合同附件 | 274 | + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:modify')) }, //编辑 |
| 275 | + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:delete')) }, //删除 | ||
| 276 | + { ...this.buttons[2], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:lock')) }, //锁规 | ||
| 277 | + { ...this.buttons[3], visible: (s === 'FORMAL' && !l && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:lock-apply')) }, //锁规延期申请 | ||
| 278 | + { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:upload')) }, //上传正式合同附件 | ||
| 279 | + { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:upload')) }, //上传正式合同附件 | ||
| 280 | + { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-upload')) }, //上传标准合同附件 | ||
| 281 | + { ...this.buttons[7], visible: (s === 'FORMAL' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同 | ||
| 282 | + { ...this.buttons[8], visible: (s === 'STANDARD' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同 | ||
| 283 | + { ...this.buttons[9], visible: (s === 'STANDARD' && f && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-approve')) }, //审核标准合同 | ||
| 284 | + { ...this.buttons[10], visible: (s === 'FORMAL' && a && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:review')) }, //正式合同审核详情 | ||
| 285 | + { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:review')) }, //正式合同审核详情 | ||
| 286 | + { ...this.buttons[12], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-review')) }, //标准合同审核详情 | ||
| 287 | + { ...this.buttons[13], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-unlcoked-contract:upload-seal')) }, //上传双方盖章合同附件 | ||
| 288 | ] | 288 | ] |
| 289 | } | 289 | } |
| 290 | }, | 290 | }, |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | @input="onSearchInput" | 14 | @input="onSearchInput" |
| 15 | /> | 15 | /> |
| 16 | <view class="tool-icons"> | 16 | <view class="tool-icons"> |
| 17 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 17 | + <image v-if="$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| @@ -61,7 +61,9 @@ | @@ -61,7 +61,9 @@ | ||
| 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> | 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> |
| 62 | </view> | 62 | </view> |
| 63 | <view class="info-row" v-if="item.status === 'STANDARD' || item.status === 'FORMAL'"> | 63 | <view class="info-row" v-if="item.status === 'STANDARD' || item.status === 'FORMAL'"> |
| 64 | - <text>{{ item.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span> | 64 | + <text>{{ item.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text> |
| 65 | + <span v-if="item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName" class="info-status" :style="getStatusCss(item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName)">{{ item.status === 'STANDARD' ? item.standardApprovedName : item.formalApprovedName }}</span> | ||
| 66 | + <span v-else>-</span> | ||
| 65 | </view> | 67 | </view> |
| 66 | <view class="info-row"> | 68 | <view class="info-row"> |
| 67 | <text>订货日期</text><text>{{ item.orderDate }}</text> | 69 | <text>订货日期</text><text>{{ item.orderDate }}</text> |
| @@ -59,11 +59,11 @@ | @@ -59,11 +59,11 @@ | ||
| 59 | <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" /> | 59 | <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" /> |
| 60 | </template> | 60 | </template> |
| 61 | </uni-list-item> | 61 | </uni-list-item> |
| 62 | - <uni-list-item title="不含税金额"> | 62 | + <!-- <uni-list-item title="不含税金额"> |
| 63 | <template v-slot:footer> | 63 | <template v-slot:footer> |
| 64 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 64 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 65 | </template> | 65 | </template> |
| 66 | - </uni-list-item> | 66 | + </uni-list-item> --> |
| 67 | <uni-list-item title="总金额"> | 67 | <uni-list-item title="总金额"> |
| 68 | <template v-slot:footer> | 68 | <template v-slot:footer> |
| 69 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 69 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| @@ -107,23 +107,23 @@ | @@ -107,23 +107,23 @@ | ||
| 107 | 数量 | 107 | 数量 |
| 108 | </div> | 108 | </div> |
| 109 | <div class="total-item-price"> | 109 | <div class="total-item-price"> |
| 110 | - {{ (sumQuantity || 0).toFixed(2) }}t | 110 | + {{ (totalQuantity || 0).toFixed(2) }}kg |
| 111 | </div> | 111 | </div> |
| 112 | </div> | 112 | </div> |
| 113 | - <div class="total-item"> | 113 | + <!-- <div class="total-item"> |
| 114 | <div class="total-item-text"> | 114 | <div class="total-item-text"> |
| 115 | 不含税金额 | 115 | 不含税金额 |
| 116 | </div> | 116 | </div> |
| 117 | <div class="total-item-price text-red"> | 117 | <div class="total-item-price text-red"> |
| 118 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 118 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 119 | </div> | 119 | </div> |
| 120 | - </div> | 120 | + </div> --> |
| 121 | <div class="total-item"> | 121 | <div class="total-item"> |
| 122 | <div class="total-item-text"> | 122 | <div class="total-item-text"> |
| 123 | 总金额 | 123 | 总金额 |
| 124 | </div> | 124 | </div> |
| 125 | <div class="total-item-price text-red"> | 125 | <div class="total-item-price text-red"> |
| 126 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 126 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 127 | </div> | 127 | </div> |
| 128 | </div> | 128 | </div> |
| 129 | </div> | 129 | </div> |
| @@ -146,15 +146,15 @@ export default { | @@ -146,15 +146,15 @@ export default { | ||
| 146 | } | 146 | } |
| 147 | }, | 147 | }, |
| 148 | computed: { | 148 | computed: { |
| 149 | - sumQuantity() { | 149 | + totalQuantity() { |
| 150 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) | 150 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) |
| 151 | return this.round(qty, 2) | 151 | return this.round(qty, 2) |
| 152 | }, | 152 | }, |
| 153 | - sumAmountExcl() { | ||
| 154 | - const sum = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.amountExcludingTax), 0) | ||
| 155 | - return this.round(sum, 2) | ||
| 156 | - }, | ||
| 157 | - sumTotal() { return this.totalAmount }, | 153 | + // totalAmountExcludingTax() { |
| 154 | + // const sum = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.amountExcludingTax), 0) | ||
| 155 | + // return this.round(sum, 2) | ||
| 156 | + // }, | ||
| 157 | + totalAmountIncludingTax() { return this.totalAmount }, | ||
| 158 | totalAmount() { | 158 | totalAmount() { |
| 159 | let sum = 0 | 159 | let sum = 0 |
| 160 | for (const it of this.items) { | 160 | for (const it of this.items) { |
| @@ -212,7 +212,7 @@ export default { | @@ -212,7 +212,7 @@ export default { | ||
| 212 | status: v.status || '', | 212 | status: v.status || '', |
| 213 | quantity: v.productQuantity || v.quantity || '', | 213 | quantity: v.productQuantity || v.quantity || '', |
| 214 | unitPrice: v.unitPrice || '', | 214 | unitPrice: v.unitPrice || '', |
| 215 | - amountExcludingTax: v.amountExcludingTax || 0, | 215 | + // amountExcludingTax: v.amountExcludingTax || 0, |
| 216 | totalAmount: v.totalAmount || 0, | 216 | totalAmount: v.totalAmount || 0, |
| 217 | deliveryDate: v.deliveryDate || '', | 217 | deliveryDate: v.deliveryDate || '', |
| 218 | specDisplay: '' | 218 | specDisplay: '' |
| @@ -248,14 +248,14 @@ export default { | @@ -248,14 +248,14 @@ export default { | ||
| 248 | this.recalculate(idx) | 248 | this.recalculate(idx) |
| 249 | }, | 249 | }, |
| 250 | recalculate(idx) { | 250 | recalculate(idx) { |
| 251 | - const TAX_RATE = 0.13 | 251 | + // const TAX_RATE = 0.13 |
| 252 | const it = this.items[idx] | 252 | const it = this.items[idx] |
| 253 | if (!it) return | 253 | if (!it) return |
| 254 | const qty = this.toNumber(it.quantity) | 254 | const qty = this.toNumber(it.quantity) |
| 255 | const price = this.toNumber(it.unitPrice) | 255 | const price = this.toNumber(it.unitPrice) |
| 256 | const total = this.round(qty * price, 2) | 256 | const total = this.round(qty * price, 2) |
| 257 | - const excl = this.round(total / (1 + TAX_RATE), 2) | ||
| 258 | - it.amountExcludingTax = excl | 257 | + // const excl = this.round(total / (1 + TAX_RATE), 2) |
| 258 | + // it.amountExcludingTax = excl | ||
| 259 | it.totalAmount = total | 259 | it.totalAmount = total |
| 260 | this.$set(this.items, idx, it) | 260 | this.$set(this.items, idx, it) |
| 261 | }, | 261 | }, |
| @@ -291,7 +291,7 @@ export default { | @@ -291,7 +291,7 @@ export default { | ||
| 291 | ...it, | 291 | ...it, |
| 292 | quantity: '', | 292 | quantity: '', |
| 293 | unitPrice: '', | 293 | unitPrice: '', |
| 294 | - amountExcludingTax: 0 | 294 | + // amountExcludingTax: 0, |
| 295 | })) | 295 | })) |
| 296 | }, | 296 | }, |
| 297 | async onSubmit() { | 297 | async onSubmit() { |
| @@ -300,12 +300,12 @@ export default { | @@ -300,12 +300,12 @@ export default { | ||
| 300 | const qty = this.toNumber(it.quantity) | 300 | const qty = this.toNumber(it.quantity) |
| 301 | const price = this.toNumber(it.unitPrice) | 301 | const price = this.toNumber(it.unitPrice) |
| 302 | const total = this.toNumber(it.totalAmount) | 302 | const total = this.toNumber(it.totalAmount) |
| 303 | - const excl = this.toNumber(it.amountExcludingTax) | 303 | + // const excl = this.toNumber(it.amountExcludingTax) |
| 304 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty | 304 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty |
| 305 | else raw.quantity = qty | 305 | else raw.quantity = qty |
| 306 | raw.unitPrice = price | 306 | raw.unitPrice = price |
| 307 | raw.totalAmount = total | 307 | raw.totalAmount = total |
| 308 | - raw.amountExcludingTax = excl | 308 | + // raw.amountExcludingTax = excl |
| 309 | return raw | 309 | return raw |
| 310 | }) | 310 | }) |
| 311 | if (!selected.length) { | 311 | if (!selected.length) { |
| @@ -325,9 +325,9 @@ export default { | @@ -325,9 +325,9 @@ export default { | ||
| 325 | const payload = { | 325 | const payload = { |
| 326 | id: this.id, | 326 | id: this.id, |
| 327 | totalAmountCapital: formatCurrencyToChinese(this.sumTotal), | 327 | totalAmountCapital: formatCurrencyToChinese(this.sumTotal), |
| 328 | - totalAmountExcludingTax: this.sumAmountExcl, | ||
| 329 | - totalAmountIncludingTax: this.sumTotal, | ||
| 330 | - totalQuantity: this.sumQuantity, | 328 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, |
| 329 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 330 | + totalQuantity: this.totalQuantity, | ||
| 331 | type:'INTL_OPEN_SPEC_AGMT', | 331 | type:'INTL_OPEN_SPEC_AGMT', |
| 332 | contractDistributorLineList: selected | 332 | contractDistributorLineList: selected |
| 333 | } | 333 | } |
| @@ -362,7 +362,7 @@ export default { | @@ -362,7 +362,7 @@ export default { | ||
| 362 | 362 | ||
| 363 | .scroll { | 363 | .scroll { |
| 364 | flex: 1; | 364 | flex: 1; |
| 365 | - padding: 12rpx 0 480rpx !important; | 365 | + padding: 12rpx 0 392rpx !important; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | .header { | 368 | .header { |
| @@ -646,7 +646,7 @@ export default { | @@ -646,7 +646,7 @@ export default { | ||
| 646 | color: rgba(0, 0, 0, 0.6); | 646 | color: rgba(0, 0, 0, 0.6); |
| 647 | line-height: 32rpx; | 647 | line-height: 32rpx; |
| 648 | width: 240rpx; | 648 | width: 240rpx; |
| 649 | - padding: 24rpx 0; | 649 | + padding: 12rpx 0; |
| 650 | } | 650 | } |
| 651 | 651 | ||
| 652 | .total-item-price { | 652 | .total-item-price { |
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | </template> | 41 | </template> |
| 42 | </uni-list-item> | 42 | </uni-list-item> |
| 43 | 43 | ||
| 44 | - <ProductRel mode="add" :orderDateBase="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" /> | 44 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :list="productLineList" @change="onProductsChange" :options="productList" /> |
| 45 | 45 | ||
| 46 | <uni-list-item title="合计人民币金额(大写)"> | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | <template v-slot:footer> | 47 | <template v-slot:footer> |
| @@ -98,34 +98,25 @@ | @@ -98,34 +98,25 @@ | ||
| 98 | :inputBorder="false" /> | 98 | :inputBorder="false" /> |
| 99 | </template> | 99 | </template> |
| 100 | </uni-list-item> | 100 | </uni-list-item> |
| 101 | - | ||
| 102 | - <view class="group"> | ||
| 103 | - <view class="group-title">特别条款要求</view> | ||
| 104 | - <view class="radio-list"> | ||
| 105 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 106 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 107 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 108 | - <text class="label">{{ opt.label }}</text> | ||
| 109 | - </view> | ||
| 110 | - </view> | ||
| 111 | - </view> | ||
| 112 | - <view class="group"> | ||
| 113 | - <view class="group-title">执行标准</view> | ||
| 114 | - <view class="radio-list"> | ||
| 115 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 116 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 117 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 118 | - <text class="label">{{ opt.label }}</text> | ||
| 119 | - </view> | ||
| 120 | - </view> | ||
| 121 | - </view> | 101 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 102 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 107 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 108 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 109 | + <template v-slot:body> | ||
| 110 | + <view class="item-title"><text>执行标准</text></view> | ||
| 111 | + </template> | ||
| 112 | + </uni-list-item> | ||
| 122 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 113 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 124 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 115 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | :inputBorder="false" /> | 116 | :inputBorder="false" /> |
| 126 | </template> | 117 | </template> |
| 127 | </uni-list-item> | 118 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | 119 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 129 | <template v-slot:footer> | 120 | <template v-slot:footer> |
| 130 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 121 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | </template> | 122 | </template> |
| @@ -177,15 +168,15 @@ | @@ -177,15 +168,15 @@ | ||
| 177 | <div class="total-text">合计</div> | 168 | <div class="total-text">合计</div> |
| 178 | <div class="total-item"> | 169 | <div class="total-item"> |
| 179 | <div class="total-item-text">数量</div> | 170 | <div class="total-item-text">数量</div> |
| 180 | - <div class="total-item-price">{{ (sumQuantity || 0).toFixed(2) }}t</div> | 171 | + <div class="total-item-price">{{ (totalQuantity || 0).toFixed(2) }}kg</div> |
| 181 | </div> | 172 | </div> |
| 182 | - <div class="total-item"> | 173 | + <!-- <div class="total-item"> |
| 183 | <div class="total-item-text">不含税金额</div> | 174 | <div class="total-item-text">不含税金额</div> |
| 184 | - <div class="total-item-price text-red">¥{{ (sumAmountExcl || 0).toFixed(2) }}</div> | ||
| 185 | - </div> | 175 | + <div class="total-item-price text-red">¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}</div> |
| 176 | + </div> --> | ||
| 186 | <div class="total-item"> | 177 | <div class="total-item"> |
| 187 | <div class="total-item-text">总金额</div> | 178 | <div class="total-item-text">总金额</div> |
| 188 | - <div class="total-item-price text-red">¥{{ (sumTotal || 0).toFixed(2) }}</div> | 179 | + <div class="total-item-price text-red">¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}</div> |
| 189 | </div> | 180 | </div> |
| 190 | </div> | 181 | </div> |
| 191 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> | 182 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| @@ -223,6 +214,7 @@ export default { | @@ -223,6 +214,7 @@ export default { | ||
| 223 | workshopId: '', | 214 | workshopId: '', |
| 224 | workshopName: '', | 215 | workshopName: '', |
| 225 | orderDate: '', | 216 | orderDate: '', |
| 217 | + deliveryDate: '', | ||
| 226 | designatedConsignee: '', | 218 | designatedConsignee: '', |
| 227 | specialTerms: '', | 219 | specialTerms: '', |
| 228 | specialTermsName: '', | 220 | specialTermsName: '', |
| @@ -233,7 +225,7 @@ export default { | @@ -233,7 +225,7 @@ export default { | ||
| 233 | includesPackagingFeeName: '', | 225 | includesPackagingFeeName: '', |
| 234 | includesTransportFee: false, | 226 | includesTransportFee: false, |
| 235 | includesTransportFeeName: '', | 227 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | 228 | + unit: '美元、公斤、美元/公斤', |
| 237 | totalAmountCapital: '', | 229 | totalAmountCapital: '', |
| 238 | depositInfo: '', | 230 | depositInfo: '', |
| 239 | packagingRequirements: '', | 231 | packagingRequirements: '', |
| @@ -256,9 +248,9 @@ export default { | @@ -256,9 +248,9 @@ export default { | ||
| 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 248 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 249 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 250 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 259 | - sumQuantity: 0, | ||
| 260 | - sumAmountExcl: 0, | ||
| 261 | - sumTotal: 0, | 251 | + totalQuantity: 0, |
| 252 | + // totalAmountExcludingTax: 0, | ||
| 253 | + totalAmountIncludingTax: 0, | ||
| 262 | productLineList: [], | 254 | productLineList: [], |
| 263 | newProductLineList: [], | 255 | newProductLineList: [], |
| 264 | productList: [] | 256 | productList: [] |
| @@ -347,11 +339,11 @@ export default { | @@ -347,11 +339,11 @@ export default { | ||
| 347 | const list = Array.isArray(products) ? products : [] | 339 | const list = Array.isArray(products) ? products : [] |
| 348 | this.newProductLineList = list | 340 | this.newProductLineList = list |
| 349 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 341 | const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) |
| 350 | - const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 342 | + // const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 351 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 343 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 352 | - this.sumQuantity = sumQ | ||
| 353 | - this.sumAmountExcl = sumE | ||
| 354 | - this.sumTotal = sumT | 344 | + this.totalQuantity = sumQ |
| 345 | + // this.totalAmountExcludingTax = sumE | ||
| 346 | + this.totalAmountIncludingTax = sumT | ||
| 355 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 347 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | }, | 348 | }, |
| 357 | async loadSuppliers() { | 349 | async loadSuppliers() { |
| @@ -399,6 +391,10 @@ export default { | @@ -399,6 +391,10 @@ export default { | ||
| 399 | setSheet('生产厂', opts) | 391 | setSheet('生产厂', opts) |
| 400 | } else if (field === 'supplier') { | 392 | } else if (field === 'supplier') { |
| 401 | setSheet('供方', this.supplierList) | 393 | setSheet('供方', this.supplierList) |
| 394 | + } else if (field === 'specialTerms') { | ||
| 395 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 396 | + } else if (field === 'executionStandard') { | ||
| 397 | + setSheet('执行标准', this.executionStandardList) | ||
| 402 | } else if (field === 'includesPackagingFee') { | 398 | } else if (field === 'includesPackagingFee') { |
| 403 | setSheet('单价中是否已包含包装费', this.yesNoList) | 399 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | } else if (field === 'includesTransportFee') { | 400 | } else if (field === 'includesTransportFee') { |
| @@ -443,18 +439,31 @@ export default { | @@ -443,18 +439,31 @@ export default { | ||
| 443 | { key: 'supplier', label: '供方' }, | 439 | { key: 'supplier', label: '供方' }, |
| 444 | { key: 'buyer', label: '需方' }, | 440 | { key: 'buyer', label: '需方' }, |
| 445 | { key: 'orderDate', label: '订货日期' }, | 441 | { key: 'orderDate', label: '订货日期' }, |
| 442 | + { key: 'unit', label: '单位' }, | ||
| 446 | { key: 'workshopId', label: '生产厂' }, | 443 | { key: 'workshopId', label: '生产厂' }, |
| 444 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 447 | ] | 445 | ] |
| 448 | for (const it of checks) { | 446 | for (const it of checks) { |
| 449 | const val = this.form[it.key] | 447 | const val = this.form[it.key] |
| 450 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 448 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 449 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 452 | } | 450 | } |
| 453 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 451 | + const list = Array.isArray(this.newProductLineList) ? this.newProductLineList : [] |
| 452 | + if (list.length === 0) { | ||
| 454 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 453 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 455 | } | 454 | } |
| 456 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 457 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 455 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 456 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 457 | + for (const [idx, it] of list.entries()) { | ||
| 458 | + if ( | ||
| 459 | + strEmpty(it.productName) || | ||
| 460 | + strEmpty(it.industry) || | ||
| 461 | + strEmpty(it.quality) || | ||
| 462 | + strEmpty(it.brand) || | ||
| 463 | + numEmpty(it.quantity) || | ||
| 464 | + strEmpty(it.unitPrice) || | ||
| 465 | + strEmpty(it.deliveryDate) | ||
| 466 | + ) { | ||
| 458 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 467 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | } | 468 | } |
| 460 | } | 469 | } |
| @@ -486,9 +495,9 @@ export default { | @@ -486,9 +495,9 @@ export default { | ||
| 486 | id: this.form.id, | 495 | id: this.form.id, |
| 487 | destination, | 496 | destination, |
| 488 | type: 'INTL_OPEN_SPEC_AGMT', | 497 | type: 'INTL_OPEN_SPEC_AGMT', |
| 489 | - sumQuantity: this.sumQuantity, | ||
| 490 | - sumAmountExcl: this.sumAmountExcl, | ||
| 491 | - sumTotal: this.sumTotal, | 498 | + totalQuantity: this.totalQuantity, |
| 499 | + // totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 500 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 492 | contractDistributorLineList: lines | 501 | contractDistributorLineList: lines |
| 493 | }) | 502 | }) |
| 494 | try { | 503 | try { |
| @@ -524,7 +533,7 @@ export default { | @@ -524,7 +533,7 @@ export default { | ||
| 524 | color: rgba(0, 0, 0, 0.6); | 533 | color: rgba(0, 0, 0, 0.6); |
| 525 | line-height: 32rpx; | 534 | line-height: 32rpx; |
| 526 | width: 240rpx; | 535 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | 536 | + padding: 12rpx 0; |
| 528 | } | 537 | } |
| 529 | 538 | ||
| 530 | .total-item-price { | 539 | .total-item-price { |
| @@ -547,7 +556,7 @@ export default { | @@ -547,7 +556,7 @@ export default { | ||
| 547 | 556 | ||
| 548 | .scroll { | 557 | .scroll { |
| 549 | flex: 1; | 558 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | 559 | + padding: 12rpx 0 392rpx !important; |
| 551 | } | 560 | } |
| 552 | 561 | ||
| 553 | .footer { | 562 | .footer { |
| @@ -53,53 +53,53 @@ | @@ -53,53 +53,53 @@ | ||
| 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | </template> | 54 | </template> |
| 55 | </uni-list-item> | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | 56 | + <uni-list-item title="厚度(mm)"> |
| 57 | <template v-slot:footer> | 57 | <template v-slot:footer> |
| 58 | - <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> | 58 | + <uni-easyinput type="digit" v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" @input="onNonNegativeInput(idx, 'thickness')" @blur="onNonNegativeBlur(idx, 'thickness', 2)" /> |
| 59 | </template> | 59 | </template> |
| 60 | </uni-list-item> | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | 61 | + <uni-list-item title="厚度公差上限(mm)"> |
| 62 | <template v-slot:footer> | 62 | <template v-slot:footer> |
| 63 | - <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" | ||
| 64 | - placeholder="请输入厚度公差(单项+)" /> | 63 | + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false" |
| 64 | + placeholder="请输入厚度公差上限" @input="onNonNegativeInput(idx, 'thicknessTolPos')" @blur="onNonNegativeBlur(idx, 'thicknessTolPos', 2)" /> | ||
| 65 | </template> | 65 | </template> |
| 66 | </uni-list-item> | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | 67 | + <uni-list-item title="厚度公差下限(mm)"> |
| 68 | <template v-slot:footer> | 68 | <template v-slot:footer> |
| 69 | - <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" | ||
| 70 | - placeholder="请输入厚度公差(单项-)" /> | 69 | + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false" |
| 70 | + placeholder="请输入厚度公差下限" @input="onNonNegativeInput(idx, 'thicknessTolNeg')" @blur="onNonNegativeBlur(idx, 'thicknessTolNeg', 2)" /> | ||
| 71 | </template> | 71 | </template> |
| 72 | </uni-list-item> | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | 73 | + <uni-list-item title="宽度(mm)"> |
| 74 | <template v-slot:footer> | 74 | <template v-slot:footer> |
| 75 | - <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> | 75 | + <uni-easyinput type="digit" v-model="item.width" :inputBorder="false" placeholder="请输入宽度" @input="onNonNegativeInput(idx, 'width')" @blur="onNonNegativeBlur(idx, 'width', 2)" /> |
| 76 | </template> | 76 | </template> |
| 77 | </uni-list-item> | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | 78 | + <uni-list-item title="宽度公差上限(mm)"> |
| 79 | <template v-slot:footer> | 79 | <template v-slot:footer> |
| 80 | - <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> | 80 | + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNonNegativeInput(idx, 'widthTolPos')" @blur="onNonNegativeBlur(idx, 'widthTolPos', 2)" /> |
| 81 | </template> | 81 | </template> |
| 82 | </uni-list-item> | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | 83 | + <uni-list-item title="宽度公差下限(mm)"> |
| 84 | <template v-slot:footer> | 84 | <template v-slot:footer> |
| 85 | - <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> | 85 | + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNonNegativeInput(idx, 'widthTolNeg')" @blur="onNonNegativeBlur(idx, 'widthTolNeg', 2)" /> |
| 86 | </template> | 86 | </template> |
| 87 | </uni-list-item> | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | 88 | + <uni-list-item title="长度(mm)"> |
| 89 | <template v-slot:footer> | 89 | <template v-slot:footer> |
| 90 | - <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> | 90 | + <uni-easyinput type="digit" v-model="item.length" :inputBorder="false" placeholder="请输入长度" @input="onNonNegativeInput(idx, 'length')" @blur="onNonNegativeBlur(idx, 'length', 2)" /> |
| 91 | </template> | 91 | </template> |
| 92 | </uni-list-item> | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | 93 | + <uni-list-item title="长度公差上限(mm)"> |
| 94 | <template v-slot:footer> | 94 | <template v-slot:footer> |
| 95 | - <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" | ||
| 96 | - placeholder="请输入长度公差(单项+)" /> | 95 | + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false" |
| 96 | + placeholder="请输入长度公差上限" @input="onNonNegativeInput(idx, 'lengthTolPos')" @blur="onNonNegativeBlur(idx, 'lengthTolPos', 2)" /> | ||
| 97 | </template> | 97 | </template> |
| 98 | </uni-list-item> | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | 99 | + <uni-list-item title="长度公差下限(mm)"> |
| 100 | <template v-slot:footer> | 100 | <template v-slot:footer> |
| 101 | - <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" | ||
| 102 | - placeholder="请输入长度公差(单项-)" /> | 101 | + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false" |
| 102 | + placeholder="请输入长度公差下限" @input="onNonNegativeInput(idx, 'lengthTolNeg')" @blur="onNonNegativeBlur(idx, 'lengthTolNeg', 2)" /> | ||
| 103 | </template> | 103 | </template> |
| 104 | </uni-list-item> | 104 | </uni-list-item> |
| 105 | <uni-list-item title="状态"> | 105 | <uni-list-item title="状态"> |
| @@ -109,19 +109,24 @@ | @@ -109,19 +109,24 @@ | ||
| 109 | </uni-list-item> | 109 | </uni-list-item> |
| 110 | <uni-list-item title="数量"> | 110 | <uni-list-item title="数量"> |
| 111 | <template v-slot:footer> | 111 | <template v-slot:footer> |
| 112 | - <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" placeholder="请输入数量" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'quantity', 0)" /> | 112 | + <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 2)" /> |
| 113 | </template> | 113 | </template> |
| 114 | </uni-list-item> | 114 | </uni-list-item> |
| 115 | <uni-list-item title="单价"> | 115 | <uni-list-item title="单价"> |
| 116 | <template v-slot:footer> | 116 | <template v-slot:footer> |
| 117 | - <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" /> | 117 | + <uni-easyinput v-model="item.unitPrice" type="digit" :inputBorder="false" placeholder="请输入销售价格" @input="onNonNegativeInput(idx, 'unitPrice')" @blur="onNonNegativeBlur(idx, 'unitPrice', 2)" /> |
| 118 | </template> | 118 | </template> |
| 119 | </uni-list-item> | 119 | </uni-list-item> |
| 120 | - <uni-list-item title="不含税金额"> | 120 | + <uni-list-item title="外贸加工费"> |
| 121 | <template v-slot:footer> | 121 | <template v-slot:footer> |
| 122 | - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 122 | + <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> |
| 123 | </template> | 123 | </template> |
| 124 | </uni-list-item> | 124 | </uni-list-item> |
| 125 | + <!-- <uni-list-item title="不含税金额"> | ||
| 126 | + <template v-slot:footer> | ||
| 127 | + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | ||
| 128 | + </template> | ||
| 129 | + </uni-list-item> --> | ||
| 125 | <uni-list-item title="总金额"> | 130 | <uni-list-item title="总金额"> |
| 126 | <template v-slot:footer> | 131 | <template v-slot:footer> |
| 127 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| @@ -129,7 +134,7 @@ | @@ -129,7 +134,7 @@ | ||
| 129 | </uni-list-item> | 134 | </uni-list-item> |
| 130 | <uni-list-item title="发货日期"> | 135 | <uni-list-item title="发货日期"> |
| 131 | <template v-slot:footer> | 136 | <template v-slot:footer> |
| 132 | - <uni-datetime-picker type="date" v-model="item.orderDate" @change="onDateChange(idx, $event)" /> | 137 | + <uni-datetime-picker :start="minDeliveryDate" type="date" v-model="item.deliveryDate" @change="onDateChange(idx, $event)" /> |
| 133 | </template> | 138 | </template> |
| 134 | </uni-list-item> | 139 | </uni-list-item> |
| 135 | </uni-list> | 140 | </uni-list> |
| @@ -151,18 +156,41 @@ | @@ -151,18 +156,41 @@ | ||
| 151 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 152 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 153 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> | 158 | <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> |
| 154 | - <view class="row"><text class="label">规格</text><text class="value">{{ item.specDisplay }}</text></view> | 159 | + <!-- 厚(公差) * 宽(公差) * 长(公差) --> |
| 160 | + <view class="row row-spec"><text class="label">规格(mm)</text> | ||
| 161 | + <view class="value value-spec"> | ||
| 162 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 163 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 164 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }} | ||
| 165 | + </view> | ||
| 166 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }} | ||
| 167 | + </view> | ||
| 168 | + </view> | ||
| 169 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 170 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 171 | + <view v-if="item.width" class="value-spec_box"> | ||
| 172 | + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view> | ||
| 173 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view> | ||
| 174 | + </view> | ||
| 175 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 176 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 177 | + <view v-if="item.length" class="value-spec_box"> | ||
| 178 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view> | ||
| 179 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view> | ||
| 180 | + </view> | ||
| 181 | + </view> | ||
| 182 | + </view> | ||
| 155 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 156 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 157 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 158 | }}</text> | 186 | }}</text> |
| 159 | </view> | 187 | </view> |
| 160 | - <view class="row"><text class="label">不含税金额</text><text class="value">{{ | 188 | + <!-- <view class="row"><text class="label">不含税金额</text><text class="value">{{ |
| 161 | formatCurrency(item.amountExcludingTax) | 189 | formatCurrency(item.amountExcludingTax) |
| 162 | - }}</text></view> | 190 | + }}</text></view> --> |
| 163 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 164 | }}</text></view> | 192 | }}</text></view> |
| 165 | - <view class="row"><text class="label">发货日期</text><text class="value">{{ item.orderDate }}</text></view> | 193 | + <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text></view> |
| 166 | </view> | 194 | </view> |
| 167 | </view> | 195 | </view> |
| 168 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> | 196 | <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" /> |
| @@ -176,7 +204,8 @@ export default { | @@ -176,7 +204,8 @@ export default { | ||
| 176 | mode: { type: String, default: 'add' }, | 204 | mode: { type: String, default: 'add' }, |
| 177 | list: { type: Array, default: () => [] }, | 205 | list: { type: Array, default: () => [] }, |
| 178 | max: { type: Number, default: 8 }, | 206 | max: { type: Number, default: 8 }, |
| 179 | - orderDateBase: { type: String, default: '' }, | 207 | + deliveryDateBase: { type: String, default: '' }, |
| 208 | + deliveryDate: { type: String, default: '' }, | ||
| 180 | options: { type: Array, default: () => [] } | 209 | options: { type: Array, default: () => [] } |
| 181 | }, | 210 | }, |
| 182 | components: { SingleSelectSheet }, | 211 | components: { SingleSelectSheet }, |
| @@ -194,6 +223,21 @@ export default { | @@ -194,6 +223,21 @@ export default { | ||
| 194 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), | 223 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), |
| 195 | value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) | 224 | value: o.value != null ? o.value : (o.id != null ? o.id : o.productId) |
| 196 | })) | 225 | })) |
| 226 | + }, | ||
| 227 | + minDeliveryDate() { | ||
| 228 | + const s = this.deliveryDate | ||
| 229 | + if (!s) return '' | ||
| 230 | + const parts = String(s).split('-') | ||
| 231 | + const y = Number(parts[0]) | ||
| 232 | + const m = Number(parts[1]) | ||
| 233 | + const d = Number(parts[2]) | ||
| 234 | + if (!y || !m || !d) return '' | ||
| 235 | + const dt = new Date(y, m - 1, d) | ||
| 236 | + dt.setDate(dt.getDate() + 1) | ||
| 237 | + const yy = dt.getFullYear() | ||
| 238 | + const mm = String(dt.getMonth() + 1).padStart(2, '0') | ||
| 239 | + const dd = String(dt.getDate() - 1).padStart(2, '0') | ||
| 240 | + return `${yy}/${mm}/${dd}` | ||
| 197 | } | 241 | } |
| 198 | }, | 242 | }, |
| 199 | watch: { | 243 | watch: { |
| @@ -218,10 +262,18 @@ export default { | @@ -218,10 +262,18 @@ export default { | ||
| 218 | }, | 262 | }, |
| 219 | methods: { | 263 | methods: { |
| 220 | defaultItem() { | 264 | defaultItem() { |
| 221 | - return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, orderDate: '' } | 265 | + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', totalAmount: 0, deliveryDate: '' } |
| 222 | }, | 266 | }, |
| 223 | - onImmediateChange(idx) { | ||
| 224 | - this.$nextTick(() => this.recalculate(idx)) | 267 | + onNonNegativeInput(idx, field) { |
| 268 | + const it = this.items[idx] | ||
| 269 | + if (!it) return | ||
| 270 | + let v = String(it[field] != null ? it[field] : '') | ||
| 271 | + v = v.replace(/[^0-9.]/g, '') | ||
| 272 | + v = v.replace(/(\..*)\./g, '$1') | ||
| 273 | + if (v.startsWith('.')) v = '0' + v | ||
| 274 | + it[field] = v | ||
| 275 | + this.$set(this.items, idx, it) | ||
| 276 | + if (field === 'quantity' || field === 'unitPrice') this.$nextTick(() => this.recalculate(idx)) | ||
| 225 | }, | 277 | }, |
| 226 | toNumber(val) { | 278 | toNumber(val) { |
| 227 | if (typeof val === 'number') return isNaN(val) ? 0 : val | 279 | if (typeof val === 'number') return isNaN(val) ? 0 : val |
| @@ -234,21 +286,21 @@ export default { | @@ -234,21 +286,21 @@ export default { | ||
| 234 | const m = Math.pow(10, digits) | 286 | const m = Math.pow(10, digits) |
| 235 | return Math.round(n * m) / m | 287 | return Math.round(n * m) / m |
| 236 | }, | 288 | }, |
| 237 | - onNumberBlur(idx, field, digits) { | 289 | + onNonNegativeBlur(idx, field, digits) { |
| 238 | const it = this.items[idx] | 290 | const it = this.items[idx] |
| 239 | if (!it) return | 291 | if (!it) return |
| 240 | const raw = it[field] | 292 | const raw = it[field] |
| 241 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | ||
| 242 | if (raw === '' || raw === null || raw === undefined) { | 293 | if (raw === '' || raw === null || raw === undefined) { |
| 243 | this.$set(this.items, idx, it) | 294 | this.$set(this.items, idx, it) |
| 244 | - this.recalculate(idx) | 295 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 245 | return | 296 | return |
| 246 | } | 297 | } |
| 247 | - const num = this.toNumber(raw) | 298 | + let num = this.toNumber(raw) |
| 299 | + if (isNaN(num) || num < 0) num = 0 | ||
| 248 | const rounded = this.round(num, digits) | 300 | const rounded = this.round(num, digits) |
| 249 | it[field] = rounded | 301 | it[field] = rounded |
| 250 | this.$set(this.items, idx, it) | 302 | this.$set(this.items, idx, it) |
| 251 | - this.recalculate(idx) | 303 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) |
| 252 | }, | 304 | }, |
| 253 | formatCurrency(val) { | 305 | formatCurrency(val) { |
| 254 | if (val == null || val === '') return '' | 306 | if (val == null || val === '') return '' |
| @@ -286,8 +338,8 @@ export default { | @@ -286,8 +338,8 @@ export default { | ||
| 286 | const qty = this.toNumber(it.quantity) | 338 | const qty = this.toNumber(it.quantity) |
| 287 | const price = this.toNumber(it.unitPrice) | 339 | const price = this.toNumber(it.unitPrice) |
| 288 | const total = this.round(qty * price, 2) | 340 | const total = this.round(qty * price, 2) |
| 289 | - const excl = this.round(total / (1 + TAX_RATE), 2) | ||
| 290 | - const next = { ...it, totalAmount: total, amountExcludingTax: excl } | 341 | + // const excl = this.round(total / (1 + TAX_RATE), 2) |
| 342 | + const next = { ...it, totalAmount: total } | ||
| 291 | this.$set(this.items, idx, next) | 343 | this.$set(this.items, idx, next) |
| 292 | }, | 344 | }, |
| 293 | recalculateAll() { | 345 | recalculateAll() { |
| @@ -319,15 +371,15 @@ export default { | @@ -319,15 +371,15 @@ export default { | ||
| 319 | onDateChange(idx, e) { | 371 | onDateChange(idx, e) { |
| 320 | const it = this.items[idx] | 372 | const it = this.items[idx] |
| 321 | if (!it) return | 373 | if (!it) return |
| 322 | - const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.orderDate | 374 | + const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.deliveryDate |
| 323 | const dateStr = String(val).slice(0, 10) | 375 | const dateStr = String(val).slice(0, 10) |
| 324 | - const base = this.orderDateBase ? new Date(this.orderDateBase) : null | 376 | + const base = this.deliveryDateBase ? new Date(this.deliveryDateBase) : null |
| 325 | const d = new Date(dateStr) | 377 | const d = new Date(dateStr) |
| 326 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { | 378 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 327 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) | 379 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 328 | - it.orderDate = this.orderDateBase | 380 | + it.deliveryDate = this.deliveryDateBase |
| 329 | } else { | 381 | } else { |
| 330 | - it.orderDate = dateStr | 382 | + it.deliveryDate = dateStr |
| 331 | } | 383 | } |
| 332 | this.$set(this.items, idx, it) | 384 | this.$set(this.items, idx, it) |
| 333 | }, | 385 | }, |
| @@ -500,8 +552,46 @@ export default { | @@ -500,8 +552,46 @@ export default { | ||
| 500 | 552 | ||
| 501 | .value { | 553 | .value { |
| 502 | flex: 1; | 554 | flex: 1; |
| 503 | - text-align: right; | 555 | + // text-align: right; |
| 504 | color: rgba(0, 0, 0, 0.9); | 556 | color: rgba(0, 0, 0, 0.9); |
| 505 | font-size: 28rpx; | 557 | font-size: 28rpx; |
| 506 | } | 558 | } |
| 559 | + .value-spec { | ||
| 560 | + height: 48rpx; | ||
| 561 | + display: flex; | ||
| 562 | + align-items: center; | ||
| 563 | + color: #000000; | ||
| 564 | + // justify-content: end; | ||
| 565 | + &_box { | ||
| 566 | + position: relative; | ||
| 567 | + width: 60rpx; | ||
| 568 | + height: 48rpx; | ||
| 569 | + | ||
| 570 | + &_1 { | ||
| 571 | + font-size: 16rpx; | ||
| 572 | + position: absolute; | ||
| 573 | + top: -10rpx; | ||
| 574 | + left: 0; | ||
| 575 | + } | ||
| 576 | + | ||
| 577 | + &_2 { | ||
| 578 | + font-size: 16rpx; | ||
| 579 | + position: absolute; | ||
| 580 | + bottom: -10rpx; | ||
| 581 | + left: 0; | ||
| 582 | + } | ||
| 583 | + } | ||
| 584 | + | ||
| 585 | + &_val { | ||
| 586 | + font-size: 28rpx; | ||
| 587 | + | ||
| 588 | + &.p12 { | ||
| 589 | + padding-right: 12rpx; | ||
| 590 | + } | ||
| 591 | + } | ||
| 592 | + } | ||
| 593 | + .row-spec { | ||
| 594 | + height: 60rpx; | ||
| 595 | + align-items: center; | ||
| 596 | + } | ||
| 507 | </style> | 597 | </style> |
| @@ -34,8 +34,7 @@ export default { | @@ -34,8 +34,7 @@ export default { | ||
| 34 | computed: { | 34 | computed: { |
| 35 | displayButtons() { | 35 | displayButtons() { |
| 36 | return [ | 36 | return [ |
| 37 | - // { text: '删除', variant: 'danger' }, | ||
| 38 | - { text: '编辑', variant: 'outline' } | 37 | + { text: '编辑', variant: 'outline', visible: this.$auth.hasPermi('contract-manage:contract-framework:modify') } |
| 39 | ] | 38 | ] |
| 40 | } | 39 | } |
| 41 | }, | 40 | }, |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入客户名称或编号" clearButton="auto" | 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入客户名称或编号" clearButton="auto" |
| 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" @input="onSearchInput" /> | 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" @input="onSearchInput" /> |
| 7 | <view class="tool-icons"> | 7 | <view class="tool-icons"> |
| 8 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 8 | + <image v-if="$auth.hasPermi('contract-manage:contract-framework:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 10 | </view> | 10 | </view> |
| 11 | </view> | 11 | </view> |
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | <text>框架合同编号</text><text>{{ item.code }}</text> | 24 | <text>框架合同编号</text><text>{{ item.code }}</text> |
| 25 | </view> | 25 | </view> |
| 26 | <view class="info-row"> | 26 | <view class="info-row"> |
| 27 | - <text>是否签订</text><text>{{ item.hasFrameworkAgreement }}</text> | 27 | + <text>是否签订</text><text>{{ item.hasFrameworkAgreement ? '是' : '否' }}</text> |
| 28 | </view> | 28 | </view> |
| 29 | <view class="info-row"> | 29 | <view class="info-row"> |
| 30 | <text>品种</text><text>{{ item.materialTypeName }}</text> | 30 | <text>品种</text><text>{{ item.materialTypeName }}</text> |
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | </template> | 40 | </template> |
| 41 | </uni-list-item> | 41 | </uni-list-item> |
| 42 | - <!-- <ProductRel mode="add" :orderDateBase="form.orderDate" @change="onProductsChange" :options="productList" :rawToProdRatioList="rawToProdRatioList" /> --> | 42 | + <ProductRel mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" @change="onProductsChange" :options="productList" :rawToProdRatioList="rawToProdRatioList" /> |
| 43 | <uni-list-item title="合计人民币金额(大写)"> | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | <template v-slot:footer> | 44 | <template v-slot:footer> |
| 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| @@ -92,33 +92,25 @@ | @@ -92,33 +92,25 @@ | ||
| 92 | :inputBorder="false" /> | 92 | :inputBorder="false" /> |
| 93 | </template> | 93 | </template> |
| 94 | </uni-list-item> | 94 | </uni-list-item> |
| 95 | - <view class="group"> | ||
| 96 | - <view class="group-title">特别条款要求</view> | ||
| 97 | - <view class="radio-list"> | ||
| 98 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 99 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 100 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 101 | - <text class="label">{{ opt.label }}</text> | ||
| 102 | - </view> | ||
| 103 | - </view> | ||
| 104 | - </view> | ||
| 105 | - <view class="group"> | ||
| 106 | - <view class="group-title">执行标准</view> | ||
| 107 | - <view class="radio-list"> | ||
| 108 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 109 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 110 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 111 | - <text class="label">{{ opt.label }}</text> | ||
| 112 | - </view> | ||
| 113 | - </view> | ||
| 114 | - </view> | 95 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 96 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 97 | + <template v-slot:body> | ||
| 98 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 99 | + </template> | ||
| 100 | + </uni-list-item> | ||
| 101 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 102 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 103 | + <template v-slot:body> | ||
| 104 | + <view class="item-title"><text>执行标准</text></view> | ||
| 105 | + </template> | ||
| 106 | + </uni-list-item> | ||
| 115 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | <template v-slot:footer> | 108 | <template v-slot:footer> |
| 117 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | :inputBorder="false" /> | 110 | :inputBorder="false" /> |
| 119 | </template> | 111 | </template> |
| 120 | </uni-list-item> | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 122 | <template v-slot:footer> | 114 | <template v-slot:footer> |
| 123 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | </template> | 116 | </template> |
| @@ -181,7 +173,7 @@ | @@ -181,7 +173,7 @@ | ||
| 181 | 数量 | 173 | 数量 |
| 182 | </div> | 174 | </div> |
| 183 | <div class="total-item-price"> | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg |
| 185 | </div> | 177 | </div> |
| 186 | </div> | 178 | </div> |
| 187 | <div class="total-item"> | 179 | <div class="total-item"> |
| @@ -189,7 +181,7 @@ | @@ -189,7 +181,7 @@ | ||
| 189 | 不含税金额 | 181 | 不含税金额 |
| 190 | </div> | 182 | </div> |
| 191 | <div class="total-item-price text-red"> | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} |
| 193 | </div> | 185 | </div> |
| 194 | </div> | 186 | </div> |
| 195 | <div class="total-item"> | 187 | <div class="total-item"> |
| @@ -197,7 +189,7 @@ | @@ -197,7 +189,7 @@ | ||
| 197 | 总金额 | 189 | 总金额 |
| 198 | </div> | 190 | </div> |
| 199 | <div class="total-item-price text-red"> | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} |
| 201 | </div> | 193 | </div> |
| 202 | </div> | 194 | </div> |
| 203 | </div> | 195 | </div> |
| @@ -214,7 +206,7 @@ | @@ -214,7 +206,7 @@ | ||
| 214 | <script> | 206 | <script> |
| 215 | import SingleSelectSheet from '@/components/single-select/index.vue' | 207 | import SingleSelectSheet from '@/components/single-select/index.vue' |
| 216 | import RelateSelectSheet from '@/components/relate-select/index.vue' | 208 | import RelateSelectSheet from '@/components/relate-select/index.vue' |
| 217 | -//import ProductRel from './productRel.vue' | 209 | +import ProductRel from './productRel.vue' |
| 218 | import CitySelector from '@/components/city-selector/index.vue' | 210 | import CitySelector from '@/components/city-selector/index.vue' |
| 219 | import { getRetailCodeApi, createContractApi, getCustomerRemarks,getCustomerSpecificQualityRequirements } from '@/api/contract' | 211 | import { getRetailCodeApi, createContractApi, getCustomerRemarks,getCustomerSpecificQualityRequirements } from '@/api/contract' |
| 220 | import { getDicByCodes } from '@/utils/dic' | 212 | import { getDicByCodes } from '@/utils/dic' |
| @@ -223,7 +215,7 @@ import { workshopQueryApi } from '@/api/devManage' | @@ -223,7 +215,7 @@ import { workshopQueryApi } from '@/api/devManage' | ||
| 223 | 215 | ||
| 224 | export default { | 216 | export default { |
| 225 | name: 'AddContractProcess', | 217 | name: 'AddContractProcess', |
| 226 | - components: { SingleSelectSheet, RelateSelectSheet, /* ProductRel, */ CitySelector }, | 218 | + components: { SingleSelectSheet, RelateSelectSheet, ProductRel, CitySelector }, |
| 227 | data() { | 219 | data() { |
| 228 | return { | 220 | return { |
| 229 | form: { | 221 | form: { |
| @@ -233,6 +225,7 @@ export default { | @@ -233,6 +225,7 @@ export default { | ||
| 233 | buyer: '', | 225 | buyer: '', |
| 234 | buyerName: '', | 226 | buyerName: '', |
| 235 | orderDate: '', | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | ||
| 236 | designatedConsignee: '', | 229 | designatedConsignee: '', |
| 237 | specialTerms: '', | 230 | specialTerms: '', |
| 238 | specialTermsName: '', | 231 | specialTermsName: '', |
| @@ -263,9 +256,9 @@ export default { | @@ -263,9 +256,9 @@ export default { | ||
| 263 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 266 | - sumQuantity: 0, | ||
| 267 | - sumAmountExcl: 0, | ||
| 268 | - sumTotal: 0, | 259 | + totalQuantity: 0, |
| 260 | + totalAmountExcludingTax: 0, | ||
| 261 | + totalAmountIncludingTax: 0, | ||
| 269 | productLineList: [], | 262 | productLineList: [], |
| 270 | productList: [], | 263 | productList: [], |
| 271 | rawToProdRatioList: [], | 264 | rawToProdRatioList: [], |
| @@ -313,8 +306,8 @@ export default { | @@ -313,8 +306,8 @@ export default { | ||
| 313 | const o = Array.isArray(oldVal) ? oldVal : [] | 306 | const o = Array.isArray(oldVal) ? oldVal : [] |
| 314 | const changed = [] | 307 | const changed = [] |
| 315 | for (let i = 0; i < n.length; i++) { | 308 | for (let i = 0; i < n.length; i++) { |
| 316 | - const ni = n[i] && n[i].productId | ||
| 317 | - const oi = o[i] && o[i].productId | 309 | + const ni = n[i] && n[i].rawProductId |
| 310 | + const oi = o[i] && o[i].rawProductId | ||
| 318 | if (ni !== oi && ni !== undefined) changed.push(ni) | 311 | if (ni !== oi && ni !== undefined) changed.push(ni) |
| 319 | } | 312 | } |
| 320 | if (changed.length && this.form.buyer) { | 313 | if (changed.length && this.form.buyer) { |
| @@ -326,11 +319,11 @@ export default { | @@ -326,11 +319,11 @@ export default { | ||
| 326 | }, | 319 | }, |
| 327 | methods: { | 320 | methods: { |
| 328 | getHistory() { | 321 | getHistory() { |
| 329 | - console.log('this.productLineList', this.productLineList[0].productId) | ||
| 330 | - if (!this.productLineList.length || !this.productLineList[0].productId) { | 322 | + console.log('this.productLineList', this.productLineList[0].rawProductId) |
| 323 | + if (!this.productLineList.length || !this.productLineList[0].rawProductId) { | ||
| 331 | return; | 324 | return; |
| 332 | } | 325 | } |
| 333 | - const id = this.productLineList.map(it => it.productId).join('') | 326 | + const id = this.productLineList.map(it => it.rawProductId).join('') |
| 334 | this.fetchCustomerQualityRequirements(id) | 327 | this.fetchCustomerQualityRequirements(id) |
| 335 | }, | 328 | }, |
| 336 | async fetchCustomerQualityRequirements(id) { | 329 | async fetchCustomerQualityRequirements(id) { |
| @@ -366,12 +359,12 @@ export default { | @@ -366,12 +359,12 @@ export default { | ||
| 366 | }, | 359 | }, |
| 367 | onProductsChange(products) { | 360 | onProductsChange(products) { |
| 368 | const list = Array.isArray(products) ? products : [] | 361 | const list = Array.isArray(products) ? products : [] |
| 369 | - const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 362 | + const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.productQuantity) || 0), 0) |
| 370 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 363 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 371 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 364 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 372 | - this.sumQuantity = sumQ | ||
| 373 | - this.sumAmountExcl = sumE | ||
| 374 | - this.sumTotal = sumT | 365 | + this.totalQuantity = sumQ |
| 366 | + this.totalAmountExcludingTax = sumE | ||
| 367 | + this.totalAmountIncludingTax = sumT | ||
| 375 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 368 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 376 | this.productLineList = list | 369 | this.productLineList = list |
| 377 | }, | 370 | }, |
| @@ -450,6 +443,10 @@ export default { | @@ -450,6 +443,10 @@ export default { | ||
| 450 | setSheet('生产厂', opts) | 443 | setSheet('生产厂', opts) |
| 451 | } else if (field === 'supplier') { | 444 | } else if (field === 'supplier') { |
| 452 | setSheet('承揽方', this.supplierList) | 445 | setSheet('承揽方', this.supplierList) |
| 446 | + } else if (field === 'specialTerms') { | ||
| 447 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 448 | + } else if (field === 'executionStandard') { | ||
| 449 | + setSheet('执行标准', this.executionStandardList) | ||
| 453 | } else if (field === 'includesPackagingFee') { | 450 | } else if (field === 'includesPackagingFee') { |
| 454 | setSheet('单价中是否已包含包装费', this.yesNoList) | 451 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 455 | } else if (field === 'includesTransportFee') { | 452 | } else if (field === 'includesTransportFee') { |
| @@ -520,10 +517,15 @@ export default { | @@ -520,10 +517,15 @@ export default { | ||
| 520 | ...formForSubmit, | 517 | ...formForSubmit, |
| 521 | destination, | 518 | destination, |
| 522 | type: 'PROCESS_STD_AGMT', | 519 | type: 'PROCESS_STD_AGMT', |
| 523 | - sumQuantity: this.sumQuantity, | ||
| 524 | - sumAmountExcl: this.sumAmountExcl, | ||
| 525 | - sumTotal: this.sumTotal, | ||
| 526 | - contractDistributorLineList: lines | 520 | + totalQuantity: this.totalQuantity, |
| 521 | + totalAmountExcludingTax: this.totalAmountExcludingTax, | ||
| 522 | + totalAmountIncludingTax: this.totalAmountIncludingTax, | ||
| 523 | + contractStdProcessingLineList: lines.map(it => ({ | ||
| 524 | + ...it, | ||
| 525 | + productId: it.rawProductId || '', | ||
| 526 | + productName: it.rawProductName || '', | ||
| 527 | + productGrade: it.rawProductGrade || '', | ||
| 528 | + })) | ||
| 527 | }) | 529 | }) |
| 528 | console.log('onSubmit__payload', payload) | 530 | console.log('onSubmit__payload', payload) |
| 529 | 531 | ||
| @@ -542,17 +544,30 @@ export default { | @@ -542,17 +544,30 @@ export default { | ||
| 542 | { key: 'buyer', label: '定作方' }, | 544 | { key: 'buyer', label: '定作方' }, |
| 543 | { key: 'orderDate', label: '订货日期' }, | 545 | { key: 'orderDate', label: '订货日期' }, |
| 544 | { key: 'workshopId', label: '生产厂' }, | 546 | { key: 'workshopId', label: '生产厂' }, |
| 547 | + { key: 'unit', label: '单位' }, | ||
| 548 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 545 | ] | 549 | ] |
| 546 | for (const it of checks) { | 550 | for (const it of checks) { |
| 547 | const val = this.form[it.key] | 551 | const val = this.form[it.key] |
| 548 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 552 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 549 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 553 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 550 | } | 554 | } |
| 551 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 555 | + const list = Array.isArray(this.productLineList) ? this.productLineList : [] |
| 556 | + if (list.length === 0) { | ||
| 552 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 557 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 553 | } | 558 | } |
| 554 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 555 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 559 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 560 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 561 | + for (const [idx, it] of list.entries()) { | ||
| 562 | + if ( | ||
| 563 | + strEmpty(it.rawProductName) || | ||
| 564 | + strEmpty(it.industry) || | ||
| 565 | + strEmpty(it.quality) || | ||
| 566 | + strEmpty(it.rawProductGrade) || | ||
| 567 | + numEmpty(it.productQuantity) || | ||
| 568 | + numEmpty(it.unitPrice) || | ||
| 569 | + strEmpty(it.deliveryDate) | ||
| 570 | + ) { | ||
| 556 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 571 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 557 | } | 572 | } |
| 558 | } | 573 | } |
| @@ -580,7 +595,7 @@ export default { | @@ -580,7 +595,7 @@ export default { | ||
| 580 | color: rgba(0, 0, 0, 0.6); | 595 | color: rgba(0, 0, 0, 0.6); |
| 581 | line-height: 32rpx; | 596 | line-height: 32rpx; |
| 582 | width: 240rpx; | 597 | width: 240rpx; |
| 583 | - padding: 24rpx 0; | 598 | + padding: 12rpx 0; |
| 584 | } | 599 | } |
| 585 | .total-item-price { | 600 | .total-item-price { |
| 586 | font-weight: 600; | 601 | font-weight: 600; |
| @@ -602,7 +617,7 @@ export default { | @@ -602,7 +617,7 @@ export default { | ||
| 602 | 617 | ||
| 603 | .scroll { | 618 | .scroll { |
| 604 | flex: 1; | 619 | flex: 1; |
| 605 | - padding: 12rpx 0 480rpx !important; | 620 | + padding: 12rpx 0 392rpx !important; |
| 606 | } | 621 | } |
| 607 | 622 | ||
| 608 | .footer { | 623 | .footer { |
| @@ -204,11 +204,11 @@ export default { | @@ -204,11 +204,11 @@ export default { | ||
| 204 | const t = this.detail.standardApproved || false | 204 | const t = this.detail.standardApproved || false |
| 205 | const e = this.detail.standardShowExamine || false | 205 | const e = this.detail.standardShowExamine || false |
| 206 | return [ | 206 | return [ |
| 207 | - { ...this.buttons[0], visible: (s === 'DRAFT') }, | ||
| 208 | - { ...this.buttons[1], visible: (s === 'DRAFT') }, | ||
| 209 | - { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') }, | ||
| 210 | - { ...this.buttons[3], visible: (s === 'STANDARD' && e && t === 'AUDIT') }, | ||
| 211 | - { ...this.buttons[4], visible: (s === 'STANDARD') } | 207 | + { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:modify')) }, |
| 208 | + { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:delete')) }, | ||
| 209 | + { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:processed-standard-contract:upload')) }, | ||
| 210 | + { ...this.buttons[3], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:approve')) }, | ||
| 211 | + { ...this.buttons[4], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:processed-standard-contract:review')) } | ||
| 212 | ] | 212 | ] |
| 213 | } | 213 | } |
| 214 | }, | 214 | }, |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | @input="onSearchInput" | 14 | @input="onSearchInput" |
| 15 | /> | 15 | /> |
| 16 | <view class="tool-icons"> | 16 | <view class="tool-icons"> |
| 17 | - <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> | 17 | + <image v-if="$auth.hasPermi('contract-manage:processed-standard-contract:add')" class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> |
| 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | </view> | 19 | </view> |
| 20 | </view> | 20 | </view> |
| @@ -206,7 +206,7 @@ export default { | @@ -206,7 +206,7 @@ export default { | ||
| 206 | if (!this.batchMode) this.selectedKeys = [] | 206 | if (!this.batchMode) this.selectedKeys = [] |
| 207 | }, | 207 | }, |
| 208 | onAdd() { | 208 | onAdd() { |
| 209 | - uni.showToast({ title: '点击新增', icon: 'none' }) | 209 | + uni.navigateTo({ url: '/pages/contract_process/add' }) |
| 210 | }, | 210 | }, |
| 211 | fetchList({ pageIndex, pageSize, query, extra }) { | 211 | fetchList({ pageIndex, pageSize, query, extra }) { |
| 212 | console.log('fetchList', pageIndex, pageSize, query, extra) | 212 | console.log('fetchList', pageIndex, pageSize, query, extra) |
| @@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
| 41 | </template> | 41 | </template> |
| 42 | </uni-list-item> | 42 | </uni-list-item> |
| 43 | 43 | ||
| 44 | - <ProductRel mode="add" :orderDateBase="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" /> | 44 | + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :list="productLineList" @change="onProductsChange" :options="productList" /> |
| 45 | 45 | ||
| 46 | <uni-list-item title="合计人民币金额(大写)"> | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | <template v-slot:footer> | 47 | <template v-slot:footer> |
| @@ -99,33 +99,25 @@ | @@ -99,33 +99,25 @@ | ||
| 99 | </template> | 99 | </template> |
| 100 | </uni-list-item> | 100 | </uni-list-item> |
| 101 | 101 | ||
| 102 | - <view class="group"> | ||
| 103 | - <view class="group-title">特别条款要求</view> | ||
| 104 | - <view class="radio-list"> | ||
| 105 | - <view v-for="(opt, i) in specialTermsList" :key="'cr-' + i" class="radio-item" | ||
| 106 | - @click="onRadioSelect('specialTerms', 'specialTermsName', opt)"> | ||
| 107 | - <view :class="['radio', { checked: form.specialTerms === opt.value }]" /> | ||
| 108 | - <text class="label">{{ opt.label }}</text> | ||
| 109 | - </view> | ||
| 110 | - </view> | ||
| 111 | - </view> | ||
| 112 | - <view class="group"> | ||
| 113 | - <view class="group-title">执行标准</view> | ||
| 114 | - <view class="radio-list"> | ||
| 115 | - <view v-for="(opt, i) in executionStandardList" :key="'es-' + i" class="radio-item" | ||
| 116 | - @click="onRadioSelect('executionStandard', 'executionStandardName', opt)"> | ||
| 117 | - <view :class="['radio', { checked: form.executionStandard === opt.value }]" /> | ||
| 118 | - <text class="label">{{ opt.label }}</text> | ||
| 119 | - </view> | ||
| 120 | - </view> | ||
| 121 | - </view> | 102 | + <uni-list-item class="select-item" :class="form.specialTermsName ? 'is-filled' : 'is-empty'" clickable |
| 103 | + @click="openSheet('specialTerms')" :rightText="form.specialTermsName || '请选择'" showArrow> | ||
| 104 | + <template v-slot:body> | ||
| 105 | + <view class="item-title"><text class="required">*</text><text>特别条款要求</text></view> | ||
| 106 | + </template> | ||
| 107 | + </uni-list-item> | ||
| 108 | + <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable | ||
| 109 | + @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> | ||
| 110 | + <template v-slot:body> | ||
| 111 | + <view class="item-title"><text>执行标准</text></view> | ||
| 112 | + </template> | ||
| 113 | + </uni-list-item> | ||
| 122 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> | 114 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | <template v-slot:footer> | 115 | <template v-slot:footer> |
| 124 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" | 116 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | :inputBorder="false" /> | 117 | :inputBorder="false" /> |
| 126 | </template> | 118 | </template> |
| 127 | </uni-list-item> | 119 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | 120 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> |
| 129 | <template v-slot:footer> | 121 | <template v-slot:footer> |
| 130 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> | 122 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | </template> | 123 | </template> |
| @@ -177,15 +169,15 @@ | @@ -177,15 +169,15 @@ | ||
| 177 | <div class="total-text">合计</div> | 169 | <div class="total-text">合计</div> |
| 178 | <div class="total-item"> | 170 | <div class="total-item"> |
| 179 | <div class="total-item-text">数量</div> | 171 | <div class="total-item-text">数量</div> |
| 180 | - <div class="total-item-price">{{ (sumQuantity || 0).toFixed(2) }}t</div> | 172 | + <div class="total-item-price">{{ (totalQuantity || 0).toFixed(2) }}kg</div> |
| 181 | </div> | 173 | </div> |
| 182 | <div class="total-item"> | 174 | <div class="total-item"> |
| 183 | <div class="total-item-text">不含税金额</div> | 175 | <div class="total-item-text">不含税金额</div> |
| 184 | - <div class="total-item-price text-red">¥{{ (sumAmountExcl || 0).toFixed(2) }}</div> | 176 | + <div class="total-item-price text-red">¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}</div> |
| 185 | </div> | 177 | </div> |
| 186 | <div class="total-item"> | 178 | <div class="total-item"> |
| 187 | <div class="total-item-text">总金额</div> | 179 | <div class="total-item-text">总金额</div> |
| 188 | - <div class="total-item-price text-red">¥{{ (sumTotal || 0).toFixed(2) }}</div> | 180 | + <div class="total-item-price text-red">¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}</div> |
| 189 | </div> | 181 | </div> |
| 190 | </div> | 182 | </div> |
| 191 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> | 183 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| @@ -223,6 +215,7 @@ export default { | @@ -223,6 +215,7 @@ export default { | ||
| 223 | workshopId: '', | 215 | workshopId: '', |
| 224 | workshopName: '', | 216 | workshopName: '', |
| 225 | orderDate: '', | 217 | orderDate: '', |
| 218 | + deliveryDate: '', | ||
| 226 | designatedConsignee: '', | 219 | designatedConsignee: '', |
| 227 | specialTerms: '', | 220 | specialTerms: '', |
| 228 | specialTermsName: '', | 221 | specialTermsName: '', |
| @@ -256,9 +249,9 @@ export default { | @@ -256,9 +249,9 @@ export default { | ||
| 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], | 249 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, | 250 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, | 251 | relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }, |
| 259 | - sumQuantity: 0, | ||
| 260 | - sumAmountExcl: 0, | ||
| 261 | - sumTotal: 0, | 252 | + totalQuantity: 0, |
| 253 | + totalAmountExcludingTax: 0, | ||
| 254 | + totalAmountIncludingTax: 0, | ||
| 262 | productLineList: [], | 255 | productLineList: [], |
| 263 | newProductLineList: [], | 256 | newProductLineList: [], |
| 264 | productList: [], | 257 | productList: [], |
| @@ -325,7 +318,7 @@ export default { | @@ -325,7 +318,7 @@ export default { | ||
| 325 | workshopId: m.workshopId || '', | 318 | workshopId: m.workshopId || '', |
| 326 | workshopName: m.workshopName || '', | 319 | workshopName: m.workshopName || '', |
| 327 | } | 320 | } |
| 328 | - const lines = Array.isArray(m.contractDistributorLineList) ? m.contractDistributorLineList : [] | 321 | + const lines = Array.isArray(m.contractStdProcessingLineList) ? m.contractStdProcessingLineList : [] |
| 329 | this.productLineList = lines | 322 | this.productLineList = lines |
| 330 | this.onProductsChange(lines) | 323 | this.onProductsChange(lines) |
| 331 | } catch (e) { } | 324 | } catch (e) { } |
| @@ -347,12 +340,12 @@ export default { | @@ -347,12 +340,12 @@ export default { | ||
| 347 | onProductsChange(products) { | 340 | onProductsChange(products) { |
| 348 | const list = Array.isArray(products) ? products : [] | 341 | const list = Array.isArray(products) ? products : [] |
| 349 | this.newProductLineList = list | 342 | this.newProductLineList = list |
| 350 | - const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.quantity) || 0), 0) | 343 | + const sumQ = list.reduce((acc, it) => acc + (parseFloat(it.productQuantity) || 0), 0) |
| 351 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) | 344 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 352 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) | 345 | const sumT = list.reduce((acc, it) => acc + (parseFloat(it.totalAmount) || 0), 0) |
| 353 | - this.sumQuantity = sumQ | ||
| 354 | - this.sumAmountExcl = sumE | ||
| 355 | - this.sumTotal = sumT | 346 | + this.totalQuantity = sumQ |
| 347 | + this.totalAmountExcludingTax = sumE | ||
| 348 | + this.totalAmountIncludingTax = sumT | ||
| 356 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) | 349 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 357 | }, | 350 | }, |
| 358 | async loadSuppliers() { | 351 | async loadSuppliers() { |
| @@ -403,6 +396,10 @@ export default { | @@ -403,6 +396,10 @@ export default { | ||
| 403 | setSheet('生产厂', opts) | 396 | setSheet('生产厂', opts) |
| 404 | } else if (field === 'supplier') { | 397 | } else if (field === 'supplier') { |
| 405 | setSheet('承揽方', this.supplierList) | 398 | setSheet('承揽方', this.supplierList) |
| 399 | + } else if (field === 'specialTerms') { | ||
| 400 | + setSheet('特别条款要求', this.specialTermsList) | ||
| 401 | + } else if (field === 'executionStandard') { | ||
| 402 | + setSheet('执行标准', this.executionStandardList) | ||
| 406 | } else if (field === 'includesPackagingFee') { | 403 | } else if (field === 'includesPackagingFee') { |
| 407 | setSheet('单价中是否已包含包装费', this.yesNoList) | 404 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 408 | } else if (field === 'includesTransportFee') { | 405 | } else if (field === 'includesTransportFee') { |
| @@ -448,17 +445,30 @@ export default { | @@ -448,17 +445,30 @@ export default { | ||
| 448 | { key: 'buyer', label: '定作方' }, | 445 | { key: 'buyer', label: '定作方' }, |
| 449 | { key: 'orderDate', label: '订货日期' }, | 446 | { key: 'orderDate', label: '订货日期' }, |
| 450 | { key: 'workshopId', label: '生产厂' }, | 447 | { key: 'workshopId', label: '生产厂' }, |
| 448 | + { key: 'unit', label: '单位' }, | ||
| 449 | + { key: 'specialTerms', label: '特别条款要求' }, | ||
| 451 | ] | 450 | ] |
| 452 | for (const it of checks) { | 451 | for (const it of checks) { |
| 453 | const val = this.form[it.key] | 452 | const val = this.form[it.key] |
| 454 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) | 453 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 455 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } | 454 | if (empty) { uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }); return false } |
| 456 | } | 455 | } |
| 457 | - if (!Array.isArray(this.productLineList) || this.productLineList.length === 0) { | 456 | + const list = Array.isArray(this.newProductLineList) ? this.newProductLineList : [] |
| 457 | + if (list.length === 0) { | ||
| 458 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false | 458 | uni.showToast({ title: '请至少添加一条产品明细', icon: 'none' }); return false |
| 459 | } | 459 | } |
| 460 | - for (const [idx, it] of this.productLineList.entries()) { | ||
| 461 | - if (!it.productName || !it.quantity || !it.unitPrice) { | 460 | + const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) |
| 461 | + const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v))) | ||
| 462 | + for (const [idx, it] of list.entries()) { | ||
| 463 | + if ( | ||
| 464 | + strEmpty(it.productName) || | ||
| 465 | + strEmpty(it.industry) || | ||
| 466 | + strEmpty(it.quality) || | ||
| 467 | + strEmpty(it.brand) || | ||
| 468 | + numEmpty(it.productQuantity) || | ||
| 469 | + strEmpty(it.unitPrice) || | ||
| 470 | + strEmpty(it.deliveryDate) | ||
| 471 | + ) { | ||
| 462 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false | 472 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 463 | } | 473 | } |
| 464 | } | 474 | } |
| @@ -493,7 +503,7 @@ export default { | @@ -493,7 +503,7 @@ export default { | ||
| 493 | sumQuantity: this.sumQuantity, | 503 | sumQuantity: this.sumQuantity, |
| 494 | sumAmountExcl: this.sumAmountExcl, | 504 | sumAmountExcl: this.sumAmountExcl, |
| 495 | sumTotal: this.sumTotal, | 505 | sumTotal: this.sumTotal, |
| 496 | - contractDistributorLineList: lines | 506 | + contractStdProcessingLineList: lines |
| 497 | }) | 507 | }) |
| 498 | try { | 508 | try { |
| 499 | await updateContractApi(payload) | 509 | await updateContractApi(payload) |
| @@ -528,7 +538,7 @@ export default { | @@ -528,7 +538,7 @@ export default { | ||
| 528 | color: rgba(0, 0, 0, 0.6); | 538 | color: rgba(0, 0, 0, 0.6); |
| 529 | line-height: 32rpx; | 539 | line-height: 32rpx; |
| 530 | width: 240rpx; | 540 | width: 240rpx; |
| 531 | - padding: 24rpx 0; | 541 | + padding: 12rpx 0; |
| 532 | } | 542 | } |
| 533 | 543 | ||
| 534 | .total-item-price { | 544 | .total-item-price { |
| @@ -551,7 +561,7 @@ export default { | @@ -551,7 +561,7 @@ export default { | ||
| 551 | 561 | ||
| 552 | .scroll { | 562 | .scroll { |
| 553 | flex: 1; | 563 | flex: 1; |
| 554 | - padding: 12rpx 0 480rpx !important; | 564 | + padding: 12rpx 0 392rpx !important; |
| 555 | } | 565 | } |
| 556 | 566 | ||
| 557 | .footer { | 567 | .footer { |