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 | 5 | { color: '#2BA471', bgColor:'#E3F9E9',text: '审核通过' }, |
| 6 | 6 | { color: '#D54941', bgColor:'#FFF0ED',text: '已驳回' }, |
| 7 | 7 | { color: '#3D48A3', bgColor:'#F2F3FF',text: '审核中' }, |
| 8 | + { color: '#000', bgColor:'#F2F3FF',text: '已取消' }, | |
| 8 | 9 | ]; |
| 9 | 10 | |
| 10 | 11 | export const statusMap = { |
| 11 | 12 | '生产中': '#2BA471', |
| 13 | + '审核通过': '#2BA471', | |
| 12 | 14 | '审核中': '#3D48A3', |
| 13 | 15 | '已签收': '#E7E7E7', |
| 16 | + '已取消': '#000', | |
| 14 | 17 | '已发货': '#D54941', |
| 18 | + '已驳回': '#D54941', | |
| 15 | 19 | } |
| 16 | 20 | |
| 17 | 21 | const baseUrl = '/contract'; |
| ... | ... | @@ -23,6 +27,15 @@ export function queryApi(params) { |
| 23 | 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 | 40 | export function querySpecLockApi(params) { |
| 28 | 41 | return request({ | ... | ... |
| ... | ... | @@ -126,4 +126,16 @@ export function getDeptUser() { |
| 126 | 126 | url: '/customerCredit/getDeptUser', |
| 127 | 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 | } |
| \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 | 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 | +} | ... | ... |
| ... | ... | @@ -53,50 +53,50 @@ |
| 53 | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | 54 | </template> |
| 55 | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | |
| 56 | + <uni-list-item title="厚度mm"> | |
| 57 | 57 | <template v-slot:footer> |
| 58 | 58 | <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" /> |
| 59 | 59 | </template> |
| 60 | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | |
| 61 | + <uni-list-item title="厚度公差(单项+)mm"> | |
| 62 | 62 | <template v-slot:footer> |
| 63 | 63 | <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false" |
| 64 | 64 | placeholder="请输入厚度公差(单项+)" /> |
| 65 | 65 | </template> |
| 66 | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | |
| 67 | + <uni-list-item title="厚度公差(单项-)mm"> | |
| 68 | 68 | <template v-slot:footer> |
| 69 | 69 | <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false" |
| 70 | 70 | placeholder="请输入厚度公差(单项-)" /> |
| 71 | 71 | </template> |
| 72 | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | |
| 73 | + <uni-list-item title="宽度mm"> | |
| 74 | 74 | <template v-slot:footer> |
| 75 | 75 | <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" /> |
| 76 | 76 | </template> |
| 77 | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | |
| 78 | + <uni-list-item title="宽度公差(单项+)mm"> | |
| 79 | 79 | <template v-slot:footer> |
| 80 | 80 | <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" /> |
| 81 | 81 | </template> |
| 82 | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | |
| 83 | + <uni-list-item title="宽度公差(单项-)mm"> | |
| 84 | 84 | <template v-slot:footer> |
| 85 | 85 | <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" /> |
| 86 | 86 | </template> |
| 87 | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | |
| 88 | + <uni-list-item title="长度mm"> | |
| 89 | 89 | <template v-slot:footer> |
| 90 | 90 | <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" /> |
| 91 | 91 | </template> |
| 92 | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | |
| 93 | + <uni-list-item title="长度公差(单项+)mm"> | |
| 94 | 94 | <template v-slot:footer> |
| 95 | 95 | <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false" |
| 96 | 96 | placeholder="请输入长度公差(单项+)" /> |
| 97 | 97 | </template> |
| 98 | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | |
| 99 | + <uni-list-item title="长度公差(单项-)mm"> | |
| 100 | 100 | <template v-slot:footer> |
| 101 | 101 | <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false" |
| 102 | 102 | placeholder="请输入长度公差(单项-)" /> |
| ... | ... | @@ -129,7 +129,7 @@ |
| 129 | 129 | </uni-list-item> |
| 130 | 130 | <uni-list-item title="发货日期"> |
| 131 | 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 | 133 | </template> |
| 134 | 134 | </uni-list-item> |
| 135 | 135 | </uni-list> |
| ... | ... | @@ -151,7 +151,30 @@ |
| 151 | 151 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 152 | 152 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 153 | 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 | 178 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 156 | 179 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 157 | 180 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| ... | ... | @@ -162,7 +185,7 @@ |
| 162 | 185 | }}</text></view> |
| 163 | 186 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 164 | 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 | 189 | </view> |
| 167 | 190 | </view> |
| 168 | 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 | 199 | mode: { type: String, default: 'add' }, |
| 177 | 200 | list: { type: Array, default: () => [] }, |
| 178 | 201 | max: { type: Number, default: 8 }, |
| 179 | - orderDateBase: { type: String, default: '' }, | |
| 202 | + deliveryDateBase: { type: String, default: '' }, | |
| 180 | 203 | options: { type: Array, default: () => [] } |
| 181 | 204 | }, |
| 182 | 205 | components: { SingleSelectSheet }, |
| ... | ... | @@ -218,7 +241,7 @@ export default { |
| 218 | 241 | }, |
| 219 | 242 | methods: { |
| 220 | 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 | 246 | onImmediateChange(idx) { |
| 224 | 247 | this.$nextTick(() => this.recalculate(idx)) |
| ... | ... | @@ -319,15 +342,15 @@ export default { |
| 319 | 342 | onDateChange(idx, e) { |
| 320 | 343 | const it = this.items[idx] |
| 321 | 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 | 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 | 348 | const d = new Date(dateStr) |
| 326 | 349 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 327 | 350 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 328 | - it.orderDate = this.orderDateBase | |
| 351 | + it.deliveryDate = this.deliveryDateBase | |
| 329 | 352 | } else { |
| 330 | - it.orderDate = dateStr | |
| 353 | + it.deliveryDate = dateStr | |
| 331 | 354 | } |
| 332 | 355 | this.$set(this.items, idx, it) |
| 333 | 356 | }, |
| ... | ... | @@ -500,8 +523,46 @@ export default { |
| 500 | 523 | |
| 501 | 524 | .value { |
| 502 | 525 | flex: 1; |
| 503 | - text-align: right; | |
| 526 | + // text-align: right; | |
| 504 | 527 | color: rgba(0, 0, 0, 0.9); |
| 505 | 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 | 568 | </style> | ... | ... |
| 1 | 1 | { |
| 2 | - "pages": [{ | |
| 2 | + "pages": [ | |
| 3 | + { | |
| 3 | 4 | "path": "pages/login", |
| 4 | 5 | "style": { |
| 5 | 6 | "navigationBarTitleText": "登录", |
| 6 | 7 | "navigationStyle": "custom" |
| 7 | 8 | } |
| 8 | - }, { | |
| 9 | + }, | |
| 10 | + { | |
| 9 | 11 | "path": "pages/register", |
| 10 | 12 | "style": { |
| 11 | 13 | "navigationBarTitleText": "注册" |
| 12 | 14 | } |
| 13 | - }, { | |
| 15 | + }, | |
| 16 | + { | |
| 14 | 17 | "path": "pages/index", |
| 15 | 18 | "style": { |
| 16 | 19 | "navigationBarTitleText": "首页", |
| 17 | 20 | "navigationStyle": "custom" |
| 18 | 21 | } |
| 19 | - }, { | |
| 22 | + }, | |
| 23 | + { | |
| 20 | 24 | "path": "pages/mine/index", |
| 21 | 25 | "style": { |
| 22 | 26 | "navigationBarTitleText": "我的", |
| 23 | 27 | "navigationBarTextStyle": "white" |
| 24 | 28 | } |
| 25 | - }, { | |
| 29 | + }, | |
| 30 | + { | |
| 26 | 31 | "path": "pages/mine/index2", |
| 27 | 32 | "style": { |
| 28 | 33 | "navigationBarTitleText": "我的2" |
| 29 | 34 | } |
| 30 | - }, { | |
| 35 | + }, | |
| 36 | + { | |
| 31 | 37 | "path": "pages/mine/info/index", |
| 32 | 38 | "style": { |
| 33 | 39 | "navigationBarTitleText": "个人信息" |
| 34 | 40 | } |
| 35 | - }, { | |
| 41 | + }, | |
| 42 | + { | |
| 36 | 43 | "path": "pages/mine/pwd/index", |
| 37 | 44 | "style": { |
| 38 | 45 | "navigationBarTitleText": "修改密码" |
| 39 | 46 | } |
| 40 | - }, { | |
| 47 | + }, | |
| 48 | + { | |
| 41 | 49 | "path": "pages/mine/setting/index", |
| 42 | 50 | "style": { |
| 43 | 51 | "navigationBarTitleText": "应用设置" |
| 44 | 52 | } |
| 45 | - }, { | |
| 53 | + }, | |
| 54 | + { | |
| 46 | 55 | "path": "pages/mine/about/index", |
| 47 | 56 | "style": { |
| 48 | 57 | "navigationBarTitleText": "关于我们" |
| 49 | 58 | } |
| 50 | - }, { | |
| 59 | + }, | |
| 60 | + { | |
| 51 | 61 | "path": "pages/dev_manage/index", |
| 52 | 62 | "style": { |
| 53 | 63 | "navigationBarTitleText": "客户开发管理", |
| 54 | 64 | "navigationBarBackgroundColor": "#ffffff", |
| 55 | 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 | 69 | "path": "pages/dev_manage/add", |
| 73 | 70 | "style": { |
| 74 | 71 | "navigationBarTitleText": "新增客户开发", |
| 75 | 72 | "navigationBarBackgroundColor": "#ffffff", |
| 76 | 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 | 78 | "style": { |
| 116 | - "navigationBarTitleText": "申请客户资信变更", | |
| 79 | + "navigationBarTitleText": "编辑客户开发", | |
| 117 | 80 | "navigationBarBackgroundColor": "#ffffff", |
| 118 | 81 | "navigationBarTextStyle": "black" |
| 119 | 82 | } |
| 120 | - }, { | |
| 121 | - "path": "pages/credit_manage/history_detail", | |
| 83 | + }, | |
| 84 | + { | |
| 85 | + "path": "pages/dev_manage/visit_add", | |
| 122 | 86 | "style": { |
| 123 | - "navigationBarTitleText": "变更记录详情", | |
| 87 | + "navigationBarTitleText": "新增拜访记录", | |
| 124 | 88 | "navigationBarBackgroundColor": "#ffffff", |
| 125 | 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 | 161 | "navigationBarTextStyle": "black" |
| 134 | 162 | } |
| 135 | 163 | }, |
| ... | ... | @@ -149,395 +177,452 @@ |
| 149 | 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 | 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 | 293 | "path": "pages/contract_framework/add", |
| 258 | 294 | "style": { |
| 259 | 295 | "navigationBarTitleText": "新增框架合同", |
| 260 | 296 | "navigationBarBackgroundColor": "#ffffff", |
| 261 | 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 | 325 | "path": "pages/contract_retail/add", |
| 286 | 326 | "style": { |
| 287 | 327 | "navigationBarTitleText": "新增经销标准合同", |
| 288 | 328 | "navigationBarBackgroundColor": "#ffffff", |
| 289 | 329 | "navigationBarTextStyle": "black" |
| 290 | 330 | } |
| 291 | - },{ | |
| 331 | + }, | |
| 332 | + { | |
| 292 | 333 | "path": "pages/contract_retail/detail", |
| 293 | 334 | "style": { |
| 294 | 335 | "navigationBarTitleText": "经销标准合同详情", |
| 295 | 336 | "navigationBarBackgroundColor": "#ffffff", |
| 296 | 337 | "navigationBarTextStyle": "black" |
| 297 | 338 | } |
| 298 | - },{ | |
| 339 | + }, | |
| 340 | + { | |
| 299 | 341 | "path": "pages/contract_retail/modify", |
| 300 | 342 | "style": { |
| 301 | 343 | "navigationBarTitleText": "编辑经销标准合同", |
| 302 | 344 | "navigationBarBackgroundColor": "#ffffff", |
| 303 | 345 | "navigationBarTextStyle": "black" |
| 304 | 346 | } |
| 305 | - },{ | |
| 347 | + }, | |
| 348 | + { | |
| 306 | 349 | "path": "pages/contract_stock/index", |
| 307 | 350 | "style": { |
| 308 | 351 | "navigationBarTitleText": "经销库存合同", |
| 309 | 352 | "navigationBarBackgroundColor": "#ffffff", |
| 310 | 353 | "navigationBarTextStyle": "black" |
| 311 | 354 | } |
| 312 | - }, { | |
| 355 | + }, | |
| 356 | + { | |
| 313 | 357 | "path": "pages/contract_stock/add", |
| 314 | 358 | "style": { |
| 315 | 359 | "navigationBarTitleText": "新增经销库存合同", |
| 316 | 360 | "navigationBarBackgroundColor": "#ffffff", |
| 317 | 361 | "navigationBarTextStyle": "black" |
| 318 | 362 | } |
| 319 | - },{ | |
| 363 | + }, | |
| 364 | + { | |
| 320 | 365 | "path": "pages/contract_stock/detail", |
| 321 | 366 | "style": { |
| 322 | 367 | "navigationBarTitleText": "经销库存合同详情", |
| 323 | 368 | "navigationBarBackgroundColor": "#ffffff", |
| 324 | 369 | "navigationBarTextStyle": "black" |
| 325 | 370 | } |
| 326 | - },{ | |
| 371 | + }, | |
| 372 | + { | |
| 327 | 373 | "path": "pages/contract_stock/modify", |
| 328 | 374 | "style": { |
| 329 | 375 | "navigationBarTitleText": "编辑经销库存合同", |
| 330 | 376 | "navigationBarBackgroundColor": "#ffffff", |
| 331 | 377 | "navigationBarTextStyle": "black" |
| 332 | 378 | } |
| 333 | - },{ | |
| 379 | + }, | |
| 380 | + { | |
| 334 | 381 | "path": "pages/contract_stock/lock", |
| 335 | 382 | "style": { |
| 336 | 383 | "navigationBarTitleText": "锁价", |
| 337 | 384 | "navigationBarBackgroundColor": "#ffffff", |
| 338 | 385 | "navigationBarTextStyle": "black" |
| 339 | 386 | } |
| 340 | - },{ | |
| 387 | + }, | |
| 388 | + { | |
| 341 | 389 | "path": "pages/contract_unplan/index", |
| 342 | 390 | "style": { |
| 343 | 391 | "navigationBarTitleText": "经销未锁规合同", |
| 344 | 392 | "navigationBarBackgroundColor": "#ffffff", |
| 345 | 393 | "navigationBarTextStyle": "black" |
| 346 | 394 | } |
| 347 | - },{ | |
| 395 | + }, | |
| 396 | + { | |
| 348 | 397 | "path": "pages/contract_unplan/add", |
| 349 | 398 | "style": { |
| 350 | 399 | "navigationBarTitleText": "新增经销未锁规合同", |
| 351 | 400 | "navigationBarBackgroundColor": "#ffffff", |
| 352 | 401 | "navigationBarTextStyle": "black" |
| 353 | 402 | } |
| 354 | - },{ | |
| 403 | + }, | |
| 404 | + { | |
| 355 | 405 | "path": "pages/contract_unplan/detail", |
| 356 | 406 | "style": { |
| 357 | 407 | "navigationBarTitleText": "经销未锁规合同详情", |
| 358 | 408 | "navigationBarBackgroundColor": "#ffffff", |
| 359 | 409 | "navigationBarTextStyle": "black" |
| 360 | 410 | } |
| 361 | - },{ | |
| 411 | + }, | |
| 412 | + { | |
| 362 | 413 | "path": "pages/contract_unplan/modify", |
| 363 | 414 | "style": { |
| 364 | 415 | "navigationBarTitleText": "编辑经销未锁规合同", |
| 365 | 416 | "navigationBarBackgroundColor": "#ffffff", |
| 366 | 417 | "navigationBarTextStyle": "black" |
| 367 | 418 | } |
| 368 | - },{ | |
| 419 | + }, | |
| 420 | + { | |
| 369 | 421 | "path": "pages/contract_unplan/lock", |
| 370 | 422 | "style": { |
| 371 | 423 | "navigationBarTitleText": "锁规", |
| 372 | 424 | "navigationBarBackgroundColor": "#ffffff", |
| 373 | 425 | "navigationBarTextStyle": "black" |
| 374 | 426 | } |
| 375 | - }, { | |
| 427 | + }, | |
| 428 | + { | |
| 376 | 429 | "path": "pages/contract_unplan/lock_apply", |
| 377 | 430 | "style": { |
| 378 | 431 | "navigationBarTitleText": "锁规延期申请", |
| 379 | 432 | "navigationBarBackgroundColor": "#ffffff", |
| 380 | 433 | "navigationBarTextStyle": "black" |
| 381 | 434 | } |
| 382 | - },{ | |
| 435 | + }, | |
| 436 | + { | |
| 383 | 437 | "path": "pages/contract_process/index", |
| 384 | 438 | "style": { |
| 385 | 439 | "navigationBarTitleText": "加工标准合同", |
| 386 | 440 | "navigationBarBackgroundColor": "#ffffff", |
| 387 | 441 | "navigationBarTextStyle": "black" |
| 388 | 442 | } |
| 389 | - },{ | |
| 443 | + }, | |
| 444 | + { | |
| 390 | 445 | "path": "pages/contract_process/add", |
| 391 | 446 | "style": { |
| 392 | 447 | "navigationBarTitleText": "新增加工标准合同", |
| 393 | 448 | "navigationBarBackgroundColor": "#ffffff", |
| 394 | 449 | "navigationBarTextStyle": "black" |
| 395 | 450 | } |
| 396 | - },{ | |
| 451 | + }, | |
| 452 | + { | |
| 397 | 453 | "path": "pages/contract_process/detail", |
| 398 | 454 | "style": { |
| 399 | 455 | "navigationBarTitleText": "加工标准合同详情", |
| 400 | 456 | "navigationBarBackgroundColor": "#ffffff", |
| 401 | 457 | "navigationBarTextStyle": "black" |
| 402 | 458 | } |
| 403 | - },{ | |
| 459 | + }, | |
| 460 | + { | |
| 404 | 461 | "path": "pages/contract_process/modify", |
| 405 | 462 | "style": { |
| 406 | 463 | "navigationBarTitleText": "编辑加工标准合同", |
| 407 | 464 | "navigationBarBackgroundColor": "#ffffff", |
| 408 | 465 | "navigationBarTextStyle": "black" |
| 409 | 466 | } |
| 410 | - }, { | |
| 467 | + }, | |
| 468 | + { | |
| 411 | 469 | "path": "pages/contract_foreign_std/index", |
| 412 | 470 | "style": { |
| 413 | 471 | "navigationBarTitleText": "外贸标准合同", |
| 414 | 472 | "navigationBarBackgroundColor": "#ffffff", |
| 415 | 473 | "navigationBarTextStyle": "black" |
| 416 | 474 | } |
| 417 | - },{ | |
| 475 | + }, | |
| 476 | + { | |
| 418 | 477 | "path": "pages/contract_foreign_std/add", |
| 419 | 478 | "style": { |
| 420 | 479 | "navigationBarTitleText": "新增外贸标准合同", |
| 421 | 480 | "navigationBarBackgroundColor": "#ffffff", |
| 422 | 481 | "navigationBarTextStyle": "black" |
| 423 | 482 | } |
| 424 | - },{ | |
| 483 | + }, | |
| 484 | + { | |
| 425 | 485 | "path": "pages/contract_foreign_std/detail", |
| 426 | 486 | "style": { |
| 427 | 487 | "navigationBarTitleText": "外贸标准合同详情", |
| 428 | 488 | "navigationBarBackgroundColor": "#ffffff", |
| 429 | 489 | "navigationBarTextStyle": "black" |
| 430 | 490 | } |
| 431 | - },{ | |
| 491 | + }, | |
| 492 | + { | |
| 432 | 493 | "path": "pages/contract_foreign_std/modify", |
| 433 | 494 | "style": { |
| 434 | 495 | "navigationBarTitleText": "编辑外贸标准合同", |
| 435 | 496 | "navigationBarBackgroundColor": "#ffffff", |
| 436 | 497 | "navigationBarTextStyle": "black" |
| 437 | 498 | } |
| 438 | - }, { | |
| 499 | + }, | |
| 500 | + { | |
| 439 | 501 | "path": "pages/contract_foreign_stock/index", |
| 440 | 502 | "style": { |
| 441 | 503 | "navigationBarTitleText": "外贸库存合同", |
| 442 | 504 | "navigationBarBackgroundColor": "#ffffff", |
| 443 | 505 | "navigationBarTextStyle": "black" |
| 444 | 506 | } |
| 445 | - },{ | |
| 507 | + }, | |
| 508 | + { | |
| 446 | 509 | "path": "pages/contract_foreign_stock/add", |
| 447 | 510 | "style": { |
| 448 | 511 | "navigationBarTitleText": "新增外贸库存合同", |
| 449 | 512 | "navigationBarBackgroundColor": "#ffffff", |
| 450 | 513 | "navigationBarTextStyle": "black" |
| 451 | 514 | } |
| 452 | - },{ | |
| 515 | + }, | |
| 516 | + { | |
| 453 | 517 | "path": "pages/contract_foreign_stock/detail", |
| 454 | 518 | "style": { |
| 455 | 519 | "navigationBarTitleText": "外贸库存合同详情", |
| 456 | 520 | "navigationBarBackgroundColor": "#ffffff", |
| 457 | 521 | "navigationBarTextStyle": "black" |
| 458 | 522 | } |
| 459 | - },{ | |
| 523 | + }, | |
| 524 | + { | |
| 460 | 525 | "path": "pages/contract_foreign_stock/modify", |
| 461 | 526 | "style": { |
| 462 | 527 | "navigationBarTitleText": "编辑外贸库存合同", |
| 463 | 528 | "navigationBarBackgroundColor": "#ffffff", |
| 464 | 529 | "navigationBarTextStyle": "black" |
| 465 | 530 | } |
| 466 | - },{ | |
| 531 | + }, | |
| 532 | + { | |
| 467 | 533 | "path": "pages/contract_foreign_stock/lock", |
| 468 | 534 | "style": { |
| 469 | 535 | "navigationBarTitleText": "锁价", |
| 470 | 536 | "navigationBarBackgroundColor": "#ffffff", |
| 471 | 537 | "navigationBarTextStyle": "black" |
| 472 | 538 | } |
| 473 | - },{ | |
| 539 | + }, | |
| 540 | + { | |
| 474 | 541 | "path": "pages/contract_foreign_unplan/index", |
| 475 | 542 | "style": { |
| 476 | 543 | "navigationBarTitleText": "外贸未锁规合同", |
| 477 | 544 | "navigationBarBackgroundColor": "#ffffff", |
| 478 | 545 | "navigationBarTextStyle": "black" |
| 479 | 546 | } |
| 480 | - },{ | |
| 547 | + }, | |
| 548 | + { | |
| 481 | 549 | "path": "pages/contract_foreign_unplan/add", |
| 482 | 550 | "style": { |
| 483 | 551 | "navigationBarTitleText": "新增外贸未锁规合同", |
| 484 | 552 | "navigationBarBackgroundColor": "#ffffff", |
| 485 | 553 | "navigationBarTextStyle": "black" |
| 486 | 554 | } |
| 487 | - },{ | |
| 555 | + }, | |
| 556 | + { | |
| 488 | 557 | "path": "pages/contract_foreign_unplan/detail", |
| 489 | 558 | "style": { |
| 490 | 559 | "navigationBarTitleText": "外贸未锁规合同详情", |
| 491 | 560 | "navigationBarBackgroundColor": "#ffffff", |
| 492 | 561 | "navigationBarTextStyle": "black" |
| 493 | 562 | } |
| 494 | - },{ | |
| 563 | + }, | |
| 564 | + { | |
| 495 | 565 | "path": "pages/contract_foreign_unplan/modify", |
| 496 | 566 | "style": { |
| 497 | 567 | "navigationBarTitleText": "编辑外贸未锁规合同", |
| 498 | 568 | "navigationBarBackgroundColor": "#ffffff", |
| 499 | 569 | "navigationBarTextStyle": "black" |
| 500 | 570 | } |
| 501 | - },{ | |
| 571 | + }, | |
| 572 | + { | |
| 502 | 573 | "path": "pages/contract_foreign_unplan/lock", |
| 503 | 574 | "style": { |
| 504 | 575 | "navigationBarTitleText": "锁规", |
| 505 | 576 | "navigationBarBackgroundColor": "#ffffff", |
| 506 | 577 | "navigationBarTextStyle": "black" |
| 507 | 578 | } |
| 508 | - },{ | |
| 579 | + }, | |
| 580 | + { | |
| 509 | 581 | "path": "pages/contract_foreign_unplan/lock_apply", |
| 510 | 582 | "style": { |
| 511 | 583 | "navigationBarTitleText": "锁规延期申请", |
| 512 | 584 | "navigationBarBackgroundColor": "#ffffff", |
| 513 | 585 | "navigationBarTextStyle": "black" |
| 514 | 586 | } |
| 515 | - },{ | |
| 587 | + }, | |
| 588 | + { | |
| 516 | 589 | "path": "pages/contract_unlocked_operation/detail", |
| 517 | 590 | "style": { |
| 518 | 591 | "navigationBarTitleText": "锁价无规格操作申请单详情", |
| 519 | 592 | "navigationBarBackgroundColor": "#ffffff", |
| 520 | 593 | "navigationBarTextStyle": "black" |
| 521 | 594 | } |
| 522 | - },{ | |
| 595 | + }, | |
| 596 | + { | |
| 523 | 597 | "path": "pages/contract_unlocked_operation/modify", |
| 524 | 598 | "style": { |
| 525 | 599 | "navigationBarTitleText": "编辑锁价无规格操作申请单", |
| 526 | 600 | "navigationBarBackgroundColor": "#ffffff", |
| 527 | 601 | "navigationBarTextStyle": "black" |
| 528 | 602 | } |
| 529 | - },{ | |
| 603 | + }, | |
| 604 | + { | |
| 530 | 605 | "path": "pages/contract_unlocked_operation/index", |
| 531 | 606 | "style": { |
| 532 | 607 | "navigationBarTitleText": "锁价无规格操作申请单", |
| 533 | 608 | "navigationBarBackgroundColor": "#ffffff", |
| 534 | 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 | 623 | "root": "pages-business", |
| 540 | - "pages": [{ | |
| 624 | + "pages": [ | |
| 625 | + { | |
| 541 | 626 | "path": "purchase/config", |
| 542 | 627 | "style": { |
| 543 | 628 | "navigationBarTitleText": "采购设置" |
| ... | ... | @@ -571,7 +656,8 @@ |
| 571 | 656 | }, |
| 572 | 657 | { |
| 573 | 658 | "root": "pages-data", |
| 574 | - "pages": [{ | |
| 659 | + "pages": [ | |
| 660 | + { | |
| 575 | 661 | "path": "address/index", |
| 576 | 662 | "style": { |
| 577 | 663 | "navigationBarTitleText": "地址管理" |
| ... | ... | @@ -656,17 +742,20 @@ |
| 656 | 742 | "color": "rgba(0,0,0,0.9)", |
| 657 | 743 | "backgroundColor": "#ffffff", |
| 658 | 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 | 760 | "globalStyle": { |
| 672 | 761 | "navigationBarTitleText": "ERP", | ... | ... |
| ... | ... | @@ -37,14 +37,14 @@ |
| 37 | 37 | |
| 38 | 38 | <uni-list-item title="交货方式"> |
| 39 | 39 | <template v-slot:footer> |
| 40 | - <uni-easyinput v-model="form.deliveryMethod" placeholder="请输入交货方式" :inputBorder="false" /> | |
| 40 | + <view class="readonly-text">{{ form.deliveryMethod }}</view> | |
| 41 | 41 | </template> |
| 42 | 42 | </uni-list-item> |
| 43 | 43 | </view> |
| 44 | 44 | |
| 45 | 45 | <!-- 产品 --> |
| 46 | 46 | <view class="section2"> |
| 47 | - <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" /> | |
| 47 | + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :orderDate="form.orderDate" /> | |
| 48 | 48 | </view> |
| 49 | 49 | |
| 50 | 50 | <view class="section"> |
| ... | ... | @@ -69,17 +69,6 @@ |
| 69 | 69 | </view> |
| 70 | 70 | </template> |
| 71 | 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 | 72 | <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable |
| 84 | 73 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> |
| 85 | 74 | <template v-slot:body> |
| ... | ... | @@ -91,6 +80,11 @@ |
| 91 | 80 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> |
| 92 | 81 | </template> |
| 93 | 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 | 88 | </view> |
| 95 | 89 | |
| 96 | 90 | |
| ... | ... | @@ -185,6 +179,7 @@ export default { |
| 185 | 179 | packagingFee: '', |
| 186 | 180 | executionStandard: '', |
| 187 | 181 | executionStandardRemarks: '', |
| 182 | + changeDescription: '', | |
| 188 | 183 | totalQuantity: '', |
| 189 | 184 | afterTotalQuantity: '', |
| 190 | 185 | pieceWeightHeader: '', |
| ... | ... | @@ -297,7 +292,7 @@ export default { |
| 297 | 292 | delete next.id |
| 298 | 293 | delete next.status |
| 299 | 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 | 296 | this.initPurchaseOrderLineList = lines |
| 302 | 297 | const sum = lines.reduce((acc, it) => { |
| 303 | 298 | const v = Number(it && it.quantity) | ... | ... |
| ... | ... | @@ -29,10 +29,10 @@ |
| 29 | 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> |
| 30 | 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> |
| 31 | 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 | 32 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', |
| 34 | 33 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> |
| 35 | 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 | 36 | </view> |
| 37 | 37 | |
| 38 | 38 | <view class="title-header"> |
| ... | ... | @@ -102,11 +102,11 @@ export default { |
| 102 | 102 | displayButtons() { |
| 103 | 103 | const f = this.statusFlags |
| 104 | 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 | 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入订货单位或订单编号" clearButton="auto" |
| 6 | 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="onSearchConfirm" |
| 7 | 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 | 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 10 | 10 | </view> |
| 11 | 11 | </view> |
| ... | ... | @@ -17,8 +17,9 @@ |
| 17 | 17 | <view class="card" @click.stop="onCardClick(item)"> |
| 18 | 18 | <view class="card-header"> |
| 19 | 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 | 23 | </view> |
| 23 | 24 | <view class="info-row"><text>订单编号</text><text>{{ item.orderNo }}</text></view> |
| 24 | 25 | <view class="info-row"><text>生产厂</text><text>{{ item.workshopName }}</text></view> |
| ... | ... | @@ -289,12 +290,12 @@ export default { |
| 289 | 290 | } |
| 290 | 291 | |
| 291 | 292 | text { |
| 292 | - width: 60%; | |
| 293 | + width: 50%; | |
| 293 | 294 | line-height: 32rpx; |
| 295 | + word-wrap: break-word; | |
| 294 | 296 | |
| 295 | 297 | &:last-child { |
| 296 | 298 | color: rgba(0, 0, 0, 0.9); |
| 297 | - width: 40%; | |
| 298 | 299 | } |
| 299 | 300 | } |
| 300 | 301 | } | ... | ... |
| ... | ... | @@ -36,14 +36,14 @@ |
| 36 | 36 | |
| 37 | 37 | <uni-list-item title="交货方式"> |
| 38 | 38 | <template v-slot:footer> |
| 39 | - <uni-easyinput v-model="form.deliveryMethod" placeholder="请输入交货方式" :inputBorder="false" /> | |
| 39 | + <view class="readonly-text">{{ form.deliveryMethod }}</view> | |
| 40 | 40 | </template> |
| 41 | 41 | </uni-list-item> |
| 42 | 42 | </view> |
| 43 | 43 | |
| 44 | 44 | <!-- 产品 --> |
| 45 | 45 | <view class="section2"> |
| 46 | - <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" /> | |
| 46 | + <Product mode="add" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange" :orderDate="form.orderDate" /> | |
| 47 | 47 | </view> |
| 48 | 48 | |
| 49 | 49 | <view class="section"> |
| ... | ... | @@ -68,17 +68,6 @@ |
| 68 | 68 | </view> |
| 69 | 69 | </template> |
| 70 | 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 | 71 | <uni-list-item class="select-item" :class="form.executionStandardName ? 'is-filled' : 'is-empty'" clickable |
| 83 | 72 | @click="openSheet('executionStandard')" :rightText="form.executionStandardName || '请选择'" showArrow> |
| 84 | 73 | <template v-slot:body> |
| ... | ... | @@ -90,6 +79,11 @@ |
| 90 | 79 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入标准" :inputBorder="false" /> |
| 91 | 80 | </template> |
| 92 | 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 | 87 | </view> |
| 94 | 88 | |
| 95 | 89 | |
| ... | ... | @@ -182,6 +176,7 @@ export default { |
| 182 | 176 | packagingFee: '', |
| 183 | 177 | executionStandard: '', |
| 184 | 178 | executionStandardRemarks: '', |
| 179 | + changeDescription: '', | |
| 185 | 180 | totalQuantity: '', |
| 186 | 181 | afterTotalQuantity: '', |
| 187 | 182 | pieceWeightHeader: '', | ... | ... |
| ... | ... | @@ -34,58 +34,74 @@ |
| 34 | 34 | </template> |
| 35 | 35 | </uni-list-item> |
| 36 | 36 | <view v-show="!item.collapsed"> |
| 37 | - <uni-list-item title="厚度"> | |
| 37 | + <uni-list-item title="厚度(mm)"> | |
| 38 | 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 | 43 | </template> |
| 42 | 44 | </uni-list-item> |
| 43 | - <uni-list-item title="厚度公差 +"> | |
| 45 | + <uni-list-item title="厚度公差 +(mm)"> | |
| 44 | 46 | <template v-slot:footer> |
| 45 | 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 | 51 | </template> |
| 48 | 52 | </uni-list-item> |
| 49 | - <uni-list-item title="厚度公差 -"> | |
| 53 | + <uni-list-item title="厚度公差 -(mm)"> | |
| 50 | 54 | <template v-slot:footer> |
| 51 | 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 | 59 | </template> |
| 54 | 60 | </uni-list-item> |
| 55 | - <uni-list-item title="宽度"> | |
| 61 | + <uni-list-item title="宽度(mm)"> | |
| 56 | 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 | 66 | </template> |
| 60 | 67 | </uni-list-item> |
| 61 | - <uni-list-item title="宽度公差 +"> | |
| 68 | + <uni-list-item title="宽度公差 +(mm)"> | |
| 62 | 69 | <template v-slot:footer> |
| 63 | 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 | 74 | </template> |
| 66 | 75 | </uni-list-item> |
| 67 | - <uni-list-item title="宽度公差 -"> | |
| 76 | + <uni-list-item title="宽度公差 -(mm)"> | |
| 68 | 77 | <template v-slot:footer> |
| 69 | 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 | 82 | </template> |
| 72 | 83 | </uni-list-item> |
| 73 | - <uni-list-item title="长度"> | |
| 84 | + <uni-list-item title="长度(mm)"> | |
| 74 | 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 | 89 | </template> |
| 78 | 90 | </uni-list-item> |
| 79 | - <uni-list-item title="长度公差 +"> | |
| 91 | + <uni-list-item title="长度公差 +(mm)"> | |
| 80 | 92 | <template v-slot:footer> |
| 81 | 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 | 97 | </template> |
| 84 | 98 | </uni-list-item> |
| 85 | - <uni-list-item title="长度公差 -"> | |
| 99 | + <uni-list-item title="长度公差 -(mm)"> | |
| 86 | 100 | <template v-slot:footer> |
| 87 | 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 | 105 | </template> |
| 90 | 106 | </uni-list-item> |
| 91 | 107 | <uni-list-item title="状态"> |
| ... | ... | @@ -95,19 +111,38 @@ |
| 95 | 111 | </uni-list-item> |
| 96 | 112 | <uni-list-item title="数量kg"> |
| 97 | 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 | 118 | </template> |
| 101 | 119 | </uni-list-item> |
| 102 | 120 | <uni-list-item v-if="item.showSalesPrice" title="销售价格"> |
| 103 | 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 | 140 | </template> |
| 107 | 141 | </uni-list-item> |
| 108 | 142 | <uni-list-item title="发货日期"> |
| 109 | 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 | 146 | </template> |
| 112 | 147 | </uni-list-item> |
| 113 | 148 | <uni-list-item title="考核超协"> |
| ... | ... | @@ -167,10 +202,12 @@ |
| 167 | 202 | <!-- showSalesPrice 判断是否显示 --> |
| 168 | 203 | <view class="row" v-if="item.showSalesPrice"><text class="label">销售价格</text><text class="value">{{ |
| 169 | 204 | item.salesPrice }}</text></view> |
| 205 | + <view class="row"><text class="label">包装费</text><text class="value">{{ | |
| 206 | + item.packagingFee }}</text></view> | |
| 170 | 207 | <view class="row"><text class="label">发货日期</text><text class="value">{{ item.deliveryDate }}</text> |
| 171 | 208 | </view> |
| 172 | 209 | <view class="row"><text class="label">考核超协</text><text class="value">{{ item.assessmentExceedsAgreement |
| 173 | - }}</text></view> | |
| 210 | + }}</text></view> | |
| 174 | 211 | </view> |
| 175 | 212 | <view class="view-total"> |
| 176 | 213 | <view class="head">合计</view> |
| ... | ... | @@ -191,7 +228,8 @@ export default { |
| 191 | 228 | mode: { type: String, default: 'add' }, |
| 192 | 229 | list: { type: Array, default: () => [] }, |
| 193 | 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 | 234 | data() { |
| 197 | 235 | return { |
| ... | ... | @@ -200,6 +238,21 @@ export default { |
| 200 | 238 | } |
| 201 | 239 | }, |
| 202 | 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 | 257 | watch: { |
| 205 | 258 | items: { |
| ... | ... | @@ -247,7 +300,7 @@ export default { |
| 247 | 300 | assessmentExceedsAgreement: '' |
| 248 | 301 | } |
| 249 | 302 | }, |
| 250 | - | |
| 303 | + | |
| 251 | 304 | onAdd() { |
| 252 | 305 | if (this.items.length >= this.max) return uni.showToast({ title: `最多添加${this.max}个`, icon: 'none' }) |
| 253 | 306 | const obj = this.defaultItem() |
| ... | ... | @@ -307,6 +360,29 @@ export default { |
| 307 | 360 | }, |
| 308 | 361 | toggleViewCollapse() { |
| 309 | 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 | 29 | <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view> |
| 30 | 30 | <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view> |
| 31 | 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 | 32 | <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD', |
| 34 | 33 | form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view> |
| 35 | 34 | <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ |
| 36 | 35 | form.executionStandardRemarks }}</text></view> |
| 36 | + <view class="row"><text class="label">变更说明</text><text class="value">{{ | |
| 37 | + form.changeDescription }}</text></view> | |
| 37 | 38 | </view> |
| 38 | 39 | |
| 39 | 40 | <view class="title-header"> | ... | ... |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | 40 | </template> |
| 41 | 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 | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | 44 | <template v-slot:footer> |
| 45 | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| ... | ... | @@ -92,33 +92,25 @@ |
| 92 | 92 | :inputBorder="false" /> |
| 93 | 93 | </template> |
| 94 | 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 | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | 108 | <template v-slot:footer> |
| 117 | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | 110 | :inputBorder="false" /> |
| 119 | 111 | </template> |
| 120 | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | |
| 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 122 | 114 | <template v-slot:footer> |
| 123 | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | 116 | </template> |
| ... | ... | @@ -181,23 +173,23 @@ |
| 181 | 173 | 数量 |
| 182 | 174 | </div> |
| 183 | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | |
| 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg | |
| 185 | 177 | </div> |
| 186 | 178 | </div> |
| 187 | - <div class="total-item"> | |
| 179 | + <!-- <div class="total-item"> | |
| 188 | 180 | <div class="total-item-text"> |
| 189 | 181 | 不含税金额 |
| 190 | 182 | </div> |
| 191 | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 193 | 185 | </div> |
| 194 | - </div> | |
| 186 | + </div> --> | |
| 195 | 187 | <div class="total-item"> |
| 196 | 188 | <div class="total-item-text"> |
| 197 | 189 | 总金额 |
| 198 | 190 | </div> |
| 199 | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 201 | 193 | </div> |
| 202 | 194 | </div> |
| 203 | 195 | </div> |
| ... | ... | @@ -233,6 +225,7 @@ export default { |
| 233 | 225 | buyer: '', |
| 234 | 226 | buyerName: '', |
| 235 | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | |
| 236 | 229 | designatedConsignee: '', |
| 237 | 230 | specialTerms: '', |
| 238 | 231 | specialTermsName: '', |
| ... | ... | @@ -243,7 +236,7 @@ export default { |
| 243 | 236 | includesPackagingFeeName: '', |
| 244 | 237 | includesTransportFee: false, |
| 245 | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | |
| 239 | + unit: '美元、公斤、元美/公斤', | |
| 247 | 240 | totalAmountCapital: '', |
| 248 | 241 | destinationId: [], |
| 249 | 242 | destinationLabel: '', |
| ... | ... | @@ -263,9 +256,9 @@ export default { |
| 263 | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | 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 | 262 | productLineList: [], |
| 270 | 263 | productList: [], |
| 271 | 264 | customerRemarks: [], |
| ... | ... | @@ -365,11 +358,11 @@ export default { |
| 365 | 358 | onProductsChange(products) { |
| 366 | 359 | const list = Array.isArray(products) ? products : [] |
| 367 | 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 | 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 | 366 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 374 | 367 | this.productLineList = list |
| 375 | 368 | }, |
| ... | ... | @@ -445,6 +438,10 @@ export default { |
| 445 | 438 | setSheet('生产厂', opts) |
| 446 | 439 | } else if (field === 'supplier') { |
| 447 | 440 | setSheet('供方', this.supplierList) |
| 441 | + } else if (field === 'specialTerms') { | |
| 442 | + setSheet('特别条款要求', this.specialTermsList) | |
| 443 | + } else if (field === 'executionStandard') { | |
| 444 | + setSheet('执行标准', this.executionStandardList) | |
| 448 | 445 | } else if (field === 'includesPackagingFee') { |
| 449 | 446 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 450 | 447 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -515,9 +512,9 @@ export default { |
| 515 | 512 | ...formForSubmit, |
| 516 | 513 | destination, |
| 517 | 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 | 518 | contractDistributorLineList: lines |
| 522 | 519 | }) |
| 523 | 520 | console.log('onSubmit__payload', payload) |
| ... | ... | @@ -536,18 +533,31 @@ export default { |
| 536 | 533 | { key: 'supplier', label: '供方' }, |
| 537 | 534 | { key: 'buyer', label: '需方' }, |
| 538 | 535 | { key: 'orderDate', label: '订货日期' }, |
| 536 | + { key: 'unit', label: '单位' }, | |
| 539 | 537 | { key: 'workshopId', label: '生产厂' }, |
| 538 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 540 | 539 | ] |
| 541 | 540 | for (const it of checks) { |
| 542 | 541 | const val = this.form[it.key] |
| 543 | 542 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 544 | 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 | 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 | 561 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 552 | 562 | } |
| 553 | 563 | } |
| ... | ... | @@ -575,7 +585,7 @@ export default { |
| 575 | 585 | color: rgba(0, 0, 0, 0.6); |
| 576 | 586 | line-height: 32rpx; |
| 577 | 587 | width: 240rpx; |
| 578 | - padding: 24rpx 0; | |
| 588 | + padding: 12rpx 0; | |
| 579 | 589 | } |
| 580 | 590 | .total-item-price { |
| 581 | 591 | font-weight: 600; |
| ... | ... | @@ -597,7 +607,7 @@ export default { |
| 597 | 607 | |
| 598 | 608 | .scroll { |
| 599 | 609 | flex: 1; |
| 600 | - padding: 12rpx 0 480rpx !important; | |
| 610 | + padding: 12rpx 0 392rpx !important; | |
| 601 | 611 | } |
| 602 | 612 | |
| 603 | 613 | .footer { | ... | ... |
| ... | ... | @@ -211,12 +211,12 @@ export default { |
| 211 | 211 | const t = this.detail.standardApproved || false |
| 212 | 212 | const e = this.detail.standardShowExamine || false |
| 213 | 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 | 14 | @input="onSearchInput" |
| 15 | 15 | /> |
| 16 | 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 | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | 19 | </view> |
| 20 | 20 | </view> | ... | ... |
| ... | ... | @@ -40,9 +40,7 @@ |
| 40 | 40 | <uni-easyinput v-model="form.unit" :inputBorder="false" disabled /> |
| 41 | 41 | </template> |
| 42 | 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 | 44 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | 45 | <template v-slot:footer> |
| 48 | 46 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" |
| ... | ... | @@ -98,34 +96,25 @@ |
| 98 | 96 | :inputBorder="false" /> |
| 99 | 97 | </template> |
| 100 | 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 | 111 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | 112 | <template v-slot:footer> |
| 124 | 113 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | 114 | :inputBorder="false" /> |
| 126 | 115 | </template> |
| 127 | 116 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | |
| 117 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 129 | 118 | <template v-slot:footer> |
| 130 | 119 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | 120 | </template> |
| ... | ... | @@ -177,15 +166,15 @@ |
| 177 | 166 | <div class="total-text">合计</div> |
| 178 | 167 | <div class="total-item"> |
| 179 | 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 | 170 | </div> |
| 182 | - <div class="total-item"> | |
| 171 | + <!-- <div class="total-item"> | |
| 183 | 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 | 175 | <div class="total-item"> |
| 187 | 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 | 178 | </div> |
| 190 | 179 | </div> |
| 191 | 180 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| ... | ... | @@ -223,6 +212,7 @@ export default { |
| 223 | 212 | workshopId: '', |
| 224 | 213 | workshopName: '', |
| 225 | 214 | orderDate: '', |
| 215 | + deliveryDate: '', | |
| 226 | 216 | designatedConsignee: '', |
| 227 | 217 | specialTerms: '', |
| 228 | 218 | specialTermsName: '', |
| ... | ... | @@ -233,7 +223,7 @@ export default { |
| 233 | 223 | includesPackagingFeeName: '', |
| 234 | 224 | includesTransportFee: false, |
| 235 | 225 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | |
| 226 | + unit: '美元、公斤、美元/公斤', | |
| 237 | 227 | totalAmountCapital: '', |
| 238 | 228 | depositInfo: '', |
| 239 | 229 | packagingRequirements: '', |
| ... | ... | @@ -256,9 +246,9 @@ export default { |
| 256 | 246 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | 247 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | 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 | 252 | productLineList: [], |
| 263 | 253 | newProductLineList: [], |
| 264 | 254 | productList: [] |
| ... | ... | @@ -347,11 +337,11 @@ export default { |
| 347 | 337 | const list = Array.isArray(products) ? products : [] |
| 348 | 338 | this.newProductLineList = list |
| 349 | 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 | 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 | 345 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | 346 | }, |
| 357 | 347 | async loadSuppliers() { |
| ... | ... | @@ -399,6 +389,10 @@ export default { |
| 399 | 389 | setSheet('生产厂', opts) |
| 400 | 390 | } else if (field === 'supplier') { |
| 401 | 391 | setSheet('供方', this.supplierList) |
| 392 | + } else if (field === 'specialTerms') { | |
| 393 | + setSheet('特别条款要求', this.specialTermsList) | |
| 394 | + } else if (field === 'executionStandard') { | |
| 395 | + setSheet('执行标准', this.executionStandardList) | |
| 402 | 396 | } else if (field === 'includesPackagingFee') { |
| 403 | 397 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | 398 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -443,18 +437,32 @@ export default { |
| 443 | 437 | { key: 'supplier', label: '供方' }, |
| 444 | 438 | { key: 'buyer', label: '需方' }, |
| 445 | 439 | { key: 'orderDate', label: '订货日期' }, |
| 440 | + { key: 'unit', label: '单位' }, | |
| 446 | 441 | { key: 'workshopId', label: '生产厂' }, |
| 442 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 447 | 443 | ] |
| 448 | 444 | for (const it of checks) { |
| 449 | 445 | const val = this.form[it.key] |
| 450 | 446 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | 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 | 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 | 466 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | 467 | } |
| 460 | 468 | } |
| ... | ... | @@ -479,25 +487,25 @@ export default { |
| 479 | 487 | return out |
| 480 | 488 | } |
| 481 | 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 | 532 | color: rgba(0, 0, 0, 0.6); |
| 525 | 533 | line-height: 32rpx; |
| 526 | 534 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | |
| 535 | + padding: 12rpx 0; | |
| 528 | 536 | } |
| 529 | 537 | |
| 530 | 538 | .total-item-price { |
| ... | ... | @@ -547,7 +555,7 @@ export default { |
| 547 | 555 | |
| 548 | 556 | .scroll { |
| 549 | 557 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | |
| 558 | + padding: 12rpx 0 392rpx !important; | |
| 551 | 559 | } |
| 552 | 560 | |
| 553 | 561 | .footer { | ... | ... |
| ... | ... | @@ -53,53 +53,53 @@ |
| 53 | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | 54 | </template> |
| 55 | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | |
| 56 | + <uni-list-item title="厚度(mm)"> | |
| 57 | 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 | 59 | </template> |
| 60 | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | |
| 61 | + <uni-list-item title="厚度公差上限(mm)"> | |
| 62 | 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 | 65 | </template> |
| 66 | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | |
| 67 | + <uni-list-item title="厚度公差下限(mm)"> | |
| 68 | 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 | 71 | </template> |
| 72 | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | |
| 73 | + <uni-list-item title="宽度(mm)"> | |
| 74 | 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 | 76 | </template> |
| 77 | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | |
| 78 | + <uni-list-item title="宽度公差上限(mm)"> | |
| 79 | 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 | 81 | </template> |
| 82 | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | |
| 83 | + <uni-list-item title="宽度公差下限(mm)"> | |
| 84 | 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 | 86 | </template> |
| 87 | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | |
| 88 | + <uni-list-item title="长度(mm)"> | |
| 89 | 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 | 91 | </template> |
| 92 | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | |
| 93 | + <uni-list-item title="长度公差上限(mm)"> | |
| 94 | 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 | 97 | </template> |
| 98 | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | |
| 99 | + <uni-list-item title="长度公差下限(mm)"> | |
| 100 | 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 | 103 | </template> |
| 104 | 104 | </uni-list-item> |
| 105 | 105 | <uni-list-item title="状态"> |
| ... | ... | @@ -109,12 +109,12 @@ |
| 109 | 109 | </uni-list-item> |
| 110 | 110 | <uni-list-item title="数量"> |
| 111 | 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 | 113 | </template> |
| 114 | 114 | </uni-list-item> |
| 115 | 115 | <uni-list-item title="单价"> |
| 116 | 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 | 118 | </template> |
| 119 | 119 | </uni-list-item> |
| 120 | 120 | <uni-list-item title="外贸加工费"> |
| ... | ... | @@ -122,11 +122,11 @@ |
| 122 | 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> |
| 123 | 123 | </template> |
| 124 | 124 | </uni-list-item> |
| 125 | - <uni-list-item title="不含税金额"> | |
| 125 | + <!-- <uni-list-item title="不含税金额"> | |
| 126 | 126 | <template v-slot:footer> |
| 127 | 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 128 | 128 | </template> |
| 129 | - </uni-list-item> | |
| 129 | + </uni-list-item> --> | |
| 130 | 130 | <uni-list-item title="总金额"> |
| 131 | 131 | <template v-slot:footer> |
| 132 | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| ... | ... | @@ -134,7 +134,7 @@ |
| 134 | 134 | </uni-list-item> |
| 135 | 135 | <uni-list-item title="发货日期"> |
| 136 | 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 | 138 | </template> |
| 139 | 139 | </uni-list-item> |
| 140 | 140 | </uni-list> |
| ... | ... | @@ -156,18 +156,41 @@ |
| 156 | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 157 | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 158 | 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 | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 161 | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 162 | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 163 | 186 | }}</text> |
| 164 | 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 | 189 | formatCurrency(item.amountExcludingTax) |
| 167 | - }}</text></view> | |
| 190 | + }}</text></view> --> | |
| 168 | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 169 | 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 | 194 | </view> |
| 172 | 195 | </view> |
| 173 | 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 | 204 | mode: { type: String, default: 'add' }, |
| 182 | 205 | list: { type: Array, default: () => [] }, |
| 183 | 206 | max: { type: Number, default: 8 }, |
| 184 | - orderDateBase: { type: String, default: '' }, | |
| 207 | + deliveryDateBase: { type: String, default: '' }, | |
| 208 | + deliveryDate: { type: String, default: '' }, | |
| 185 | 209 | options: { type: Array, default: () => [] } |
| 186 | 210 | }, |
| 187 | 211 | components: { SingleSelectSheet }, |
| ... | ... | @@ -199,6 +223,21 @@ export default { |
| 199 | 223 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), |
| 200 | 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 | 243 | watch: { |
| ... | ... | @@ -223,10 +262,18 @@ export default { |
| 223 | 262 | }, |
| 224 | 263 | methods: { |
| 225 | 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 | 278 | toNumber(val) { |
| 232 | 279 | if (typeof val === 'number') return isNaN(val) ? 0 : val |
| ... | ... | @@ -239,21 +286,21 @@ export default { |
| 239 | 286 | const m = Math.pow(10, digits) |
| 240 | 287 | return Math.round(n * m) / m |
| 241 | 288 | }, |
| 242 | - onNumberBlur(idx, field, digits) { | |
| 289 | + onNonNegativeBlur(idx, field, digits) { | |
| 243 | 290 | const it = this.items[idx] |
| 244 | 291 | if (!it) return |
| 245 | 292 | const raw = it[field] |
| 246 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | |
| 247 | 293 | if (raw === '' || raw === null || raw === undefined) { |
| 248 | 294 | this.$set(this.items, idx, it) |
| 249 | - this.recalculate(idx) | |
| 295 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 250 | 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 | 300 | const rounded = this.round(num, digits) |
| 254 | 301 | it[field] = rounded |
| 255 | 302 | this.$set(this.items, idx, it) |
| 256 | - this.recalculate(idx) | |
| 303 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 257 | 304 | }, |
| 258 | 305 | formatCurrency(val) { |
| 259 | 306 | if (val == null || val === '') return '' |
| ... | ... | @@ -291,8 +338,8 @@ export default { |
| 291 | 338 | const qty = this.toNumber(it.quantity) |
| 292 | 339 | const price = this.toNumber(it.unitPrice) |
| 293 | 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 | 343 | this.$set(this.items, idx, next) |
| 297 | 344 | }, |
| 298 | 345 | recalculateAll() { |
| ... | ... | @@ -324,15 +371,15 @@ export default { |
| 324 | 371 | onDateChange(idx, e) { |
| 325 | 372 | const it = this.items[idx] |
| 326 | 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 | 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 | 377 | const d = new Date(dateStr) |
| 331 | 378 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 332 | 379 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 333 | - it.orderDate = this.orderDateBase | |
| 380 | + it.deliveryDate = this.deliveryDateBase | |
| 334 | 381 | } else { |
| 335 | - it.orderDate = dateStr | |
| 382 | + it.deliveryDate = dateStr | |
| 336 | 383 | } |
| 337 | 384 | this.$set(this.items, idx, it) |
| 338 | 385 | }, |
| ... | ... | @@ -388,12 +435,13 @@ export default { |
| 388 | 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 | 447 | .block { |
| ... | ... | @@ -504,8 +552,46 @@ export default { |
| 504 | 552 | |
| 505 | 553 | .value { |
| 506 | 554 | flex: 1; |
| 507 | - text-align: right; | |
| 555 | + // text-align: right; | |
| 508 | 556 | color: rgba(0, 0, 0, 0.9); |
| 509 | 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 | 597 | </style> | ... | ... |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | 40 | </template> |
| 41 | 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 | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | 44 | <template v-slot:footer> |
| 45 | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| ... | ... | @@ -92,33 +92,25 @@ |
| 92 | 92 | :inputBorder="false" /> |
| 93 | 93 | </template> |
| 94 | 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 | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | 108 | <template v-slot:footer> |
| 117 | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | 110 | :inputBorder="false" /> |
| 119 | 111 | </template> |
| 120 | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | |
| 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 122 | 114 | <template v-slot:footer> |
| 123 | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | 116 | </template> |
| ... | ... | @@ -181,23 +173,23 @@ |
| 181 | 173 | 数量 |
| 182 | 174 | </div> |
| 183 | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | |
| 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg | |
| 185 | 177 | </div> |
| 186 | 178 | </div> |
| 187 | - <div class="total-item"> | |
| 179 | + <!-- <div class="total-item"> | |
| 188 | 180 | <div class="total-item-text"> |
| 189 | 181 | 不含税金额 |
| 190 | 182 | </div> |
| 191 | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 193 | 185 | </div> |
| 194 | - </div> | |
| 186 | + </div> --> | |
| 195 | 187 | <div class="total-item"> |
| 196 | 188 | <div class="total-item-text"> |
| 197 | 189 | 总金额 |
| 198 | 190 | </div> |
| 199 | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 201 | 193 | </div> |
| 202 | 194 | </div> |
| 203 | 195 | </div> |
| ... | ... | @@ -233,6 +225,7 @@ export default { |
| 233 | 225 | buyer: '', |
| 234 | 226 | buyerName: '', |
| 235 | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | |
| 236 | 229 | designatedConsignee: '', |
| 237 | 230 | specialTerms: '', |
| 238 | 231 | specialTermsName: '', |
| ... | ... | @@ -243,7 +236,7 @@ export default { |
| 243 | 236 | includesPackagingFeeName: '', |
| 244 | 237 | includesTransportFee: false, |
| 245 | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | |
| 239 | + unit: '美元、公斤、美元/公斤', | |
| 247 | 240 | totalAmountCapital: '', |
| 248 | 241 | destinationId: [], |
| 249 | 242 | destinationLabel: '', |
| ... | ... | @@ -263,9 +256,9 @@ export default { |
| 263 | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | 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 | 262 | productLineList: [], |
| 270 | 263 | productList: [], |
| 271 | 264 | customerRemarks: [], |
| ... | ... | @@ -367,11 +360,11 @@ export default { |
| 367 | 360 | onProductsChange(products) { |
| 368 | 361 | const list = Array.isArray(products) ? products : [] |
| 369 | 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 | 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 | 368 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 376 | 369 | this.productLineList = list |
| 377 | 370 | }, |
| ... | ... | @@ -447,6 +440,10 @@ export default { |
| 447 | 440 | setSheet('生产厂', opts) |
| 448 | 441 | } else if (field === 'supplier') { |
| 449 | 442 | setSheet('供方', this.supplierList) |
| 443 | + } else if (field === 'specialTerms') { | |
| 444 | + setSheet('特别条款要求', this.specialTermsList) | |
| 445 | + } else if (field === 'executionStandard') { | |
| 446 | + setSheet('执行标准', this.executionStandardList) | |
| 450 | 447 | } else if (field === 'includesPackagingFee') { |
| 451 | 448 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 452 | 449 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -517,9 +514,9 @@ export default { |
| 517 | 514 | ...formForSubmit, |
| 518 | 515 | destination, |
| 519 | 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 | 520 | contractDistributorLineList: lines |
| 524 | 521 | }) |
| 525 | 522 | console.log('onSubmit__payload', payload) |
| ... | ... | @@ -538,18 +535,30 @@ export default { |
| 538 | 535 | { key: 'supplier', label: '供方' }, |
| 539 | 536 | { key: 'buyer', label: '需方' }, |
| 540 | 537 | { key: 'orderDate', label: '订货日期' }, |
| 538 | + { key: 'unit', label: '单位' }, | |
| 541 | 539 | { key: 'workshopId', label: '生产厂' }, |
| 540 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 542 | 541 | ] |
| 543 | 542 | for (const it of checks) { |
| 544 | 543 | const val = this.form[it.key] |
| 545 | 544 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 546 | 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 | 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 | 562 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 554 | 563 | } |
| 555 | 564 | } |
| ... | ... | @@ -577,7 +586,7 @@ export default { |
| 577 | 586 | color: rgba(0, 0, 0, 0.6); |
| 578 | 587 | line-height: 32rpx; |
| 579 | 588 | width: 240rpx; |
| 580 | - padding: 24rpx 0; | |
| 589 | + padding: 12rpx 0; | |
| 581 | 590 | } |
| 582 | 591 | .total-item-price { |
| 583 | 592 | font-weight: 600; |
| ... | ... | @@ -599,7 +608,7 @@ export default { |
| 599 | 608 | |
| 600 | 609 | .scroll { |
| 601 | 610 | flex: 1; |
| 602 | - padding: 12rpx 0 480rpx !important; | |
| 611 | + padding: 12rpx 0 392rpx !important; | |
| 603 | 612 | } |
| 604 | 613 | |
| 605 | 614 | .footer { | ... | ... |
| ... | ... | @@ -53,13 +53,13 @@ |
| 53 | 53 | }}</text></view> |
| 54 | 54 | </view> |
| 55 | 55 | |
| 56 | - <view class="section" v-if="status === 'STANDARD'"> | |
| 56 | + <view class="section" v-if="detail.status === 'STANDARD'"> | |
| 57 | 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 58 | 58 | detail.standardFileName || '-' }}</text></view> |
| 59 | 59 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ |
| 60 | 60 | detail.standardStandardized ? '是' : '否' }}</text></view> |
| 61 | 61 | </view> |
| 62 | - <view class="section" v-if="status === 'FORMAL'"> | |
| 62 | + <view class="section" v-if="detail.status === 'FORMAL'"> | |
| 63 | 63 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 64 | 64 | detail.formalFileName || '-' }}</text></view> |
| 65 | 65 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized |
| ... | ... | @@ -265,19 +265,19 @@ export default { |
| 265 | 265 | const e = this.detail.showExamine || false |
| 266 | 266 | const f = this.detail.standardShowExamine || false |
| 267 | 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 | 14 | @input="onSearchInput" |
| 15 | 15 | /> |
| 16 | 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 | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | 19 | </view> |
| 20 | 20 | </view> |
| ... | ... | @@ -61,7 +61,9 @@ |
| 61 | 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> |
| 62 | 62 | </view> |
| 63 | 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 | 67 | </view> |
| 66 | 68 | <view class="info-row"> |
| 67 | 69 | <text>订货日期</text><text>{{ item.orderDate }}</text> | ... | ... |
| ... | ... | @@ -108,23 +108,23 @@ |
| 108 | 108 | 数量 |
| 109 | 109 | </div> |
| 110 | 110 | <div class="total-item-price"> |
| 111 | - {{ (sumQuantity || 0).toFixed(2) }}t | |
| 111 | + {{ (totalQuantity || 0).toFixed(2) }}kg | |
| 112 | 112 | </div> |
| 113 | 113 | </div> |
| 114 | - <div class="total-item"> | |
| 114 | + <!-- <div class="total-item"> | |
| 115 | 115 | <div class="total-item-text"> |
| 116 | 116 | 不含税金额 |
| 117 | 117 | </div> |
| 118 | 118 | <div class="total-item-price text-red"> |
| 119 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 119 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 120 | 120 | </div> |
| 121 | - </div> | |
| 121 | + </div> --> | |
| 122 | 122 | <div class="total-item"> |
| 123 | 123 | <div class="total-item-text"> |
| 124 | 124 | 总金额 |
| 125 | 125 | </div> |
| 126 | 126 | <div class="total-item-price text-red"> |
| 127 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 127 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 128 | 128 | </div> |
| 129 | 129 | </div> |
| 130 | 130 | </div> |
| ... | ... | @@ -147,15 +147,15 @@ export default { |
| 147 | 147 | } |
| 148 | 148 | }, |
| 149 | 149 | computed: { |
| 150 | - sumQuantity() { | |
| 150 | + totalQuantity() { | |
| 151 | 151 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) |
| 152 | 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 | 159 | totalAmount() { |
| 160 | 160 | let sum = 0 |
| 161 | 161 | for (const it of this.items) { |
| ... | ... | @@ -213,7 +213,7 @@ export default { |
| 213 | 213 | status: v.status || '', |
| 214 | 214 | quantity: v.productQuantity || v.quantity || '', |
| 215 | 215 | unitPrice: v.unitPrice || '', |
| 216 | - amountExcludingTax: v.amountExcludingTax || 0, | |
| 216 | + // amountExcludingTax: v.amountExcludingTax || 0, | |
| 217 | 217 | totalAmount: v.totalAmount || 0, |
| 218 | 218 | deliveryDate: v.deliveryDate || '', |
| 219 | 219 | specDisplay: '' |
| ... | ... | @@ -255,8 +255,8 @@ export default { |
| 255 | 255 | const qty = this.toNumber(it.quantity) |
| 256 | 256 | const price = this.toNumber(it.unitPrice) |
| 257 | 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 | 260 | it.totalAmount = total |
| 261 | 261 | this.$set(this.items, idx, it) |
| 262 | 262 | }, |
| ... | ... | @@ -292,7 +292,7 @@ export default { |
| 292 | 292 | ...it, |
| 293 | 293 | quantity: '', |
| 294 | 294 | unitPrice: '', |
| 295 | - amountExcludingTax: 0 | |
| 295 | + // amountExcludingTax: 0 | |
| 296 | 296 | })) |
| 297 | 297 | }, |
| 298 | 298 | async onSubmit() { |
| ... | ... | @@ -301,12 +301,12 @@ export default { |
| 301 | 301 | const qty = this.toNumber(it.quantity) |
| 302 | 302 | const price = this.toNumber(it.unitPrice) |
| 303 | 303 | const total = this.toNumber(it.totalAmount) |
| 304 | - const excl = this.toNumber(it.amountExcludingTax) | |
| 304 | + // const excl = this.toNumber(it.amountExcludingTax) | |
| 305 | 305 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty |
| 306 | 306 | else raw.quantity = qty |
| 307 | 307 | raw.unitPrice = price |
| 308 | 308 | raw.totalAmount = total |
| 309 | - raw.amountExcludingTax = excl | |
| 309 | + // raw.amountExcludingTax = excl | |
| 310 | 310 | return raw |
| 311 | 311 | }) |
| 312 | 312 | if (!selected.length) { |
| ... | ... | @@ -325,9 +325,9 @@ export default { |
| 325 | 325 | const payload = { |
| 326 | 326 | id: this.id, |
| 327 | 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 | 331 | type:'INTL_INVENTORY_AGMT', |
| 332 | 332 | contractDistributorLineList: selected |
| 333 | 333 | } |
| ... | ... | @@ -362,7 +362,7 @@ export default { |
| 362 | 362 | |
| 363 | 363 | .scroll { |
| 364 | 364 | flex: 1; |
| 365 | - padding: 12rpx 0 480rpx !important; | |
| 365 | + padding: 12rpx 0 392rpx !important; | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | .header { |
| ... | ... | @@ -646,7 +646,7 @@ export default { |
| 646 | 646 | color: rgba(0, 0, 0, 0.6); |
| 647 | 647 | line-height: 32rpx; |
| 648 | 648 | width: 240rpx; |
| 649 | - padding: 24rpx 0; | |
| 649 | + padding: 12rpx 0; | |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | .total-item-price { | ... | ... |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | </template> |
| 42 | 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 | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | 47 | <template v-slot:footer> |
| ... | ... | @@ -98,34 +98,25 @@ |
| 98 | 98 | :inputBorder="false" /> |
| 99 | 99 | </template> |
| 100 | 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 | 113 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | 114 | <template v-slot:footer> |
| 124 | 115 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | 116 | :inputBorder="false" /> |
| 126 | 117 | </template> |
| 127 | 118 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | |
| 119 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 129 | 120 | <template v-slot:footer> |
| 130 | 121 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | 122 | </template> |
| ... | ... | @@ -177,15 +168,15 @@ |
| 177 | 168 | <div class="total-text">合计</div> |
| 178 | 169 | <div class="total-item"> |
| 179 | 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 | 172 | </div> |
| 182 | - <div class="total-item"> | |
| 173 | + <!-- <div class="total-item"> | |
| 183 | 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 | 177 | <div class="total-item"> |
| 187 | 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 | 180 | </div> |
| 190 | 181 | </div> |
| 191 | 182 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| ... | ... | @@ -223,6 +214,7 @@ export default { |
| 223 | 214 | workshopId: '', |
| 224 | 215 | workshopName: '', |
| 225 | 216 | orderDate: '', |
| 217 | + deliveryDate: '', | |
| 226 | 218 | designatedConsignee: '', |
| 227 | 219 | specialTerms: '', |
| 228 | 220 | specialTermsName: '', |
| ... | ... | @@ -233,7 +225,7 @@ export default { |
| 233 | 225 | includesPackagingFeeName: '', |
| 234 | 226 | includesTransportFee: false, |
| 235 | 227 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | |
| 228 | + unit: '美元、公斤、美元/公斤', | |
| 237 | 229 | totalAmountCapital: '', |
| 238 | 230 | depositInfo: '', |
| 239 | 231 | packagingRequirements: '', |
| ... | ... | @@ -256,9 +248,9 @@ export default { |
| 256 | 248 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | 249 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | 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 | 254 | productLineList: [], |
| 263 | 255 | newProductLineList: [], |
| 264 | 256 | productList: [] |
| ... | ... | @@ -347,11 +339,11 @@ export default { |
| 347 | 339 | const list = Array.isArray(products) ? products : [] |
| 348 | 340 | this.newProductLineList = list |
| 349 | 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 | 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 | 347 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | 348 | }, |
| 357 | 349 | async loadSuppliers() { |
| ... | ... | @@ -399,6 +391,10 @@ export default { |
| 399 | 391 | setSheet('生产厂', opts) |
| 400 | 392 | } else if (field === 'supplier') { |
| 401 | 393 | setSheet('供方', this.supplierList) |
| 394 | + } else if (field === 'specialTerms') { | |
| 395 | + setSheet('特别条款要求', this.specialTermsList) | |
| 396 | + } else if (field === 'executionStandard') { | |
| 397 | + setSheet('执行标准', this.executionStandardList) | |
| 402 | 398 | } else if (field === 'includesPackagingFee') { |
| 403 | 399 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | 400 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -443,18 +439,30 @@ export default { |
| 443 | 439 | { key: 'supplier', label: '供方' }, |
| 444 | 440 | { key: 'buyer', label: '需方' }, |
| 445 | 441 | { key: 'orderDate', label: '订货日期' }, |
| 442 | + { key: 'unit', label: '单位' }, | |
| 446 | 443 | { key: 'workshopId', label: '生产厂' }, |
| 444 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 447 | 445 | ] |
| 448 | 446 | for (const it of checks) { |
| 449 | 447 | const val = this.form[it.key] |
| 450 | 448 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | 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 | 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 | 466 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | 467 | } |
| 460 | 468 | } |
| ... | ... | @@ -486,9 +494,9 @@ export default { |
| 486 | 494 | id: this.form.id, |
| 487 | 495 | destination, |
| 488 | 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 | 500 | contractDistributorLineList: lines |
| 493 | 501 | }) |
| 494 | 502 | try { |
| ... | ... | @@ -524,7 +532,7 @@ export default { |
| 524 | 532 | color: rgba(0, 0, 0, 0.6); |
| 525 | 533 | line-height: 32rpx; |
| 526 | 534 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | |
| 535 | + padding: 12rpx 0; | |
| 528 | 536 | } |
| 529 | 537 | |
| 530 | 538 | .total-item-price { |
| ... | ... | @@ -547,7 +555,7 @@ export default { |
| 547 | 555 | |
| 548 | 556 | .scroll { |
| 549 | 557 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | |
| 558 | + padding: 12rpx 0 392rpx !important; | |
| 551 | 559 | } |
| 552 | 560 | |
| 553 | 561 | .footer { | ... | ... |
| ... | ... | @@ -53,53 +53,53 @@ |
| 53 | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | 54 | </template> |
| 55 | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | |
| 56 | + <uni-list-item title="厚度(mm)"> | |
| 57 | 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 | 59 | </template> |
| 60 | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | |
| 61 | + <uni-list-item title="厚度公差上限(mm)"> | |
| 62 | 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 | 65 | </template> |
| 66 | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | |
| 67 | + <uni-list-item title="厚度公差下限(mm)"> | |
| 68 | 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 | 71 | </template> |
| 72 | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | |
| 73 | + <uni-list-item title="宽度(mm)"> | |
| 74 | 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 | 76 | </template> |
| 77 | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | |
| 78 | + <uni-list-item title="宽度公差上限(mm)"> | |
| 79 | 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 | 81 | </template> |
| 82 | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | |
| 83 | + <uni-list-item title="宽度公差下限(mm)"> | |
| 84 | 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 | 86 | </template> |
| 87 | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | |
| 88 | + <uni-list-item title="长度(mm)"> | |
| 89 | 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 | 91 | </template> |
| 92 | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | |
| 93 | + <uni-list-item title="长度公差上限(mm)"> | |
| 94 | 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 | 97 | </template> |
| 98 | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | |
| 99 | + <uni-list-item title="长度公差下限(mm)"> | |
| 100 | 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 | 103 | </template> |
| 104 | 104 | </uni-list-item> |
| 105 | 105 | <uni-list-item title="状态"> |
| ... | ... | @@ -109,7 +109,7 @@ |
| 109 | 109 | </uni-list-item> |
| 110 | 110 | <uni-list-item title="数量"> |
| 111 | 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 | 113 | </template> |
| 114 | 114 | </uni-list-item> |
| 115 | 115 | <uni-list-item title="单价"> |
| ... | ... | @@ -122,11 +122,11 @@ |
| 122 | 122 | <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" /> |
| 123 | 123 | </template> |
| 124 | 124 | </uni-list-item> |
| 125 | - <uni-list-item title="不含税金额"> | |
| 125 | + <!-- <uni-list-item title="不含税金额"> | |
| 126 | 126 | <template v-slot:footer> |
| 127 | 127 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 128 | 128 | </template> |
| 129 | - </uni-list-item> | |
| 129 | + </uni-list-item> --> | |
| 130 | 130 | <uni-list-item title="总金额"> |
| 131 | 131 | <template v-slot:footer> |
| 132 | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| ... | ... | @@ -134,7 +134,7 @@ |
| 134 | 134 | </uni-list-item> |
| 135 | 135 | <uni-list-item title="发货日期"> |
| 136 | 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 | 138 | </template> |
| 139 | 139 | </uni-list-item> |
| 140 | 140 | </uni-list> |
| ... | ... | @@ -156,18 +156,41 @@ |
| 156 | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 157 | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 158 | 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 | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 161 | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 162 | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 163 | 186 | }}</text> |
| 164 | 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 | 189 | formatCurrency(item.amountExcludingTax) |
| 167 | - }}</text></view> | |
| 190 | + }}</text></view> --> | |
| 168 | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 169 | 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 | 194 | </view> |
| 172 | 195 | </view> |
| 173 | 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 | 204 | mode: { type: String, default: 'add' }, |
| 182 | 205 | list: { type: Array, default: () => [] }, |
| 183 | 206 | max: { type: Number, default: 8 }, |
| 184 | - orderDateBase: { type: String, default: '' }, | |
| 207 | + deliveryDateBase: { type: String, default: '' }, | |
| 208 | + deliveryDate: { type: String, default: '' }, | |
| 185 | 209 | options: { type: Array, default: () => [] } |
| 186 | 210 | }, |
| 187 | 211 | components: { SingleSelectSheet }, |
| ... | ... | @@ -192,15 +216,6 @@ export default { |
| 192 | 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 | 219 | watch: { |
| 205 | 220 | items: { |
| 206 | 221 | handler() { this.emitChange() }, |
| ... | ... | @@ -221,9 +236,44 @@ export default { |
| 221 | 236 | this.items = init |
| 222 | 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 | 263 | methods: { |
| 225 | 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 | 278 | onImmediateChange(idx) { |
| 229 | 279 | this.$nextTick(() => this.recalculate(idx)) |
| ... | ... | @@ -239,21 +289,21 @@ export default { |
| 239 | 289 | const m = Math.pow(10, digits) |
| 240 | 290 | return Math.round(n * m) / m |
| 241 | 291 | }, |
| 242 | - onNumberBlur(idx, field, digits) { | |
| 292 | + onNonNegativeBlur(idx, field, digits) { | |
| 243 | 293 | const it = this.items[idx] |
| 244 | 294 | if (!it) return |
| 245 | 295 | const raw = it[field] |
| 246 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | |
| 247 | 296 | if (raw === '' || raw === null || raw === undefined) { |
| 248 | 297 | this.$set(this.items, idx, it) |
| 249 | - this.recalculate(idx) | |
| 298 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 250 | 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 | 303 | const rounded = this.round(num, digits) |
| 254 | 304 | it[field] = rounded |
| 255 | 305 | this.$set(this.items, idx, it) |
| 256 | - this.recalculate(idx) | |
| 306 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 257 | 307 | }, |
| 258 | 308 | formatCurrency(val) { |
| 259 | 309 | if (val == null || val === '') return '' |
| ... | ... | @@ -269,9 +319,9 @@ export default { |
| 269 | 319 | return [t, w, l].filter(Boolean).join(' × ') |
| 270 | 320 | }, |
| 271 | 321 | openProductSheet(idx) { |
| 272 | - const opts = this.selectOptions | |
| 322 | + const opts = Array.isArray(this.selectOptions) ? this.selectOptions : [] | |
| 273 | 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 | 325 | this.sheet = { ...this.sheet, visible: true, title: '请选择产品', options: opts, idx, value: match ? match.value : '' } |
| 276 | 326 | }, |
| 277 | 327 | onProductConfirm({ value, label }) { |
| ... | ... | @@ -285,14 +335,14 @@ export default { |
| 285 | 335 | this.emitChange() |
| 286 | 336 | }, |
| 287 | 337 | recalculate(idx) { |
| 288 | - const TAX_RATE = 0.13 | |
| 338 | + // const TAX_RATE = 0.13 | |
| 289 | 339 | const it = this.items[idx] |
| 290 | 340 | if (!it) return |
| 291 | 341 | const qty = this.toNumber(it.quantity) |
| 292 | 342 | const price = this.toNumber(it.unitPrice) |
| 293 | 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 | 346 | this.$set(this.items, idx, next) |
| 297 | 347 | }, |
| 298 | 348 | recalculateAll() { |
| ... | ... | @@ -324,15 +374,15 @@ export default { |
| 324 | 374 | onDateChange(idx, e) { |
| 325 | 375 | const it = this.items[idx] |
| 326 | 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 | 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 | 380 | const d = new Date(dateStr) |
| 331 | 381 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 332 | 382 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 333 | - it.orderDate = this.orderDateBase | |
| 383 | + it.deliveryDate = this.deliveryDateBase | |
| 334 | 384 | } else { |
| 335 | - it.orderDate = dateStr | |
| 385 | + it.deliveryDate = dateStr | |
| 336 | 386 | } |
| 337 | 387 | this.$set(this.items, idx, it) |
| 338 | 388 | }, |
| ... | ... | @@ -505,8 +555,46 @@ export default { |
| 505 | 555 | |
| 506 | 556 | .value { |
| 507 | 557 | flex: 1; |
| 508 | - text-align: right; | |
| 558 | + // text-align: right; | |
| 509 | 559 | color: rgba(0, 0, 0, 0.9); |
| 510 | 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 | 600 | </style> | ... | ... |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | 40 | </template> |
| 41 | 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 | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | 44 | <template v-slot:footer> |
| 45 | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| ... | ... | @@ -92,33 +92,25 @@ |
| 92 | 92 | :inputBorder="false" /> |
| 93 | 93 | </template> |
| 94 | 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 | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | 108 | <template v-slot:footer> |
| 117 | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | 110 | :inputBorder="false" /> |
| 119 | 111 | </template> |
| 120 | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | |
| 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 122 | 114 | <template v-slot:footer> |
| 123 | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | 116 | </template> |
| ... | ... | @@ -180,24 +172,24 @@ |
| 180 | 172 | <div class="total-item-text"> |
| 181 | 173 | 数量 |
| 182 | 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 | 177 | </div> |
| 186 | 178 | </div> |
| 187 | - <div class="total-item"> | |
| 179 | + <!-- <div class="total-item"> | |
| 188 | 180 | <div class="total-item-text"> |
| 189 | 181 | 不含税金额 |
| 190 | 182 | </div> |
| 191 | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 193 | 185 | </div> |
| 194 | - </div> | |
| 186 | + </div> --> | |
| 195 | 187 | <div class="total-item"> |
| 196 | 188 | <div class="total-item-text"> |
| 197 | 189 | 总金额 |
| 198 | 190 | </div> |
| 199 | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 201 | 193 | </div> |
| 202 | 194 | </div> |
| 203 | 195 | </div> |
| ... | ... | @@ -233,6 +225,7 @@ export default { |
| 233 | 225 | buyer: '', |
| 234 | 226 | buyerName: '', |
| 235 | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | |
| 236 | 229 | designatedConsignee: '', |
| 237 | 230 | specialTerms: '', |
| 238 | 231 | specialTermsName: '', |
| ... | ... | @@ -243,7 +236,7 @@ export default { |
| 243 | 236 | includesPackagingFeeName: '', |
| 244 | 237 | includesTransportFee: false, |
| 245 | 238 | includesTransportFeeName: '', |
| 246 | - unit: '元、公斤、元/公斤', | |
| 239 | + unit: '美元、公斤、美元/公斤', | |
| 247 | 240 | totalAmountCapital: '', |
| 248 | 241 | destinationId: [], |
| 249 | 242 | destinationLabel: '', |
| ... | ... | @@ -263,9 +256,9 @@ export default { |
| 263 | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | 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 | 262 | productLineList: [], |
| 270 | 263 | productList: [], |
| 271 | 264 | customerRemarks: [], |
| ... | ... | @@ -366,11 +359,11 @@ export default { |
| 366 | 359 | onProductsChange(products) { |
| 367 | 360 | const list = Array.isArray(products) ? products : [] |
| 368 | 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 | 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 | 367 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 375 | 368 | this.productLineList = list |
| 376 | 369 | }, |
| ... | ... | @@ -446,6 +439,10 @@ export default { |
| 446 | 439 | setSheet('生产厂', opts) |
| 447 | 440 | } else if (field === 'supplier') { |
| 448 | 441 | setSheet('供方', this.supplierList) |
| 442 | + } else if (field === 'specialTerms') { | |
| 443 | + setSheet('特别条款要求', this.specialTermsList) | |
| 444 | + } else if (field === 'executionStandard') { | |
| 445 | + setSheet('执行标准', this.executionStandardList) | |
| 449 | 446 | } else if (field === 'includesPackagingFee') { |
| 450 | 447 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 451 | 448 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -516,9 +513,9 @@ export default { |
| 516 | 513 | ...formForSubmit, |
| 517 | 514 | destination, |
| 518 | 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 | 519 | contractDistributorLineList: lines |
| 523 | 520 | }) |
| 524 | 521 | console.log('onSubmit__payload', payload) |
| ... | ... | @@ -537,18 +534,31 @@ export default { |
| 537 | 534 | { key: 'supplier', label: '供方' }, |
| 538 | 535 | { key: 'buyer', label: '需方' }, |
| 539 | 536 | { key: 'orderDate', label: '订货日期' }, |
| 537 | + { key: 'unit', label: '单位' }, | |
| 540 | 538 | { key: 'workshopId', label: '生产厂' }, |
| 539 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 541 | 540 | ] |
| 542 | 541 | for (const it of checks) { |
| 543 | 542 | const val = this.form[it.key] |
| 544 | 543 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 545 | 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 | 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 | 562 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 553 | 563 | } |
| 554 | 564 | } |
| ... | ... | @@ -576,7 +586,7 @@ export default { |
| 576 | 586 | color: rgba(0, 0, 0, 0.6); |
| 577 | 587 | line-height: 32rpx; |
| 578 | 588 | width: 240rpx; |
| 579 | - padding: 24rpx 0; | |
| 589 | + padding: 12rpx 0; | |
| 580 | 590 | } |
| 581 | 591 | .total-item-price { |
| 582 | 592 | font-weight: 600; |
| ... | ... | @@ -598,7 +608,7 @@ export default { |
| 598 | 608 | |
| 599 | 609 | .scroll { |
| 600 | 610 | flex: 1; |
| 601 | - padding: 12rpx 0 480rpx !important; | |
| 611 | + padding: 12rpx 0 392rpx !important; | |
| 602 | 612 | } |
| 603 | 613 | |
| 604 | 614 | .footer { | ... | ... |
| ... | ... | @@ -53,7 +53,7 @@ |
| 53 | 53 | }}</text></view> |
| 54 | 54 | </view> |
| 55 | 55 | |
| 56 | - <view class="section"> | |
| 56 | + <view class="section" v-if="detail.status === 'STANDARD'"> | |
| 57 | 57 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 58 | 58 | detail.standardFileName || '-' |
| 59 | 59 | }}</text></view> |
| ... | ... | @@ -61,7 +61,7 @@ |
| 61 | 61 | detail.standardStandardized ? '是' : '否' |
| 62 | 62 | }}</text></view> |
| 63 | 63 | </view> |
| 64 | - <view class="section" v-if="status === 'FORMAL'"> | |
| 64 | + <view class="section" v-if="detail.status === 'FORMAL'"> | |
| 65 | 65 | <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ |
| 66 | 66 | detail.formalFileName || '-' }}</text></view> |
| 67 | 67 | <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized |
| ... | ... | @@ -271,20 +271,20 @@ export default { |
| 271 | 271 | const e = this.detail.showExamine || false |
| 272 | 272 | const f = this.detail.standardShowExamine || false |
| 273 | 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 | 14 | @input="onSearchInput" |
| 15 | 15 | /> |
| 16 | 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 | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | 19 | </view> |
| 20 | 20 | </view> |
| ... | ... | @@ -61,7 +61,9 @@ |
| 61 | 61 | <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> |
| 62 | 62 | </view> |
| 63 | 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 | 67 | </view> |
| 66 | 68 | <view class="info-row"> |
| 67 | 69 | <text>订货日期</text><text>{{ item.orderDate }}</text> | ... | ... |
| ... | ... | @@ -59,11 +59,11 @@ |
| 59 | 59 | <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" /> |
| 60 | 60 | </template> |
| 61 | 61 | </uni-list-item> |
| 62 | - <uni-list-item title="不含税金额"> | |
| 62 | + <!-- <uni-list-item title="不含税金额"> | |
| 63 | 63 | <template v-slot:footer> |
| 64 | 64 | <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| 65 | 65 | </template> |
| 66 | - </uni-list-item> | |
| 66 | + </uni-list-item> --> | |
| 67 | 67 | <uni-list-item title="总金额"> |
| 68 | 68 | <template v-slot:footer> |
| 69 | 69 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| ... | ... | @@ -107,23 +107,23 @@ |
| 107 | 107 | 数量 |
| 108 | 108 | </div> |
| 109 | 109 | <div class="total-item-price"> |
| 110 | - {{ (sumQuantity || 0).toFixed(2) }}t | |
| 110 | + {{ (totalQuantity || 0).toFixed(2) }}kg | |
| 111 | 111 | </div> |
| 112 | 112 | </div> |
| 113 | - <div class="total-item"> | |
| 113 | + <!-- <div class="total-item"> | |
| 114 | 114 | <div class="total-item-text"> |
| 115 | 115 | 不含税金额 |
| 116 | 116 | </div> |
| 117 | 117 | <div class="total-item-price text-red"> |
| 118 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 118 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 119 | 119 | </div> |
| 120 | - </div> | |
| 120 | + </div> --> | |
| 121 | 121 | <div class="total-item"> |
| 122 | 122 | <div class="total-item-text"> |
| 123 | 123 | 总金额 |
| 124 | 124 | </div> |
| 125 | 125 | <div class="total-item-price text-red"> |
| 126 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 126 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 127 | 127 | </div> |
| 128 | 128 | </div> |
| 129 | 129 | </div> |
| ... | ... | @@ -146,15 +146,15 @@ export default { |
| 146 | 146 | } |
| 147 | 147 | }, |
| 148 | 148 | computed: { |
| 149 | - sumQuantity() { | |
| 149 | + totalQuantity() { | |
| 150 | 150 | const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0) |
| 151 | 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 | 158 | totalAmount() { |
| 159 | 159 | let sum = 0 |
| 160 | 160 | for (const it of this.items) { |
| ... | ... | @@ -212,7 +212,7 @@ export default { |
| 212 | 212 | status: v.status || '', |
| 213 | 213 | quantity: v.productQuantity || v.quantity || '', |
| 214 | 214 | unitPrice: v.unitPrice || '', |
| 215 | - amountExcludingTax: v.amountExcludingTax || 0, | |
| 215 | + // amountExcludingTax: v.amountExcludingTax || 0, | |
| 216 | 216 | totalAmount: v.totalAmount || 0, |
| 217 | 217 | deliveryDate: v.deliveryDate || '', |
| 218 | 218 | specDisplay: '' |
| ... | ... | @@ -248,14 +248,14 @@ export default { |
| 248 | 248 | this.recalculate(idx) |
| 249 | 249 | }, |
| 250 | 250 | recalculate(idx) { |
| 251 | - const TAX_RATE = 0.13 | |
| 251 | + // const TAX_RATE = 0.13 | |
| 252 | 252 | const it = this.items[idx] |
| 253 | 253 | if (!it) return |
| 254 | 254 | const qty = this.toNumber(it.quantity) |
| 255 | 255 | const price = this.toNumber(it.unitPrice) |
| 256 | 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 | 259 | it.totalAmount = total |
| 260 | 260 | this.$set(this.items, idx, it) |
| 261 | 261 | }, |
| ... | ... | @@ -291,7 +291,7 @@ export default { |
| 291 | 291 | ...it, |
| 292 | 292 | quantity: '', |
| 293 | 293 | unitPrice: '', |
| 294 | - amountExcludingTax: 0 | |
| 294 | + // amountExcludingTax: 0, | |
| 295 | 295 | })) |
| 296 | 296 | }, |
| 297 | 297 | async onSubmit() { |
| ... | ... | @@ -300,12 +300,12 @@ export default { |
| 300 | 300 | const qty = this.toNumber(it.quantity) |
| 301 | 301 | const price = this.toNumber(it.unitPrice) |
| 302 | 302 | const total = this.toNumber(it.totalAmount) |
| 303 | - const excl = this.toNumber(it.amountExcludingTax) | |
| 303 | + // const excl = this.toNumber(it.amountExcludingTax) | |
| 304 | 304 | if (Object.prototype.hasOwnProperty.call(raw, 'productQuantity')) raw.productQuantity = qty |
| 305 | 305 | else raw.quantity = qty |
| 306 | 306 | raw.unitPrice = price |
| 307 | 307 | raw.totalAmount = total |
| 308 | - raw.amountExcludingTax = excl | |
| 308 | + // raw.amountExcludingTax = excl | |
| 309 | 309 | return raw |
| 310 | 310 | }) |
| 311 | 311 | if (!selected.length) { |
| ... | ... | @@ -325,9 +325,9 @@ export default { |
| 325 | 325 | const payload = { |
| 326 | 326 | id: this.id, |
| 327 | 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 | 331 | type:'INTL_OPEN_SPEC_AGMT', |
| 332 | 332 | contractDistributorLineList: selected |
| 333 | 333 | } |
| ... | ... | @@ -362,7 +362,7 @@ export default { |
| 362 | 362 | |
| 363 | 363 | .scroll { |
| 364 | 364 | flex: 1; |
| 365 | - padding: 12rpx 0 480rpx !important; | |
| 365 | + padding: 12rpx 0 392rpx !important; | |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | .header { |
| ... | ... | @@ -646,7 +646,7 @@ export default { |
| 646 | 646 | color: rgba(0, 0, 0, 0.6); |
| 647 | 647 | line-height: 32rpx; |
| 648 | 648 | width: 240rpx; |
| 649 | - padding: 24rpx 0; | |
| 649 | + padding: 12rpx 0; | |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | .total-item-price { | ... | ... |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | </template> |
| 42 | 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 | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | 47 | <template v-slot:footer> |
| ... | ... | @@ -98,34 +98,25 @@ |
| 98 | 98 | :inputBorder="false" /> |
| 99 | 99 | </template> |
| 100 | 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 | 113 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | 114 | <template v-slot:footer> |
| 124 | 115 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | 116 | :inputBorder="false" /> |
| 126 | 117 | </template> |
| 127 | 118 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | |
| 119 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 129 | 120 | <template v-slot:footer> |
| 130 | 121 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | 122 | </template> |
| ... | ... | @@ -177,15 +168,15 @@ |
| 177 | 168 | <div class="total-text">合计</div> |
| 178 | 169 | <div class="total-item"> |
| 179 | 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 | 172 | </div> |
| 182 | - <div class="total-item"> | |
| 173 | + <!-- <div class="total-item"> | |
| 183 | 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 | 177 | <div class="total-item"> |
| 187 | 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 | 180 | </div> |
| 190 | 181 | </div> |
| 191 | 182 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| ... | ... | @@ -223,6 +214,7 @@ export default { |
| 223 | 214 | workshopId: '', |
| 224 | 215 | workshopName: '', |
| 225 | 216 | orderDate: '', |
| 217 | + deliveryDate: '', | |
| 226 | 218 | designatedConsignee: '', |
| 227 | 219 | specialTerms: '', |
| 228 | 220 | specialTermsName: '', |
| ... | ... | @@ -233,7 +225,7 @@ export default { |
| 233 | 225 | includesPackagingFeeName: '', |
| 234 | 226 | includesTransportFee: false, |
| 235 | 227 | includesTransportFeeName: '', |
| 236 | - unit: '元、公斤、元/公斤', | |
| 228 | + unit: '美元、公斤、美元/公斤', | |
| 237 | 229 | totalAmountCapital: '', |
| 238 | 230 | depositInfo: '', |
| 239 | 231 | packagingRequirements: '', |
| ... | ... | @@ -256,9 +248,9 @@ export default { |
| 256 | 248 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | 249 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | 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 | 254 | productLineList: [], |
| 263 | 255 | newProductLineList: [], |
| 264 | 256 | productList: [] |
| ... | ... | @@ -347,11 +339,11 @@ export default { |
| 347 | 339 | const list = Array.isArray(products) ? products : [] |
| 348 | 340 | this.newProductLineList = list |
| 349 | 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 | 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 | 347 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 356 | 348 | }, |
| 357 | 349 | async loadSuppliers() { |
| ... | ... | @@ -399,6 +391,10 @@ export default { |
| 399 | 391 | setSheet('生产厂', opts) |
| 400 | 392 | } else if (field === 'supplier') { |
| 401 | 393 | setSheet('供方', this.supplierList) |
| 394 | + } else if (field === 'specialTerms') { | |
| 395 | + setSheet('特别条款要求', this.specialTermsList) | |
| 396 | + } else if (field === 'executionStandard') { | |
| 397 | + setSheet('执行标准', this.executionStandardList) | |
| 402 | 398 | } else if (field === 'includesPackagingFee') { |
| 403 | 399 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 404 | 400 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -443,18 +439,31 @@ export default { |
| 443 | 439 | { key: 'supplier', label: '供方' }, |
| 444 | 440 | { key: 'buyer', label: '需方' }, |
| 445 | 441 | { key: 'orderDate', label: '订货日期' }, |
| 442 | + { key: 'unit', label: '单位' }, | |
| 446 | 443 | { key: 'workshopId', label: '生产厂' }, |
| 444 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 447 | 445 | ] |
| 448 | 446 | for (const it of checks) { |
| 449 | 447 | const val = this.form[it.key] |
| 450 | 448 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 451 | 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 | 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 | 467 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 459 | 468 | } |
| 460 | 469 | } |
| ... | ... | @@ -486,9 +495,9 @@ export default { |
| 486 | 495 | id: this.form.id, |
| 487 | 496 | destination, |
| 488 | 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 | 501 | contractDistributorLineList: lines |
| 493 | 502 | }) |
| 494 | 503 | try { |
| ... | ... | @@ -524,7 +533,7 @@ export default { |
| 524 | 533 | color: rgba(0, 0, 0, 0.6); |
| 525 | 534 | line-height: 32rpx; |
| 526 | 535 | width: 240rpx; |
| 527 | - padding: 24rpx 0; | |
| 536 | + padding: 12rpx 0; | |
| 528 | 537 | } |
| 529 | 538 | |
| 530 | 539 | .total-item-price { |
| ... | ... | @@ -547,7 +556,7 @@ export default { |
| 547 | 556 | |
| 548 | 557 | .scroll { |
| 549 | 558 | flex: 1; |
| 550 | - padding: 12rpx 0 480rpx !important; | |
| 559 | + padding: 12rpx 0 392rpx !important; | |
| 551 | 560 | } |
| 552 | 561 | |
| 553 | 562 | .footer { | ... | ... |
| ... | ... | @@ -53,53 +53,53 @@ |
| 53 | 53 | <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" /> |
| 54 | 54 | </template> |
| 55 | 55 | </uni-list-item> |
| 56 | - <uni-list-item title="厚度"> | |
| 56 | + <uni-list-item title="厚度(mm)"> | |
| 57 | 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 | 59 | </template> |
| 60 | 60 | </uni-list-item> |
| 61 | - <uni-list-item title="厚度公差(单项+)"> | |
| 61 | + <uni-list-item title="厚度公差上限(mm)"> | |
| 62 | 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 | 65 | </template> |
| 66 | 66 | </uni-list-item> |
| 67 | - <uni-list-item title="厚度公差(单项-)"> | |
| 67 | + <uni-list-item title="厚度公差下限(mm)"> | |
| 68 | 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 | 71 | </template> |
| 72 | 72 | </uni-list-item> |
| 73 | - <uni-list-item title="宽度"> | |
| 73 | + <uni-list-item title="宽度(mm)"> | |
| 74 | 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 | 76 | </template> |
| 77 | 77 | </uni-list-item> |
| 78 | - <uni-list-item title="宽度公差(单项+)"> | |
| 78 | + <uni-list-item title="宽度公差上限(mm)"> | |
| 79 | 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 | 81 | </template> |
| 82 | 82 | </uni-list-item> |
| 83 | - <uni-list-item title="宽度公差(单项-)"> | |
| 83 | + <uni-list-item title="宽度公差下限(mm)"> | |
| 84 | 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 | 86 | </template> |
| 87 | 87 | </uni-list-item> |
| 88 | - <uni-list-item title="长度"> | |
| 88 | + <uni-list-item title="长度(mm)"> | |
| 89 | 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 | 91 | </template> |
| 92 | 92 | </uni-list-item> |
| 93 | - <uni-list-item title="长度公差(单项+)"> | |
| 93 | + <uni-list-item title="长度公差上限(mm)"> | |
| 94 | 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 | 97 | </template> |
| 98 | 98 | </uni-list-item> |
| 99 | - <uni-list-item title="长度公差(单项-)"> | |
| 99 | + <uni-list-item title="长度公差下限(mm)"> | |
| 100 | 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 | 103 | </template> |
| 104 | 104 | </uni-list-item> |
| 105 | 105 | <uni-list-item title="状态"> |
| ... | ... | @@ -109,19 +109,24 @@ |
| 109 | 109 | </uni-list-item> |
| 110 | 110 | <uni-list-item title="数量"> |
| 111 | 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 | 113 | </template> |
| 114 | 114 | </uni-list-item> |
| 115 | 115 | <uni-list-item title="单价"> |
| 116 | 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 | 118 | </template> |
| 119 | 119 | </uni-list-item> |
| 120 | - <uni-list-item title="不含税金额"> | |
| 120 | + <uni-list-item title="外贸加工费"> | |
| 121 | 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 | 123 | </template> |
| 124 | 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 | 130 | <uni-list-item title="总金额"> |
| 126 | 131 | <template v-slot:footer> |
| 127 | 132 | <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" /> |
| ... | ... | @@ -129,7 +134,7 @@ |
| 129 | 134 | </uni-list-item> |
| 130 | 135 | <uni-list-item title="发货日期"> |
| 131 | 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 | 138 | </template> |
| 134 | 139 | </uni-list-item> |
| 135 | 140 | </uni-list> |
| ... | ... | @@ -151,18 +156,41 @@ |
| 151 | 156 | <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view> |
| 152 | 157 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 153 | 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 | 183 | <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view> |
| 156 | 184 | <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view> |
| 157 | 185 | <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice) |
| 158 | 186 | }}</text> |
| 159 | 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 | 189 | formatCurrency(item.amountExcludingTax) |
| 162 | - }}</text></view> | |
| 190 | + }}</text></view> --> | |
| 163 | 191 | <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount) |
| 164 | 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 | 194 | </view> |
| 167 | 195 | </view> |
| 168 | 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 | 204 | mode: { type: String, default: 'add' }, |
| 177 | 205 | list: { type: Array, default: () => [] }, |
| 178 | 206 | max: { type: Number, default: 8 }, |
| 179 | - orderDateBase: { type: String, default: '' }, | |
| 207 | + deliveryDateBase: { type: String, default: '' }, | |
| 208 | + deliveryDate: { type: String, default: '' }, | |
| 180 | 209 | options: { type: Array, default: () => [] } |
| 181 | 210 | }, |
| 182 | 211 | components: { SingleSelectSheet }, |
| ... | ... | @@ -194,6 +223,21 @@ export default { |
| 194 | 223 | label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')), |
| 195 | 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 | 243 | watch: { |
| ... | ... | @@ -218,10 +262,18 @@ export default { |
| 218 | 262 | }, |
| 219 | 263 | methods: { |
| 220 | 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 | 278 | toNumber(val) { |
| 227 | 279 | if (typeof val === 'number') return isNaN(val) ? 0 : val |
| ... | ... | @@ -234,21 +286,21 @@ export default { |
| 234 | 286 | const m = Math.pow(10, digits) |
| 235 | 287 | return Math.round(n * m) / m |
| 236 | 288 | }, |
| 237 | - onNumberBlur(idx, field, digits) { | |
| 289 | + onNonNegativeBlur(idx, field, digits) { | |
| 238 | 290 | const it = this.items[idx] |
| 239 | 291 | if (!it) return |
| 240 | 292 | const raw = it[field] |
| 241 | - // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段 | |
| 242 | 293 | if (raw === '' || raw === null || raw === undefined) { |
| 243 | 294 | this.$set(this.items, idx, it) |
| 244 | - this.recalculate(idx) | |
| 295 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 245 | 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 | 300 | const rounded = this.round(num, digits) |
| 249 | 301 | it[field] = rounded |
| 250 | 302 | this.$set(this.items, idx, it) |
| 251 | - this.recalculate(idx) | |
| 303 | + if (field === 'quantity' || field === 'unitPrice') this.recalculate(idx) | |
| 252 | 304 | }, |
| 253 | 305 | formatCurrency(val) { |
| 254 | 306 | if (val == null || val === '') return '' |
| ... | ... | @@ -286,8 +338,8 @@ export default { |
| 286 | 338 | const qty = this.toNumber(it.quantity) |
| 287 | 339 | const price = this.toNumber(it.unitPrice) |
| 288 | 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 | 343 | this.$set(this.items, idx, next) |
| 292 | 344 | }, |
| 293 | 345 | recalculateAll() { |
| ... | ... | @@ -319,15 +371,15 @@ export default { |
| 319 | 371 | onDateChange(idx, e) { |
| 320 | 372 | const it = this.items[idx] |
| 321 | 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 | 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 | 377 | const d = new Date(dateStr) |
| 326 | 378 | if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) { |
| 327 | 379 | uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' }) |
| 328 | - it.orderDate = this.orderDateBase | |
| 380 | + it.deliveryDate = this.deliveryDateBase | |
| 329 | 381 | } else { |
| 330 | - it.orderDate = dateStr | |
| 382 | + it.deliveryDate = dateStr | |
| 331 | 383 | } |
| 332 | 384 | this.$set(this.items, idx, it) |
| 333 | 385 | }, |
| ... | ... | @@ -500,8 +552,46 @@ export default { |
| 500 | 552 | |
| 501 | 553 | .value { |
| 502 | 554 | flex: 1; |
| 503 | - text-align: right; | |
| 555 | + // text-align: right; | |
| 504 | 556 | color: rgba(0, 0, 0, 0.9); |
| 505 | 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 | 597 | </style> | ... | ... |
| ... | ... | @@ -34,8 +34,7 @@ export default { |
| 34 | 34 | computed: { |
| 35 | 35 | displayButtons() { |
| 36 | 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 | 5 | <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入客户名称或编号" clearButton="auto" |
| 6 | 6 | cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" @input="onSearchInput" /> |
| 7 | 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 | 9 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 10 | 10 | </view> |
| 11 | 11 | </view> |
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <text>框架合同编号</text><text>{{ item.code }}</text> |
| 25 | 25 | </view> |
| 26 | 26 | <view class="info-row"> |
| 27 | - <text>是否签订</text><text>{{ item.hasFrameworkAgreement }}</text> | |
| 27 | + <text>是否签订</text><text>{{ item.hasFrameworkAgreement ? '是' : '否' }}</text> | |
| 28 | 28 | </view> |
| 29 | 29 | <view class="info-row"> |
| 30 | 30 | <text>品种</text><text>{{ item.materialTypeName }}</text> | ... | ... |
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <view class="item-title"><text class="required">*</text><text>生产厂</text></view> |
| 40 | 40 | </template> |
| 41 | 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 | 43 | <uni-list-item title="合计人民币金额(大写)"> |
| 44 | 44 | <template v-slot:footer> |
| 45 | 45 | <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled /> |
| ... | ... | @@ -92,33 +92,25 @@ |
| 92 | 92 | :inputBorder="false" /> |
| 93 | 93 | </template> |
| 94 | 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 | 107 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 116 | 108 | <template v-slot:footer> |
| 117 | 109 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 118 | 110 | :inputBorder="false" /> |
| 119 | 111 | </template> |
| 120 | 112 | </uni-list-item> |
| 121 | - <uni-list-item title="特别说明"> | |
| 113 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 122 | 114 | <template v-slot:footer> |
| 123 | 115 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 124 | 116 | </template> |
| ... | ... | @@ -181,7 +173,7 @@ |
| 181 | 173 | 数量 |
| 182 | 174 | </div> |
| 183 | 175 | <div class="total-item-price"> |
| 184 | - {{ (sumQuantity || 0).toFixed(2) }}t | |
| 176 | + {{ (totalQuantity || 0).toFixed(2) }}kg | |
| 185 | 177 | </div> |
| 186 | 178 | </div> |
| 187 | 179 | <div class="total-item"> |
| ... | ... | @@ -189,7 +181,7 @@ |
| 189 | 181 | 不含税金额 |
| 190 | 182 | </div> |
| 191 | 183 | <div class="total-item-price text-red"> |
| 192 | - ¥{{ (sumAmountExcl || 0).toFixed(2) }} | |
| 184 | + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }} | |
| 193 | 185 | </div> |
| 194 | 186 | </div> |
| 195 | 187 | <div class="total-item"> |
| ... | ... | @@ -197,7 +189,7 @@ |
| 197 | 189 | 总金额 |
| 198 | 190 | </div> |
| 199 | 191 | <div class="total-item-price text-red"> |
| 200 | - ¥{{ (sumTotal || 0).toFixed(2) }} | |
| 192 | + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }} | |
| 201 | 193 | </div> |
| 202 | 194 | </div> |
| 203 | 195 | </div> |
| ... | ... | @@ -214,7 +206,7 @@ |
| 214 | 206 | <script> |
| 215 | 207 | import SingleSelectSheet from '@/components/single-select/index.vue' |
| 216 | 208 | import RelateSelectSheet from '@/components/relate-select/index.vue' |
| 217 | -//import ProductRel from './productRel.vue' | |
| 209 | +import ProductRel from './productRel.vue' | |
| 218 | 210 | import CitySelector from '@/components/city-selector/index.vue' |
| 219 | 211 | import { getRetailCodeApi, createContractApi, getCustomerRemarks,getCustomerSpecificQualityRequirements } from '@/api/contract' |
| 220 | 212 | import { getDicByCodes } from '@/utils/dic' |
| ... | ... | @@ -223,7 +215,7 @@ import { workshopQueryApi } from '@/api/devManage' |
| 223 | 215 | |
| 224 | 216 | export default { |
| 225 | 217 | name: 'AddContractProcess', |
| 226 | - components: { SingleSelectSheet, RelateSelectSheet, /* ProductRel, */ CitySelector }, | |
| 218 | + components: { SingleSelectSheet, RelateSelectSheet, ProductRel, CitySelector }, | |
| 227 | 219 | data() { |
| 228 | 220 | return { |
| 229 | 221 | form: { |
| ... | ... | @@ -233,6 +225,7 @@ export default { |
| 233 | 225 | buyer: '', |
| 234 | 226 | buyerName: '', |
| 235 | 227 | orderDate: '', |
| 228 | + deliveryDate: '', | |
| 236 | 229 | designatedConsignee: '', |
| 237 | 230 | specialTerms: '', |
| 238 | 231 | specialTermsName: '', |
| ... | ... | @@ -263,9 +256,9 @@ export default { |
| 263 | 256 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 264 | 257 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 265 | 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 | 262 | productLineList: [], |
| 270 | 263 | productList: [], |
| 271 | 264 | rawToProdRatioList: [], |
| ... | ... | @@ -313,8 +306,8 @@ export default { |
| 313 | 306 | const o = Array.isArray(oldVal) ? oldVal : [] |
| 314 | 307 | const changed = [] |
| 315 | 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 | 311 | if (ni !== oi && ni !== undefined) changed.push(ni) |
| 319 | 312 | } |
| 320 | 313 | if (changed.length && this.form.buyer) { |
| ... | ... | @@ -326,11 +319,11 @@ export default { |
| 326 | 319 | }, |
| 327 | 320 | methods: { |
| 328 | 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 | 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 | 327 | this.fetchCustomerQualityRequirements(id) |
| 335 | 328 | }, |
| 336 | 329 | async fetchCustomerQualityRequirements(id) { |
| ... | ... | @@ -366,12 +359,12 @@ export default { |
| 366 | 359 | }, |
| 367 | 360 | onProductsChange(products) { |
| 368 | 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 | 363 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 371 | 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 | 368 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 376 | 369 | this.productLineList = list |
| 377 | 370 | }, |
| ... | ... | @@ -450,6 +443,10 @@ export default { |
| 450 | 443 | setSheet('生产厂', opts) |
| 451 | 444 | } else if (field === 'supplier') { |
| 452 | 445 | setSheet('承揽方', this.supplierList) |
| 446 | + } else if (field === 'specialTerms') { | |
| 447 | + setSheet('特别条款要求', this.specialTermsList) | |
| 448 | + } else if (field === 'executionStandard') { | |
| 449 | + setSheet('执行标准', this.executionStandardList) | |
| 453 | 450 | } else if (field === 'includesPackagingFee') { |
| 454 | 451 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 455 | 452 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -520,10 +517,15 @@ export default { |
| 520 | 517 | ...formForSubmit, |
| 521 | 518 | destination, |
| 522 | 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 | 530 | console.log('onSubmit__payload', payload) |
| 529 | 531 | |
| ... | ... | @@ -542,17 +544,30 @@ export default { |
| 542 | 544 | { key: 'buyer', label: '定作方' }, |
| 543 | 545 | { key: 'orderDate', label: '订货日期' }, |
| 544 | 546 | { key: 'workshopId', label: '生产厂' }, |
| 547 | + { key: 'unit', label: '单位' }, | |
| 548 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 545 | 549 | ] |
| 546 | 550 | for (const it of checks) { |
| 547 | 551 | const val = this.form[it.key] |
| 548 | 552 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 549 | 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 | 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 | 571 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 557 | 572 | } |
| 558 | 573 | } |
| ... | ... | @@ -580,7 +595,7 @@ export default { |
| 580 | 595 | color: rgba(0, 0, 0, 0.6); |
| 581 | 596 | line-height: 32rpx; |
| 582 | 597 | width: 240rpx; |
| 583 | - padding: 24rpx 0; | |
| 598 | + padding: 12rpx 0; | |
| 584 | 599 | } |
| 585 | 600 | .total-item-price { |
| 586 | 601 | font-weight: 600; |
| ... | ... | @@ -602,7 +617,7 @@ export default { |
| 602 | 617 | |
| 603 | 618 | .scroll { |
| 604 | 619 | flex: 1; |
| 605 | - padding: 12rpx 0 480rpx !important; | |
| 620 | + padding: 12rpx 0 392rpx !important; | |
| 606 | 621 | } |
| 607 | 622 | |
| 608 | 623 | .footer { | ... | ... |
| ... | ... | @@ -204,11 +204,11 @@ export default { |
| 204 | 204 | const t = this.detail.standardApproved || false |
| 205 | 205 | const e = this.detail.standardShowExamine || false |
| 206 | 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 | 14 | @input="onSearchInput" |
| 15 | 15 | /> |
| 16 | 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 | 18 | <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> |
| 19 | 19 | </view> |
| 20 | 20 | </view> |
| ... | ... | @@ -206,7 +206,7 @@ export default { |
| 206 | 206 | if (!this.batchMode) this.selectedKeys = [] |
| 207 | 207 | }, |
| 208 | 208 | onAdd() { |
| 209 | - uni.showToast({ title: '点击新增', icon: 'none' }) | |
| 209 | + uni.navigateTo({ url: '/pages/contract_process/add' }) | |
| 210 | 210 | }, |
| 211 | 211 | fetchList({ pageIndex, pageSize, query, extra }) { |
| 212 | 212 | console.log('fetchList', pageIndex, pageSize, query, extra) | ... | ... |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | </template> |
| 42 | 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 | 46 | <uni-list-item title="合计人民币金额(大写)"> |
| 47 | 47 | <template v-slot:footer> |
| ... | ... | @@ -99,33 +99,25 @@ |
| 99 | 99 | </template> |
| 100 | 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 | 114 | <uni-list-item v-if="form.executionStandard === 'OTHER'" title="其他"> |
| 123 | 115 | <template v-slot:footer> |
| 124 | 116 | <uni-easyinput v-model="form.executionStandardRemarks" placeholder="请输入其他标准备注" |
| 125 | 117 | :inputBorder="false" /> |
| 126 | 118 | </template> |
| 127 | 119 | </uni-list-item> |
| 128 | - <uni-list-item title="特别说明"> | |
| 120 | + <uni-list-item title="特别说明" style="margin-top: 20rpx;"> | |
| 129 | 121 | <template v-slot:footer> |
| 130 | 122 | <uni-easyinput v-model="form.specialInstructions" placeholder="请输入特别说明" :inputBorder="false" /> |
| 131 | 123 | </template> |
| ... | ... | @@ -177,15 +169,15 @@ |
| 177 | 169 | <div class="total-text">合计</div> |
| 178 | 170 | <div class="total-item"> |
| 179 | 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 | 173 | </div> |
| 182 | 174 | <div class="total-item"> |
| 183 | 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 | 177 | </div> |
| 186 | 178 | <div class="total-item"> |
| 187 | 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 | 181 | </div> |
| 190 | 182 | </div> |
| 191 | 183 | <button class="btn submit" type="primary" @click="onSubmit">保存</button> |
| ... | ... | @@ -223,6 +215,7 @@ export default { |
| 223 | 215 | workshopId: '', |
| 224 | 216 | workshopName: '', |
| 225 | 217 | orderDate: '', |
| 218 | + deliveryDate: '', | |
| 226 | 219 | designatedConsignee: '', |
| 227 | 220 | specialTerms: '', |
| 228 | 221 | specialTermsName: '', |
| ... | ... | @@ -256,9 +249,9 @@ export default { |
| 256 | 249 | yesNoList: [{ label: '是', value: true }, { label: '否', value: false }], |
| 257 | 250 | sheet: { visible: false, title: '请选择', field: '', options: [], value: '' }, |
| 258 | 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 | 255 | productLineList: [], |
| 263 | 256 | newProductLineList: [], |
| 264 | 257 | productList: [], |
| ... | ... | @@ -325,7 +318,7 @@ export default { |
| 325 | 318 | workshopId: m.workshopId || '', |
| 326 | 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 | 322 | this.productLineList = lines |
| 330 | 323 | this.onProductsChange(lines) |
| 331 | 324 | } catch (e) { } |
| ... | ... | @@ -347,12 +340,12 @@ export default { |
| 347 | 340 | onProductsChange(products) { |
| 348 | 341 | const list = Array.isArray(products) ? products : [] |
| 349 | 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 | 344 | const sumE = list.reduce((acc, it) => acc + (parseFloat(it.amountExcludingTax) || 0), 0) |
| 352 | 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 | 349 | this.form.totalAmountCapital = formatCurrencyToChinese(sumT) |
| 357 | 350 | }, |
| 358 | 351 | async loadSuppliers() { |
| ... | ... | @@ -403,6 +396,10 @@ export default { |
| 403 | 396 | setSheet('生产厂', opts) |
| 404 | 397 | } else if (field === 'supplier') { |
| 405 | 398 | setSheet('承揽方', this.supplierList) |
| 399 | + } else if (field === 'specialTerms') { | |
| 400 | + setSheet('特别条款要求', this.specialTermsList) | |
| 401 | + } else if (field === 'executionStandard') { | |
| 402 | + setSheet('执行标准', this.executionStandardList) | |
| 406 | 403 | } else if (field === 'includesPackagingFee') { |
| 407 | 404 | setSheet('单价中是否已包含包装费', this.yesNoList) |
| 408 | 405 | } else if (field === 'includesTransportFee') { |
| ... | ... | @@ -448,17 +445,30 @@ export default { |
| 448 | 445 | { key: 'buyer', label: '定作方' }, |
| 449 | 446 | { key: 'orderDate', label: '订货日期' }, |
| 450 | 447 | { key: 'workshopId', label: '生产厂' }, |
| 448 | + { key: 'unit', label: '单位' }, | |
| 449 | + { key: 'specialTerms', label: '特别条款要求' }, | |
| 451 | 450 | ] |
| 452 | 451 | for (const it of checks) { |
| 453 | 452 | const val = this.form[it.key] |
| 454 | 453 | const empty = (val === undefined || val === null || (typeof val === 'string' && val.trim() === '') || (typeof val === 'number' && isNaN(val))) |
| 455 | 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 | 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 | 472 | uni.showToast({ title: `第${idx + 1}条明细未完整填写`, icon: 'none' }); return false |
| 463 | 473 | } |
| 464 | 474 | } |
| ... | ... | @@ -493,7 +503,7 @@ export default { |
| 493 | 503 | sumQuantity: this.sumQuantity, |
| 494 | 504 | sumAmountExcl: this.sumAmountExcl, |
| 495 | 505 | sumTotal: this.sumTotal, |
| 496 | - contractDistributorLineList: lines | |
| 506 | + contractStdProcessingLineList: lines | |
| 497 | 507 | }) |
| 498 | 508 | try { |
| 499 | 509 | await updateContractApi(payload) |
| ... | ... | @@ -528,7 +538,7 @@ export default { |
| 528 | 538 | color: rgba(0, 0, 0, 0.6); |
| 529 | 539 | line-height: 32rpx; |
| 530 | 540 | width: 240rpx; |
| 531 | - padding: 24rpx 0; | |
| 541 | + padding: 12rpx 0; | |
| 532 | 542 | } |
| 533 | 543 | |
| 534 | 544 | .total-item-price { |
| ... | ... | @@ -551,7 +561,7 @@ export default { |
| 551 | 561 | |
| 552 | 562 | .scroll { |
| 553 | 563 | flex: 1; |
| 554 | - padding: 12rpx 0 480rpx !important; | |
| 564 | + padding: 12rpx 0 392rpx !important; | |
| 555 | 565 | } |
| 556 | 566 | |
| 557 | 567 | .footer { | ... | ... |