Commit 07d919386c907bd571f7d50c575349929f8137d5

Authored by gesilong
2 parents 6ec539fb 0e4a8a37

Merge branch 'cjerp-1.0_20260116' into publish_cjerp

Showing 54 changed files with 2248 additions and 604 deletions

Too many changes to show.

To preserve performance only 54 of 155 files are displayed.

... ... @@ -48,6 +48,11 @@
48 48 <ui_properties converted="true" />
49 49 </component>
50 50 <component name="Git.Settings">
  51 + <option name="RECENT_BRANCH_BY_REPOSITORY">
  52 + <map>
  53 + <entry key="$PROJECT_DIR$" value="publish_cjerp" />
  54 + </map>
  55 + </option>
51 56 <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
52 57 </component>
53 58 <component name="ProjectColorInfo">{
... ... @@ -164,7 +169,19 @@
164 169 <map>
165 170 <entry key="MAIN">
166 171 <value>
167   - <State />
  172 + <State>
  173 + <option name="FILTERS">
  174 + <map>
  175 + <entry key="branch">
  176 + <value>
  177 + <list>
  178 + <option value="cjerp-1.0_20251220" />
  179 + </list>
  180 + </value>
  181 + </entry>
  182 + </map>
  183 + </option>
  184 + </State>
168 185 </value>
169 186 </entry>
170 187 </map>
... ...
1 1 import request from '@/utils/request'
2   -import { ContentTypeEnum } from '@/utils/httpEnum';
3 2 import config from '@/config'
4 3 import { getToken } from '@/utils/auth'
5 4
... ... @@ -32,6 +31,20 @@ export function uploadFileApi(data) {
32 31 }
33 32
34 33 /**
  34 + * 下载文件通用接口
  35 + * @param id
  36 + */
  37 +export function downloadFileApi(id) {
  38 + return request({
  39 + url: `/download/security/url`,
  40 + method: 'get',
  41 + params: {
  42 + id
  43 + },
  44 + })
  45 +}
  46 +
  47 +/**
35 48 * 回去城市接口 省市区 一次性返回
36 49 */
37 50 export function selectorCityApi() {
... ... @@ -63,4 +76,4 @@ export function generateCodeApi(type) {
63 76 type
64 77 },
65 78 })
66   -}
\ No newline at end of file
  79 +}
... ...
  1 +import request from '@/utils/request'
  2 +import { ContentTypeEnum } from '@/utils/httpEnum';
  3 +
  4 +const baseUrl = '/requestCarTicket';
  5 +// 查询列表
  6 +export function queryApi(params) {
  7 + return request({
  8 + url: baseUrl + `/query`,
  9 + method: 'get',
  10 + params
  11 + })
  12 +}
  13 +
  14 +// 根据ID查询详情数据
  15 +export function getDetailApi(id) {
  16 + return request({
  17 + url: baseUrl,
  18 + method: 'get',
  19 + params: { id }
  20 + })
  21 +}
  22 +
  23 +// 新增保存
  24 +export function createApi(params) {
  25 + return request({
  26 + url: baseUrl,
  27 + method: 'post',
  28 + data: params,
  29 + contentType: ContentTypeEnum.JSON
  30 + })
  31 +}
  32 +
  33 +
  34 +// 修改保存
  35 +export function updateApi(params) {
  36 + return request({
  37 + url: baseUrl,
  38 + method: 'put',
  39 + data: params,
  40 + contentType: ContentTypeEnum.JSON
  41 + })
  42 +}
  43 +
... ...
  1 +import request from '@/utils/request'
  2 +import { ContentTypeEnum } from '@/utils/httpEnum';
  3 +
  4 +const baseUrl = '/delayedShipment';
  5 +// 查询列表
  6 +export function queryApi(params) {
  7 + return request({
  8 + url: baseUrl + `/query`,
  9 + method: 'get',
  10 + params
  11 + })
  12 +}
  13 +
  14 +// 根据ID查询详情数据
  15 +export function getDetailApi(id) {
  16 + return request({
  17 + url: baseUrl,
  18 + method: 'get',
  19 + params: { id }
  20 + })
  21 +}
  22 +
  23 +// 取消
  24 +export function cancelApi(id) {
  25 + return request({
  26 + url: baseUrl + '/cancel',
  27 + method: 'get',
  28 + params: { id }
  29 + })
  30 +}
  31 +
  32 +// 延期发货按钮-选择的数据查询
  33 +export function getShipmentPlanDetailApi(id) {
  34 + return request({
  35 + url: '/shipments/plan/detail',
  36 + method: 'get',
  37 + params: { id }
  38 + })
  39 +}
  40 +
  41 +// 新增保存
  42 +export function createApi(params) {
  43 + return request({
  44 + url: baseUrl,
  45 + method: 'post',
  46 + data: params,
  47 + contentType: ContentTypeEnum.JSON
  48 + })
  49 +}
  50 +
  51 +
  52 +// 修改保存
  53 +export function updateApi(params) {
  54 + return request({
  55 + url: baseUrl,
  56 + method: 'put',
  57 + data: params,
  58 + contentType: ContentTypeEnum.JSON
  59 + })
  60 +}
  61 +
... ...
... ... @@ -2,13 +2,54 @@ import request from '@/utils/request'
2 2 import { ContentTypeEnum } from '@/utils/httpEnum';
3 3
4 4 const baseUrl = '/draftRequestCarTicket';
  5 +// 查询列表
  6 +export function queryApi(params) {
  7 + return request({
  8 + url: baseUrl + `/query`,
  9 + method: 'get',
  10 + params
  11 + })
  12 +}
  13 +
  14 +// 根据ID查询详情数据
  15 +export function getDetailApi(id) {
  16 + return request({
  17 + url: baseUrl,
  18 + method: 'get',
  19 + params: { id }
  20 + })
  21 +}
  22 +
  23 +
  24 +// 取消
  25 +export function cancelApi(id) {
  26 + return request({
  27 + url: baseUrl + '/cancel',
  28 + method: 'get',
  29 + params: { id }
  30 + })
  31 +}
5 32
6 33 // 新增保存
7 34 export function createApi(params) {
8 35 return request({
9   - url: `${baseUrl}`,
  36 + url: baseUrl,
10 37 method: 'post',
11 38 data: params,
12 39 contentType: ContentTypeEnum.JSON
13 40 })
14 41 }
  42 +
  43 +
  44 +
  45 +// 修改保存
  46 +export function updateApi(params) {
  47 + return request({
  48 + url: baseUrl,
  49 + method: 'put',
  50 + data: params,
  51 + contentType: ContentTypeEnum.JSON
  52 + })
  53 +}
  54 +
  55 +
... ...
  1 +import request from '@/utils/request'
  2 +import { ContentTypeEnum } from '@/utils/httpEnum';
  3 +
  4 +const baseUrl = '/shipments/order';
  5 +// 查询列表
  6 +export function queryApi(params) {
  7 + return request({
  8 + url: baseUrl + `/query`,
  9 + method: 'get',
  10 + params
  11 + })
  12 +}
  13 +
  14 +// 根据ID查询详情数据
  15 +export function getDetailApi(id) {
  16 + return request({
  17 + url: baseUrl,
  18 + method: 'get',
  19 + params: { id }
  20 + })
  21 +}
  22 +
  23 +// 新增保存
  24 +export function createApi(params) {
  25 + return request({
  26 + url: baseUrl,
  27 + method: 'post',
  28 + data: params,
  29 + contentType: ContentTypeEnum.FORM_URLENCODED
  30 + })
  31 +}
  32 +
  33 +
  34 +// 修改保存
  35 +export function updateApi(params) {
  36 + return request({
  37 + url: baseUrl,
  38 + method: 'put',
  39 + data: params,
  40 + contentType: ContentTypeEnum.FORM_URLENCODED
  41 + })
  42 +}
  43 +
  44 +
  45 +// 检查发货计划是否可以填写实发数
  46 +// [id1, id2, ...]
  47 +export function checkApi(ids) {
  48 + return request({
  49 + url: baseUrl + '/check',
  50 + method: 'post',
  51 + data: ids,
  52 + contentType: ContentTypeEnum.JSON
  53 + })
  54 +}
  55 +
  56 +// 根据发货计划ID查询发货订单列表
  57 +export function listByShipmentOrderId(shipmentsOrderId) {
  58 + return request({
  59 + url: baseUrl + '/listByShipmentOrderId',
  60 + method: 'get',
  61 + params: { shipmentsOrderId }
  62 + })
  63 +}
  64 +
  65 +// 根据发货计划ID查询发货订单列表
  66 +// {
  67 +// id,
  68 +// detailList,
  69 +// type,
  70 +// }
  71 +export function dataReplenishInput(params) {
  72 + return request({
  73 + url: baseUrl + '/dataReplenishInput',
  74 + method: 'post',
  75 + data: params,
  76 + contentType: ContentTypeEnum.JSON
  77 + })
  78 +}
  79 +
  80 +// 保存签收单
  81 +// {
  82 +// fileId: String;
  83 +// fileName: String;
  84 +// shipmentsOrderId: String;
  85 +// }
  86 +export function saveSignInTicket(params) {
  87 + return request({
  88 + url: baseUrl + '/saveSignInTicket',
  89 + method: 'get',
  90 + params: params,
  91 + })
  92 +}
  93 +
  94 +// 查询发货计划详情
  95 +export function queryDetail(params) {
  96 + return request({
  97 + url: '/shipments/plan/detail/query',
  98 + method: 'get',
  99 + params: params,
  100 + })
  101 +}
  102 +
  103 +// 发货单-拆分
  104 +export function splitDataApi(params) {
  105 + return request({
  106 + url: '/shipments/plan/detail/split',
  107 + method: 'post',
  108 + data: params,
  109 + contentType: ContentTypeEnum.JSON
  110 + })
  111 +}
\ No newline at end of file
... ...
  1 +import request from '@/utils/request'
  2 +import { ContentTypeEnum } from '@/utils/httpEnum';
  3 +
  4 +const baseUrl = '/shipments/replenishmentOrder';
  5 +// 查询列表
  6 +export function queryApi(params) {
  7 + return request({
  8 + url: baseUrl + `/query`,
  9 + method: 'get',
  10 + params
  11 + })
  12 +}
  13 +
  14 +// 根据ID查询详情数据
  15 +export function getDetailApi(id) {
  16 + return request({
  17 + url: baseUrl,
  18 + method: 'get',
  19 + params: { id }
  20 + })
  21 +}
  22 +
  23 +// 获取订单编号
  24 +export function getCodeApi(purchaseOrderId) {
  25 + return request({
  26 + url: baseUrl + '/getCode',
  27 + method: 'get',
  28 + params: { purchaseOrderId }
  29 + })
  30 +}
  31 +
  32 +
  33 +// 取消
  34 +export function cancelApi(id) {
  35 + return request({
  36 + url: baseUrl + '/cancel',
  37 + method: 'get',
  38 + params: { id }
  39 + })
  40 +}
  41 +
  42 +// 新增保存
  43 +export function createApi(params) {
  44 + return request({
  45 + url: baseUrl,
  46 + method: 'post',
  47 + data: params,
  48 + contentType: ContentTypeEnum.JSON
  49 + })
  50 +}
  51 +
  52 +
  53 +// 填写计划补货时间
  54 +export function fillRestockTimeApi(params) {
  55 + return request({
  56 + url: baseUrl + '/fillRestockTime',
  57 + method: 'post',
  58 + data: params,
  59 + contentType: ContentTypeEnum.JSON
  60 + })
  61 +}
  62 +
  63 +
  64 +// 修改保存
  65 +export function updateApi(params) {
  66 + return request({
  67 + url: baseUrl,
  68 + method: 'put',
  69 + data: params,
  70 + contentType: ContentTypeEnum.JSON
  71 + })
  72 +}
  73 +
  74 +// 通过订单ID 补货单-获取订货单列表
  75 +export function loadOrderApi(ids) {
  76 + return request({
  77 + url: `/selector/replenishment/order/load`,
  78 + method: 'post',
  79 + data: ids,
  80 + contentType: ContentTypeEnum.JSON
  81 + })
  82 +}
... ...
... ... @@ -4,9 +4,6 @@
4 4 class="scroll"
5 5 scroll-y
6 6 :lower-threshold="lowerThreshold"
7   - :refresher-enabled="enableRefresh"
8   - :refresher-triggered="refresherTriggered"
9   - @refresherrefresh="onRefresh"
10 7 @scrolltolower="onLoadMore"
11 8 @scroll="onScroll"
12 9 >
... ...
... ... @@ -52,10 +52,10 @@
52 52 }}</text></view>
53 53 </view>
54 54
55   - <view class="section" v-if="status === 'STANDARD'">
56   - <view class="row"><text class="label">正式规范性合同</text><text class="value" style="color: #3D48A3;">{{
57   - detail.standardFileName || '-' }}</text></view>
58   - <view class="row"><text class="label">正式合同是否规范</text><text class="value">{{ detail.standardStandardized ?
  55 + <view class="section" v-if="detail.status === 'FORMAL'">
  56 + <view class="row"><text class="label">正式规范性合同</text><text class="value act" @click="downloadFile(detail.formalFileId, detail.formalFileName)">{{
  57 + detail.formalFileName || '-' }}</text></view>
  58 + <view class="row"><text class="label">正式合同是否规范</text><text class="value">{{ detail.formalStandardized ?
59 59 '是' : '否' }}</text></view>
60 60 </view>
61 61
... ... @@ -80,6 +80,7 @@
80 80 <script>
81 81 import { getContractApi } from '@/api/contract'
82 82 import ProductRel from './productRel.vue'
  83 +import { downloadFile } from '@/utils/downloadFile.js'
83 84
84 85 export default {
85 86 name: 'FormalContractViewer',
... ... @@ -160,6 +161,7 @@ export default {
160 161 this.productList = lines
161 162 }).catch(() => { })
162 163 },
  164 + downloadFile,
163 165 getFormValues() {
164 166 const m = this.detail || {}
165 167 return JSON.parse(JSON.stringify(m))
... ... @@ -205,7 +207,8 @@ export default {
205 207 }
206 208
207 209 .label {
208   - width: 280rpx;
  210 + max-width: 280rpx;
  211 + margin-right: 20rpx;
209 212 color: rgba(0, 0, 0, 0.6);
210 213 font-size: 28rpx;
211 214 }
... ... @@ -219,7 +222,8 @@ export default {
219 222 }
220 223
221 224 .label1 {
222   - width: 280rpx;
  225 + max-width: 280rpx;
  226 + margin-right: 20rpx;
223 227 color: rgba(0, 0, 0, 0.6);
224 228 font-size: 32rpx;
225 229 }
... ... @@ -229,6 +233,13 @@ export default {
229 233 text-align: right;
230 234 color: rgba(0, 0, 0, 0.9);
231 235 font-size: 28rpx;
  236 + text-align: right;
  237 + word-break: break-all;
  238 +
  239 + &.act {
  240 + color: $theme-primary;
  241 + }
  242 +
232 243 }
233 244
234 245 .customer {
... ...
... ... @@ -119,12 +119,12 @@
119 119 </uni-list-item>
120 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.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
123 123 </template>
124 124 </uni-list-item>
125 125 <uni-list-item title="总金额">
126 126 <template v-slot:footer>
127   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  127 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="" />
128 128 </template>
129 129 </uni-list-item>
130 130 <uni-list-item title="发货日期">
... ... @@ -153,28 +153,32 @@
153 153 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
154 154 <!-- 厚(公差) * 宽(公差) * 长(公差) -->
155 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>
  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 > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos }}
163 160 </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>
  161 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}
169 162 </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>
  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 > 0 ? '+' + item.widthTolPos : item.widthTolPos }}
  168 + </view>
  169 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}
  170 + </view>
  171 + </view>
  172 + <view v-if="item.length" class="value-spec_val p12">*</view>
  173 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  174 + <view v-if="item.length" class="value-spec_box">
  175 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}
  176 + </view>
  177 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
175 178 </view>
176 179 </view>
177 180 </view>
  181 + </view>
178 182 <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
179 183 <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view>
180 184 <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice)
... ...
... ... @@ -52,8 +52,8 @@
52 52 }}</text></view>
53 53 </view>
54 54
55   - <view class="section" v-if="status === 'STANDARD'">
56   - <view class="row"><text class="label">标准规范性合同</text><text class="value" style="color: #3D48A3;">{{
  55 + <view class="section" v-if="detail.status === 'STANDARD'">
  56 + <view class="row"><text class="label">标准规范性合同</text><text class="value act" @click="downloadFile(detail.standardFileId, detail.standardFileName)">{{
57 57 detail.standardFileName || '-' }}</text></view>
58 58 <view class="row"><text class="label">标准合同是否规范</text><text class="value">{{ detail.standardStandardized ?
59 59 '是' : '否' }}</text></view>
... ... @@ -80,6 +80,7 @@
80 80 <script>
81 81 import { getContractApi } from '@/api/contract'
82 82 import ProductRel from './productRel.vue'
  83 +import { downloadFile } from '@/utils/downloadFile.js'
83 84
84 85 export default {
85 86 name: 'StandardContractViewer',
... ... @@ -160,6 +161,7 @@ export default {
160 161 this.productList = lines
161 162 }).catch(() => { })
162 163 },
  164 + downloadFile,
163 165 getFormValues() {
164 166 const m = this.detail || {}
165 167 return JSON.parse(JSON.stringify(m))
... ... @@ -205,7 +207,8 @@ export default {
205 207 }
206 208
207 209 .label {
208   - width: 280rpx;
  210 + max-width: 280rpx;
  211 + margin-right: 20rpx;
209 212 color: rgba(0, 0, 0, 0.6);
210 213 font-size: 28rpx;
211 214 }
... ... @@ -219,7 +222,8 @@ export default {
219 222 }
220 223
221 224 .label1 {
222   - width: 280rpx;
  225 + max-width: 280rpx;
  226 + margin-right: 20rpx;
223 227 color: rgba(0, 0, 0, 0.6);
224 228 font-size: 32rpx;
225 229 }
... ... @@ -228,7 +232,12 @@ export default {
228 232 flex: 1;
229 233 text-align: right;
230 234 color: rgba(0, 0, 0, 0.9);
231   - font-size: 28rpx;
  235 + font-size: 28rpx; text-align: right;
  236 + word-break: break-all;
  237 +
  238 + &.act {
  239 + color: $theme-primary;
  240 + }
232 241 }
233 242
234 243 .customer {
... ...
1 1 <template>
2   - <view class="button-bar">
  2 + <view v-if="effectiveButtons.length" class="button-bar">
3 3 <view v-if="showMoreButton" class="more-link" @click="toggleMore">更多</view>
4 4 <view class="button-grid" :style="{ gridTemplateColumns: gridColumns }">
5 5 <view v-for="(btn, idx) in visibleButtons" :key="idx" class="action-button" :class="buttonClass(btn)" :style="buttonStyle(btn)" @click="emitClick(btn)">{{ btn.text }}</view>
... ...
... ... @@ -111,5 +111,7 @@ export default {
111 111 .file-name {
112 112 font-size: 28rpx; color: rgba(0,0,0,0.9);
113 113 line-height: 40rpx;
  114 + white-space: pre-wrap;
  115 + word-break: break-all;
114 116 }
115 117 </style>
... ...
... ... @@ -3,7 +3,7 @@
3 3 <view class="filter-modal">
4 4 <view class="header">
5 5 <text class="title">{{ title }}</text>
6   - <text class="close" @click="onClose">×</text>
  6 + <text class="close" @click="onClose"></text>
7 7 </view>
8 8
9 9 <view class="body">
... ... @@ -110,8 +110,12 @@ export default {
110 110 text-align: center;
111 111 }
112 112 .close {
113   - font-size: 36rpx;
114   - color: #666;
  113 + width: 48rpx;
  114 + height: 48rpx;
  115 + background-image: url('~@/static/images/flow/close_icon.png');
  116 + background-repeat: no-repeat;
  117 + background-position: right center;
  118 + background-size: cover;
115 119 }
116 120 .body {
117 121 flex: 1 1 auto;
... ... @@ -143,4 +147,11 @@ export default {
143 147 background: $theme-primary;
144 148 color: #fff;
145 149 }
  150 +
  151 +.uni-input-placeholder, .uni-input-input {
  152 + font-size: 32rpx !important;
  153 +}
  154 +.uni-input-placeholder {
  155 + color: rgba(0, 0, 0, 0.4) !important;
  156 +}
146 157 </style>
\ No newline at end of file
... ...
  1 +<template>
  2 + <uni-popup ref="popup" type="bottom" :mask-click="false" :safe-area="true">
  3 + <view class="sheet">
  4 + <view class="sheet-header">
  5 + <text class="cancel" @click="onCancel">取消</text>
  6 + <text class="title">{{ title }}</text>
  7 + <text class="ok" @click="onConfirm">确认</text>
  8 + </view>
  9 + <view class="sheet-body">
  10 + <view
  11 + v-for="(opt, i) in options"
  12 + :key="i"
  13 + :class="['option', { selected: isSelected(opt) }]"
  14 + @click="toggle(opt)"
  15 + >
  16 + <text class="label">{{ displayOf(opt) }}</text>
  17 + </view>
  18 + </view>
  19 + </view>
  20 + </uni-popup>
  21 +</template>
  22 +
  23 +<script>
  24 +export default {
  25 + name: 'MultiSelectSheet',
  26 + props: {
  27 + visible: { type: Boolean, default: false },
  28 + title: { type: String, default: '请选择' },
  29 + // 统一约定:options 为 [{ label: string, value: string|number }]
  30 + options: { type: Array, default: () => [] },
  31 + // 接收逗号分隔的字符串 '111,222,333'
  32 + value: { type: String, default: '' }
  33 + },
  34 + data() {
  35 + return {
  36 + innerValue: [] // 内部维护数组形式
  37 + }
  38 + },
  39 + watch: {
  40 + value(v) { this.initInnerValue(v) },
  41 + visible(v) { v ? this.open() : this.close() }
  42 + },
  43 + mounted() {
  44 + if (this.visible) this.open()
  45 + },
  46 + methods: {
  47 + initInnerValue(val) {
  48 + if (!val) {
  49 + this.innerValue = []
  50 + } else {
  51 + this.innerValue = String(val).split(',').filter(x => x)
  52 + }
  53 + },
  54 + open() {
  55 + this.initInnerValue(this.value)
  56 + this.$refs.popup && this.$refs.popup.open()
  57 + this.$emit('update:visible', true)
  58 + },
  59 + close() {
  60 + this.$refs.popup && this.$refs.popup.close()
  61 + this.$emit('update:visible', false)
  62 + },
  63 + displayOf(opt) {
  64 + if (!opt) return ''
  65 + return opt.label != null ? String(opt.label) : ''
  66 + },
  67 + valueOf(opt) {
  68 + if (!opt) return ''
  69 + return opt.value != null ? String(opt.value) : ''
  70 + },
  71 + isSelected(opt) {
  72 + const v = this.valueOf(opt)
  73 + return this.innerValue.includes(v)
  74 + },
  75 + toggle(opt) {
  76 + const v = this.valueOf(opt)
  77 + const idx = this.innerValue.indexOf(v)
  78 + if (idx > -1) {
  79 + this.innerValue.splice(idx, 1)
  80 + } else {
  81 + this.innerValue.push(v)
  82 + }
  83 + },
  84 + onCancel() {
  85 + this.close()
  86 + this.$emit('cancel')
  87 + },
  88 + onConfirm() {
  89 + const selectedValues = this.innerValue
  90 + // 保持原始选项顺序
  91 + const sortedValues = []
  92 + const sortedLabels = []
  93 +
  94 + this.options.forEach(opt => {
  95 + const v = this.valueOf(opt)
  96 + if (selectedValues.includes(v)) {
  97 + sortedValues.push(v)
  98 + sortedLabels.push(this.displayOf(opt))
  99 + }
  100 + })
  101 +
  102 + const valStr = sortedValues.join(',')
  103 + const labelStr = sortedLabels.join(',')
  104 +
  105 + this.$emit('confirm', { value: valStr, label: labelStr })
  106 + this.$emit('input', valStr)
  107 + this.$emit('update:value', valStr)
  108 + this.close()
  109 + }
  110 + }
  111 +}
  112 +</script>
  113 +
  114 +<style lang="scss" scoped>
  115 +.sheet {
  116 + width: 100%;
  117 + max-height: 45vh;
  118 + background: #fff;
  119 + border-radius: 20rpx 20rpx 0 0;
  120 + display: flex;
  121 + flex-direction: column;
  122 +}
  123 +.sheet-header {
  124 + display: flex;
  125 + align-items: center;
  126 + justify-content: space-between;
  127 + padding: 30rpx 32rpx;
  128 + border-bottom: 1rpx solid #f0f0f0;
  129 +}
  130 +.title {
  131 + font-size: 36rpx;
  132 + font-weight: 600;
  133 +}
  134 +.cancel {
  135 + color: rgba(0,0,0,0.6);
  136 + font-size: 28rpx;
  137 +}
  138 +.ok {
  139 + color: $theme-primary;
  140 + font-size: 28rpx;
  141 +}
  142 +.sheet-body {
  143 + flex: 1 1 auto;
  144 + overflow-y: auto;
  145 + padding: 32rpx;
  146 +}
  147 +.option {
  148 + padding: 20rpx;
  149 + line-height: 40rpx;
  150 + background: #fff;
  151 + text-align: center;
  152 + border-radius: 12rpx;
  153 + font-size: 32rpx;
  154 + margin-bottom: 20rpx;
  155 + .label {
  156 + color: rgba(0,0,0,0.6);
  157 + font-size: 32rpx;
  158 + }
  159 + &.selected {
  160 + background: #f3f3f3;
  161 + .label {
  162 + color: rgba(0,0,0,0.9);
  163 + }
  164 + }
  165 +}
  166 +</style>
\ No newline at end of file
... ...
... ... @@ -129,7 +129,7 @@ export default {
129 129 if (this.source === 'customer') {
130 130 console.log('customer_extra', extra)
131 131 const source = (extra && extra.source) || '';
132   - const params = { pageIndex, pageSize, name, source }
  132 + const params = { pageIndex, pageSize, name, source, available: true }
133 133 return customerQueryApi(params).then(res => {
134 134 const _data = res.data || {}
135 135 const records = _data.datas || []
... ... @@ -139,7 +139,7 @@ export default {
139 139 })
140 140 } else if (this.source === 'user') {
141 141 // 人员表
142   - const params = { pageIndex, pageSize, name }
  142 + const params = { pageIndex, pageSize, name, available: true }
143 143 return userSelector(params).then(res => {
144 144 const _data = res.data || {}
145 145 const records = _data.datas || _data.records || _data.list || []
... ... @@ -149,9 +149,10 @@ export default {
149 149 })
150 150 } else if (this.source === 'orderAssoc') {
151 151 console.log('orderAssoc_extra', extra)
152   - // 订单关联表(可撤销/变更的订货单)
  152 + // 订单关联表(可撤销/变更的订货单、可发货的订货单)
  153 + // 支持 订单编号&订货单位 模糊搜索 searchKey
153 154 const queryType = (extra && extra.queryType) || ''
154   - const params = { pageIndex, pageSize, orderNo: name, queryType }
  155 + const params = { pageIndex, pageSize, searchKey: name, queryType }
155 156 return listCanRevokeOrChangeOrderInfo(params).then(res => {
156 157 const _data = res.data || {}
157 158 const records = _data.datas || _data.records || _data.list || []
... ... @@ -233,13 +234,13 @@ export default {
233 234 .cancel { color: rgba(0,0,0,0.6); font-size: 28rpx; }
234 235 .ok { color: $theme-primary; font-size: 28rpx; }
235 236 .sheet-search { padding: 16rpx 24rpx; }
236   -.sheet-body {
237   - flex: 1 1 auto; overflow-y: auto; padding: 24rpx;
  237 +.sheet-body {
  238 + flex: 1 1 auto; overflow-y: auto; padding: 24rpx;
238 239 background: #f3f3f3;
239 240 }
240 241 .card { background: #fff; }
241   -.card.selected {
242   - background-color: #fff;
  242 +.card.selected {
  243 + background-color: #fff;
243 244 position: relative;
244 245 &::after {
245 246 content: '';
... ...
... ... @@ -656,6 +656,134 @@
656 656 "navigationBarBackgroundColor": "#ffffff",
657 657 "navigationBarTextStyle": "black"
658 658 }
  659 + },
  660 + {
  661 + "path": "pages/invoice/index",
  662 + "style": {
  663 + "navigationBarTitleText": "发货单",
  664 + "navigationBarBackgroundColor": "#ffffff",
  665 + "navigationBarTextStyle": "black"
  666 + }
  667 + },
  668 + {
  669 + "path": "pages/invoice/detail",
  670 + "style": {
  671 + "navigationBarTitleText": "发货单详情",
  672 + "navigationBarBackgroundColor": "#ffffff",
  673 + "navigationBarTextStyle": "black"
  674 + }
  675 + },
  676 + {
  677 + "path": "pages/invoice/fill",
  678 + "style": {
  679 + "navigationBarTitleText": "发货单填写实发数",
  680 + "navigationBarBackgroundColor": "#ffffff",
  681 + "navigationBarTextStyle": "black"
  682 + }
  683 + },
  684 + {
  685 + "path": "pages/delay_invoice/index",
  686 + "style": {
  687 + "navigationBarTitleText": "延期发货单",
  688 + "navigationBarBackgroundColor": "#ffffff",
  689 + "navigationBarTextStyle": "black"
  690 + }
  691 + },
  692 + {
  693 + "path": "pages/delay_invoice/detail",
  694 + "style": {
  695 + "navigationBarTitleText": "延期发货单详情",
  696 + "navigationBarBackgroundColor": "#ffffff",
  697 + "navigationBarTextStyle": "black"
  698 + }
  699 + },
  700 + {
  701 + "path": "pages/delay_invoice/modify",
  702 + "style": {
  703 + "navigationBarTitleText": "编辑延期发货单",
  704 + "navigationBarBackgroundColor": "#ffffff",
  705 + "navigationBarTextStyle": "black"
  706 + }
  707 + },
  708 + {
  709 + "path": "pages/draft_order/index",
  710 + "style": {
  711 + "navigationBarTitleText": "草稿要车单",
  712 + "navigationBarBackgroundColor": "#ffffff",
  713 + "navigationBarTextStyle": "black"
  714 + }
  715 + },
  716 + {
  717 + "path": "pages/draft_order/detail",
  718 + "style": {
  719 + "navigationBarTitleText": "草稿要车单详情",
  720 + "navigationBarBackgroundColor": "#ffffff",
  721 + "navigationBarTextStyle": "black"
  722 + }
  723 + },
  724 + {
  725 + "path": "pages/draft_order/modify",
  726 + "style": {
  727 + "navigationBarTitleText": "编辑草稿要车单",
  728 + "navigationBarBackgroundColor": "#ffffff",
  729 + "navigationBarTextStyle": "black"
  730 + }
  731 + },
  732 + {
  733 + "path": "pages/car_request_order/index",
  734 + "style": {
  735 + "navigationBarTitleText": "要车单",
  736 + "navigationBarBackgroundColor": "#ffffff",
  737 + "navigationBarTextStyle": "black"
  738 + }
  739 + },
  740 + {
  741 + "path": "pages/car_request_order/detail",
  742 + "style": {
  743 + "navigationBarTitleText": "要车单详情",
  744 + "navigationBarBackgroundColor": "#ffffff",
  745 + "navigationBarTextStyle": "black"
  746 + }
  747 + },
  748 + {
  749 + "path": "pages/replenishment_order/index",
  750 + "style": {
  751 + "navigationBarTitleText": "补货单",
  752 + "navigationBarBackgroundColor": "#ffffff",
  753 + "navigationBarTextStyle": "black"
  754 + }
  755 + },
  756 + {
  757 + "path": "pages/replenishment_order/add",
  758 + "style": {
  759 + "navigationBarTitleText": "新增补货单",
  760 + "navigationBarBackgroundColor": "#ffffff",
  761 + "navigationBarTextStyle": "black"
  762 + }
  763 + },
  764 + {
  765 + "path": "pages/replenishment_order/detail",
  766 + "style": {
  767 + "navigationBarTitleText": "补货单详情",
  768 + "navigationBarBackgroundColor": "#ffffff",
  769 + "navigationBarTextStyle": "black"
  770 + }
  771 + },
  772 + {
  773 + "path": "pages/replenishment_order/modify",
  774 + "style": {
  775 + "navigationBarTitleText": "编辑补货单",
  776 + "navigationBarBackgroundColor": "#ffffff",
  777 + "navigationBarTextStyle": "black"
  778 + }
  779 + },
  780 + {
  781 + "path": "pages/replenishment_order/fill",
  782 + "style": {
  783 + "navigationBarTitleText": "填写补货时间",
  784 + "navigationBarBackgroundColor": "#ffffff",
  785 + "navigationBarTextStyle": "black"
  786 + }
659 787 }
660 788 ],
661 789 "subPackages": [
... ...
  1 +<template>
  2 + <view class="page">
  3 + <scroll-view class="scroll" scroll-y>
  4 + <view class="detail-page">
  5 + <view class="section">
  6 + <text class="row company">{{ form.orderingUnitName }}</text>
  7 + <view class="row"><text class="label">要车日期</text><text class="value">{{ form.requestCarDate }}</text></view>
  8 + <view class="row"><text class="label">要车办事处</text><text class="value">{{ form.deptName }}</text></view>
  9 + <view class="row"><text class="label">计划装货日期</text><text class="value">{{ form.deliveryDate }}</text></view>
  10 + <view class="row"><text class="label">装货厂别</text><text class="value">{{ form.workshopName }}</text></view>
  11 + <view class="row"><text class="label">订单编号</text><text class="value">{{ form.orderNo }}</text></view>
  12 + <view class="row"><text class="label">卸货地点</text><text class="value">{{ form.destination }}</text></view>
  13 + <view class="row"><text class="label">计划吨位(kg)</text><text class="value">{{ form.quantity }}</text></view>
  14 + <view class="row"><text class="label">接货人/联络人</text><text class="value">{{ form.consignee }}</text></view>
  15 + <view class="row"><text class="label">联系电话</text><text class="value">{{ form.phone }}</text></view>
  16 + <view class="row"><text class="label">装货时间</text><text class="value">{{ form.loadingTime }}</text></view>
  17 + <view class="row"><text class="label">外办审核人</text><text class="value">{{ form.externalAuditorName }}</text></view>
  18 + <view class="row"><text class="label">经营办审核人</text><text class="value">{{ form.businessOfficeAuditorName }}</text></view>
  19 + <view class="row"><text class="label">运作科审核人</text><text class="value">{{ form.operationsDepartmentAuditorName }}</text></view>
  20 + <view class="row"><text class="label">回货计划安排</text><text class="value">{{ form.returnPlanArrangement }}</text></view>
  21 + <view class="row"><text class="label">特殊需求、其他等</text><text class="value">{{ form.other }}</text></view>
  22 + <view class="row"><text class="label">装货特别要求/需求</text><text class="value">{{ form.specialLoadingRequirement }}</text></view>
  23 + </view>
  24 + </view>
  25 + </scroll-view>
  26 + </view>
  27 +</template>
  28 +
  29 +<script>
  30 +import { getDetailApi } from '@/api/car_request_order.js'
  31 +
  32 +export default {
  33 + name: 'CarRequestOrderDetail',
  34 + data() {
  35 + return {
  36 + form: {},
  37 + }
  38 + },
  39 + computed: {
  40 + },
  41 + onLoad(query) {
  42 + const id = (query && (query.id || query.code)) || ''
  43 + if (id) this.loadDetail(id)
  44 + },
  45 + methods: {
  46 + async loadDetail(id) {
  47 + try {
  48 + const res = await getDetailApi(id)
  49 + this.form = res.data || {}
  50 + } catch (e) {
  51 + this.form = {}
  52 + }
  53 + }
  54 + }
  55 +}
  56 +</script>
  57 +
  58 +<style lang="scss" scoped>
  59 +.page {
  60 + display: flex;
  61 + flex-direction: column;
  62 + height: 100vh;
  63 +}
  64 +
  65 +.scroll {
  66 + flex: 1;
  67 + background: #f3f3f3;
  68 +}
  69 +
  70 +.detail-page {
  71 +}
  72 +
  73 +.section {
  74 + padding: 32rpx;
  75 + background: #fff;
  76 + margin-bottom: 20rpx;
  77 + position: relative;
  78 +}
  79 +
  80 +.row {
  81 + display: flex;
  82 + margin-bottom: 28rpx;
  83 +
  84 + &:last-child {
  85 + margin-bottom: 0;
  86 + }
  87 +
  88 + &.company {
  89 + font-size: 36rpx;
  90 + font-weight: 600;
  91 + color: rgba(0, 0, 0, 0.9);
  92 + padding-top: 10rpx;
  93 + margin-bottom: 32rpx;
  94 + line-height: 50rpx;
  95 + }
  96 +
  97 + .label {
  98 + width: 240rpx;
  99 + line-height: 32rpx;
  100 + font-size: 28rpx;
  101 + color: rgba(0, 0, 0, 0.6);
  102 + }
  103 +
  104 + .value {
  105 + flex: 1;
  106 + line-height: 32rpx;
  107 + font-size: 28rpx;
  108 + color: rgba(0, 0, 0, 0.9);
  109 + text-align: right;
  110 + word-break: break-all;
  111 + }
  112 +}
  113 +
  114 +.title-header {
  115 + background-color: #fff;
  116 + display: flex;
  117 + align-items: center;
  118 + padding: 32rpx 32rpx 22rpx;
  119 + border-bottom: 1rpx dashed #f0f0f0;
  120 +
  121 + &_icon {
  122 + width: 32rpx;
  123 + height: 28rpx;
  124 + margin-right: 16rpx;
  125 + }
  126 +
  127 + span {
  128 + color: rgba(0, 0, 0, 0.9);
  129 + font-size: 32rpx;
  130 + line-height: 44rpx;
  131 + font-weight: 600;
  132 + }
  133 +}
  134 +</style>
... ...
  1 +<template>
  2 + <view class="page">
  3 + <view class="dev-list-fixed">
  4 + <view class="search-row">
  5 + <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入客户名称或者订单编号" clearButton="auto"
  6 + cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search"
  7 + @input="onSearchInput" />
  8 + <view class="tool-icons">
  9 + <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" />
  10 + </view>
  11 + </view>
  12 + </view>
  13 +
  14 +
  15 + <!-- 列表卡片组件 -->
  16 + <view class="list-box">
  17 + <card-list ref="cardRef" :fetch-fn="fetchList" :query="query" :extra="extraParams" row-key="id"
  18 + :enable-refresh="true" :enable-load-more="true" @loaded="onCardLoaded" @error="onCardError">
  19 + <template v-slot="{ item, selected }">
  20 + <view class="card" @click.stop="onCardClick(item)">
  21 + <view class="card-header">
  22 + <text class="title omit2">{{ item.orderingUnitName }}</text>
  23 + </view>
  24 + <view class="info-row">
  25 + <text>订单编号</text><text>{{ item.orderNo || '-' }}</text>
  26 + </view>
  27 + <view class="info-row">
  28 + <text>要车办事处</text><text>{{ item.deptName || '-' }}</text>
  29 + </view>
  30 + <view class="info-row">
  31 + <text>装货厂别</text><text>{{ item.workshopName || '-' }}</text>
  32 + </view>
  33 + <view class="info-row">
  34 + <text>要车日期</text><text>{{ item.requestCarDate || '-' }}</text>
  35 + </view>
  36 + </view>
  37 + </template>
  38 + </card-list>
  39 + </view>
  40 +
  41 +
  42 +
  43 + <!-- 筛选弹框 -->
  44 + <filter-modal :visible.sync="filterVisible" :value.sync="filterForm" title="筛选" @reset="onFilterReset"
  45 + @confirm="onFilterConfirm">
  46 + <template v-slot="{ model }">
  47 + <view class="filter-form">
  48 + <view class="form-item">
  49 + <view class="label">办事处</view>
  50 + <uni-easyinput v-model="model.deptName" placeholder="请输入办事处" :inputBorder="false"
  51 + placeholderStyle="font-size:14px" @input="onDeptNameInput" />
  52 + </view>
  53 +
  54 + <view class="form-item">
  55 + <view class="label">装货厂别</view>
  56 + <uni-data-checkbox mode="tag" :multiple="false" :value-field="'value'" :text-field="'text'"
  57 + v-model="model.workshopId" @change="onWorkshopChange" :localdata="workshopOptions" />
  58 + </view>
  59 +
  60 + <view class="form-item">
  61 + <view class="label">要车日期</view>
  62 + <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" @change="onDateChange($event, model)" />
  63 + </view>
  64 + </view>
  65 + </template>
  66 + </filter-modal>
  67 + </view>
  68 +</template>
  69 +
  70 +<script>
  71 +import CardList from '@/components/card/index.vue'
  72 +import FilterModal from '@/components/filter/index.vue'
  73 +import { workshopQueryApi } from '@/api/devManage.js'
  74 +import SingleSelectSheet from '@/components/single-select/index.vue'
  75 +import {
  76 + queryApi
  77 +} from '@/api/car_request_order.js'
  78 +import {
  79 + getDicByCodes
  80 +} from '@/utils/dic'
  81 +import {
  82 + getDicName
  83 +} from '@/utils/dic.js'
  84 +
  85 +export default {
  86 + components: {
  87 + CardList,
  88 + FilterModal,
  89 + SingleSelectSheet
  90 + },
  91 + data() {
  92 + return {
  93 + searchKeyword: '',
  94 + searchKeywordDebounced: '',
  95 + tabs: [],
  96 + // 给到 card 的筛选值
  97 + query: {
  98 + status: '',
  99 + companySuggestedCategory: '',
  100 + dateRange: []
  101 + },
  102 + extraParams: {},
  103 +
  104 + // 批量选择
  105 + rowKey: 'id',
  106 + currentItems: [],
  107 +
  108 + // 筛选弹框
  109 + filterVisible: false,
  110 + filterForm: {
  111 + status: '',
  112 + dateRange: []
  113 + },
  114 + dicOptions: {
  115 + SHIP_ORDER_STATUS: [],
  116 + },
  117 + statusLocal: [],
  118 + workshopOptions: [],
  119 + }
  120 + },
  121 + computed: {
  122 + extraCombined() {
  123 + return {
  124 + searchKey: this.searchKeywordDebounced || undefined
  125 + }
  126 + }
  127 + },
  128 + watch: {
  129 + extraCombined: {
  130 + deep: true,
  131 + handler(v) {
  132 + this.extraParams = v
  133 + },
  134 + immediate: true
  135 + },
  136 +
  137 + },
  138 + created() {
  139 + this.loadWorkshopOptions()
  140 + },
  141 + onLoad() { },
  142 + // 页面触底兜底:当页面自身滚动到底部时,转调卡片组件加载更多
  143 + onReachBottom() {
  144 + if (this.$refs && this.$refs.cardRef && this.$refs.cardRef.onLoadMore) {
  145 + this.$refs.cardRef.onLoadMore()
  146 + }
  147 + },
  148 + beforeDestroy() {
  149 + if (this.searchDebounceTimer) {
  150 + clearTimeout(this.searchDebounceTimer)
  151 + this.searchDebounceTimer = null
  152 + }
  153 + },
  154 + methods: {
  155 + async loadWorkshopOptions() {
  156 + try {
  157 + const res = await workshopQueryApi({ pageIndex: 1, pageSize: 9999 })
  158 + const list = (res && res.data && res.data.datas) || []
  159 + this.workshopOptions = list.map(it => ({ text: it.name || it.workshopName || '', value: it.id || it.workshopId || '' }))
  160 + } catch (e) {
  161 + this.workshopOptions = []
  162 + }
  163 + },
  164 + onCardLoaded({
  165 + items
  166 + }) {
  167 + this.currentItems = items
  168 + },
  169 + onCardError() {
  170 + uni.showToast({
  171 + title: '列表加载失败',
  172 + icon: 'none'
  173 + })
  174 + },
  175 + // 输入实时搜索:1200ms 防抖,仅在停止输入超过阈值后刷新
  176 + onSearchInput(val) {
  177 + if (this.searchDebounceTimer) clearTimeout(this.searchDebounceTimer)
  178 + this.searchDebounceTimer = setTimeout(() => {
  179 + this.searchKeywordDebounced = this.searchKeyword
  180 + this.searchDebounceTimer = null
  181 + }, 1200)
  182 + },
  183 + // uni-search-bar 确认搜索:更新关键字并触发 CardList 刷新
  184 + search(e) {
  185 + const val = e && e.value != null ? e.value : this.searchKeyword
  186 + this.searchKeyword = val
  187 + this.searchKeywordDebounced = val
  188 + },
  189 + onAdd() {
  190 + uni.navigateTo({
  191 + url: '/pages/credit_manage/add'
  192 + })
  193 + },
  194 + openFilter() {
  195 + this.filterVisible = true
  196 + },
  197 + onFilterReset(payload) {
  198 + this.filterForm = payload
  199 + },
  200 + onFilterConfirm(payload) {
  201 + if ((payload.status === '' || payload.status == null) && this.filterForm.status !== '') {
  202 + payload.status = this.filterForm.status
  203 + }
  204 + this.query = {
  205 + ...payload
  206 + }
  207 + },
  208 + onStatusChange(e) {
  209 + const raw = e && e.detail && e.detail.value !== undefined ?
  210 + e.detail.value :
  211 + (e && e.value !== undefined ? e.value : '')
  212 + this.filterForm.status = raw
  213 + },
  214 +
  215 + // 列表接口(真实请求)
  216 + fetchList({
  217 + pageIndex,
  218 + pageSize,
  219 + query,
  220 + extra
  221 + }) {
  222 + const params = {
  223 + pageIndex,
  224 + pageSize,
  225 + ...extra,
  226 + ...query
  227 + }
  228 + if (Array.isArray(params.dateRange) && params.dateRange.length === 2) {
  229 + params.requestCarDateStart = params.dateRange[0]
  230 + params.requestCarDateEnd = params.dateRange[1]
  231 + delete params.dateRange
  232 + }
  233 + if (this.searchKeywordDebounced) {
  234 + params.searchKey = this.searchKeywordDebounced
  235 + }
  236 + return queryApi(params)
  237 + .then(res => {
  238 + const _data = res.data || {};
  239 + const records = _data.datas || [];
  240 + const totalCount = _data.totalCount || 0;
  241 + const hasNext = _data.hasNext || false
  242 + return {
  243 + records,
  244 + totalCount,
  245 + hasNext
  246 + }
  247 + })
  248 + .catch(err => {
  249 + console.error('fetchList error', err)
  250 + this.onCardError()
  251 + return {
  252 + records: [],
  253 + totalCount: 0,
  254 + hasNext: false
  255 + }
  256 + })
  257 + },
  258 + onCardClick(item) {
  259 + const id = (item && (item.id || item.code)) || ''
  260 + if (!id) return
  261 + const query = '?id=' + encodeURIComponent(id)
  262 + uni.navigateTo({
  263 + url: '/pages/car_request_order/detail' + query
  264 + })
  265 + },
  266 + getDicName: getDicName,
  267 + getCategoryClass(categoryName) {
  268 + if (!categoryName) return ''
  269 + if (categoryName.includes('A') || categoryName.includes('a')) {
  270 + return 'category_A'
  271 + } else if (categoryName.includes('B') || categoryName.includes('b')) {
  272 + return 'category_B'
  273 + } else if (categoryName.includes('C') || categoryName.includes('c')) {
  274 + return 'category_C'
  275 + } else if (categoryName.includes('D') || categoryName.includes('d')) {
  276 + return 'category_D'
  277 + }
  278 + },
  279 + onDeptNameInput(val) {
  280 + this.filterForm.deptName = val
  281 + },
  282 + onWorkshopChange(e) {
  283 + const raw = e && e.detail && e.detail.value !== undefined ? e.detail.value : (e && e.value !== undefined ? e.value : '')
  284 + this.filterForm.workshopId = raw
  285 + const match = (this.workshopOptions || []).find(o => String(o.value) === String(raw))
  286 + this.filterForm.workshopIdName = match ? (match.text || '') : ''
  287 + },
  288 + onDateChange(e, model) {
  289 + // 确保同步更新 filterForm,避免数据不同步
  290 + this.filterForm.dateRange = e
  291 + },
  292 +
  293 + }
  294 +}
  295 +</script>
  296 +
  297 +<style lang="scss" scoped>
  298 +.page {
  299 + display: flex;
  300 + flex-direction: column;
  301 + height: 100vh;
  302 +}
  303 +
  304 +.dev-list-fixed {
  305 + position: fixed;
  306 + top: 96rpx;
  307 + left: 0;
  308 + right: 0;
  309 + z-index: 2;
  310 + background: #fff;
  311 +
  312 + .search-row {
  313 + display: flex;
  314 + align-items: center;
  315 + padding: 16rpx 32rpx;
  316 +
  317 + .uni-searchbar {
  318 + padding: 0;
  319 + flex: 1;
  320 + }
  321 +
  322 + .tool-icons {
  323 + display: flex;
  324 +
  325 + .tool-icon {
  326 + width: 48rpx;
  327 + height: 48rpx;
  328 + display: block;
  329 + margin-left: 32rpx;
  330 + }
  331 + }
  332 + }
  333 +
  334 +}
  335 +
  336 +/* 仅当前页覆盖 uni-search-bar 盒子高度 */
  337 +::v-deep .uni-searchbar__box {
  338 + height: 80rpx !important;
  339 + justify-content: start;
  340 +
  341 + .uni-searchbar__box-search-input {
  342 + font-size: 32rpx !important;
  343 + }
  344 +}
  345 +
  346 +.list-box {
  347 + flex: 1;
  348 + padding-top: 140rpx;
  349 +
  350 + &.pad-batch {
  351 + padding-bottom: 144rpx;
  352 + }
  353 +
  354 + .card {
  355 + position: relative;
  356 + }
  357 +
  358 + .card-header {
  359 + margin-bottom: 28rpx;
  360 + position: relative;
  361 +
  362 + .title {
  363 + font-size: 36rpx;
  364 + font-weight: 600;
  365 + line-height: 50rpx;
  366 + color: rgba(0, 0, 0, 0.9);
  367 + width: 578rpx;
  368 + }
  369 +
  370 + .status-box {
  371 + position: absolute;
  372 + top: -32rpx;
  373 + right: -12rpx;
  374 +
  375 + .status {
  376 + display: block;
  377 + height: 48rpx;
  378 + line-height: 48rpx;
  379 + font-weight: 600;
  380 + color: #fff;
  381 + font-size: 24rpx;
  382 + padding: 0 14rpx;
  383 + border-radius: 6rpx;
  384 + margin-bottom: 8rpx;
  385 +
  386 + // 已签收
  387 + &.status_DELIVERED {
  388 + background: #E7E7E7;
  389 + color: rgba(0, 0, 0, 0.9);
  390 + }
  391 +
  392 + // 已发货
  393 + &.status_SHIPMENTS {
  394 + background: #2BA471;
  395 + }
  396 +
  397 + // 未发货
  398 + &.status_UN_SHIPMENTS {
  399 + background: #D54941;
  400 + }
  401 + }
  402 +
  403 + .status2 {
  404 + display: block;
  405 + font-weight: 600;
  406 + line-height: 48rpx;
  407 + height: 48rpx;
  408 + color: #fff;
  409 + font-size: 24rpx;
  410 + padding: 0 14rpx;
  411 + border-radius: 6rpx;
  412 + background: #E7E7E7;
  413 + color: rgba(0, 0, 0, 0.9);
  414 +
  415 + }
  416 +
  417 + }
  418 +
  419 + }
  420 +
  421 + .info-row {
  422 + display: flex;
  423 + align-items: center;
  424 + color: rgba(0, 0, 0, 0.6);
  425 + font-size: 28rpx;
  426 + margin-bottom: 24rpx;
  427 +
  428 + &:last-child {
  429 + margin-bottom: 0;
  430 + }
  431 +
  432 + text {
  433 + width: 60%;
  434 + line-height: 32rpx;
  435 +
  436 + &:last-child {
  437 + color: rgba(0, 0, 0, 0.9);
  438 + width: 40%;
  439 + }
  440 +
  441 + &.category {
  442 + display: inline-block;
  443 + padding: 4rpx 12rpx;
  444 + border-radius: 6rpx;
  445 + font-size: 24rpx;
  446 + width: auto;
  447 +
  448 + &.category_A {
  449 + background: #FFF0ED;
  450 + color: #D54941;
  451 + }
  452 +
  453 + &.category_B {
  454 + background: #FFF1E9;
  455 + color: #E37318;
  456 + }
  457 +
  458 + &.category_C {
  459 + background: #F2F3FF;
  460 + color: $theme-primary;
  461 + }
  462 +
  463 + &.category_D {
  464 + background: #E3F9E9;
  465 + color: #2BA471;
  466 + }
  467 + }
  468 + }
  469 +
  470 + }
  471 +}
  472 +
  473 +.filter-form {
  474 + .form-item {
  475 + margin-bottom: 24rpx;
  476 + }
  477 +
  478 + .label {
  479 + margin-bottom: 20rpx;
  480 + color: rgba(0, 0, 0, 0.9);
  481 + height: 44rpx;
  482 + line-height: 44rpx;
  483 + font-size: 30rpx;
  484 + }
  485 +
  486 + .uni-easyinput {
  487 + border: 1rpx solid #f3f3f3;
  488 + }
  489 +
  490 +}
  491 +
  492 +/* 深度覆盖 uni-data-checkbox(mode=tag)内部的 tag 展示与间距 */
  493 +::v-deep .filter-form .uni-data-checklist .checklist-group {
  494 + .checklist-box {
  495 + &.is--tag {
  496 + width: 212rpx;
  497 + margin-top: 0;
  498 + margin-bottom: 24rpx;
  499 + margin-right: 24rpx;
  500 + height: 80rpx;
  501 + padding: 0;
  502 + border-radius: 12rpx;
  503 + background-color: #f3f3f3;
  504 + border-color: #f3f3f3;
  505 +
  506 + &:nth-child(3n) {
  507 + margin-right: 0;
  508 + }
  509 +
  510 + .checklist-content {
  511 + display: flex;
  512 + justify-content: center;
  513 + }
  514 +
  515 + .checklist-text {
  516 + color: rgba(0, 0, 0, 0.9);
  517 + font-size: 28rpx;
  518 + }
  519 + }
  520 +
  521 + &.is-checked {
  522 + background-color: $theme-primary-plain-bg !important;
  523 + border-color: $theme-primary-plain-bg !important;
  524 +
  525 + .checklist-text {
  526 + color: $theme-primary !important;
  527 + }
  528 + }
  529 + }
  530 +
  531 +}
  532 +</style>
... ...
... ... @@ -393,7 +393,8 @@ export default {
393 393 const v = Number(it && it.quantity)
394 394 return acc + (isNaN(v) ? 0 : v)
395 395 }, 0)
396   - this.form.afterTotalQuantity = sum
  396 + const fixedSum = Number(sum.toFixed(2))
  397 + this.form.afterTotalQuantity = fixedSum
397 398 },
398 399 }
399 400 }
... ... @@ -622,7 +623,6 @@ export default {
622 623 color: rgba(0, 0, 0, 0.9);
623 624 padding-bottom: 16rpx;
624 625 margin-bottom: 24rpx;
625   - ;
626 626 border-bottom: 1px dashed #E7E7E7;
627 627 }
628 628
... ... @@ -635,15 +635,16 @@ export default {
635 635 width: 180rpx;
636 636 margin-right: 14rpx;
637 637 color: rgba(0, 0, 0, 0.6);
638   - font-size: 28rpx;
  638 + font-size: 32rpx;
639 639 }
640 640
641 641 .value {
642 642 flex: 1;
643 643 color: rgba(0, 0, 0, 0.9);
644   - font-size: 28rpx;
  644 + font-size: 32rpx;
645 645 white-space: pre-wrap;
646 646 word-break: break-all;
  647 + font-weight: 600;
647 648 }
648 649 }
649 650 }
... ...
... ... @@ -24,7 +24,7 @@
24 24 <view class="mgb10">
25 25 <Product title="变更后" mode="view" :list="form.afterChangeSpecList" :totalQuantity="form.afterTotalQuantity || 0" />
26 26 </view>
27   -
  27 +
28 28 <view class="section">
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>
... ... @@ -34,7 +34,7 @@
34 34 <view v-if="form.executionStandard === 'OTHER'" class="row"><text class="label">标准</text><text class="value">{{ form.executionStandardRemarks }}</text></view>
35 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">
39 39 <image class="title-header_icon" src="/static/images/title.png" />
40 40 <span>具体质量要求</span>
... ... @@ -171,7 +171,7 @@ export default {
171 171 uni.showToast({ title: '已确认变更', icon: 'none' })
172 172 setTimeout(() => { uni.redirectTo({ url: '/pages/change_list/index' }) }, 300)
173 173 }).catch(() => {
174   - uni.showToast({ title: '确认变更失败', icon: 'none' })
  174 + uni.showToast({ title: '确认变更失败', icon: 'none' })
175 175 })
176 176 }
177 177 }
... ... @@ -289,6 +289,7 @@ export default {
289 289
290 290 .label {
291 291 max-width: 420rpx;
  292 + margin-right: 20rpx;
292 293 line-height: 32rpx;
293 294 font-size: 28rpx;
294 295 color: rgba(0, 0, 0, 0.6);
... ... @@ -300,6 +301,8 @@ export default {
300 301 font-size: 28rpx;
301 302 color: rgba(0, 0, 0, 0.9);
302 303 text-align: right;
  304 + white-space: pre-wrap;
  305 + word-break: break-all;
303 306
304 307 &.act {
305 308 color: $theme-primary;
... ...
... ... @@ -228,7 +228,7 @@ export default {
228 228
229 229 .list-box {
230 230 flex: 1;
231   - padding: 120rpx 0 0;
  231 + padding: 140rpx 0 0;
232 232 }
233 233
234 234 .card {
... ... @@ -250,7 +250,7 @@ export default {
250 250 font-weight: 600;
251 251 position: absolute;
252 252 top: -32rpx;
253   - right: -32rpx;
  253 + right: -12rpx;
254 254 height: 48rpx;
255 255 line-height: 48rpx;
256 256 color: #fff;
... ...
... ... @@ -312,7 +312,8 @@ export default {
312 312 const v = Number(it && it.quantity)
313 313 return acc + (isNaN(v) ? 0 : v)
314 314 }, 0)
315   - this.form.afterTotalQuantity = sum
  315 + const fixedSum = Number(sum.toFixed(2));
  316 + this.form.afterTotalQuantity = fixedSum;
316 317 },
317 318 }
318 319 }
... ... @@ -541,7 +542,6 @@ export default {
541 542 color: rgba(0, 0, 0, 0.9);
542 543 padding-bottom: 16rpx;
543 544 margin-bottom: 24rpx;
544   - ;
545 545 border-bottom: 1px dashed #E7E7E7;
546 546 }
547 547
... ... @@ -554,15 +554,16 @@ export default {
554 554 width: 180rpx;
555 555 margin-right: 14rpx;
556 556 color: rgba(0, 0, 0, 0.6);
557   - font-size: 28rpx;
  557 + font-size: 32rpx;
558 558 }
559 559
560 560 .value {
561 561 flex: 1;
562 562 color: rgba(0, 0, 0, 0.9);
563   - font-size: 28rpx;
  563 + font-size: 32rpx;
564 564 white-space: pre-wrap;
565 565 word-break: break-all;
  566 + font-weight: 600;
566 567 }
567 568 }
568 569 }
... ...
... ... @@ -44,7 +44,7 @@
44 44 </uni-list-item>
45 45 <uni-list-item title="厚度公差上限(mm)">
46 46 <template v-slot:footer>
47   - <uni-easyinput type="number" v-model="item.thicknessTolPos" placeholder="请输入厚度公差上限"
  47 + <uni-easyinput type="digit" v-model="item.thicknessTolPos" placeholder="请输入厚度公差上限"
48 48 :inputBorder="false"
49 49 @input="onRealNumberInput($event, item, idx, 'thicknessTolPos')"
50 50 @blur="onRealNumberBlur(item, idx, 'thicknessTolPos')" />
... ... @@ -52,7 +52,7 @@
52 52 </uni-list-item>
53 53 <uni-list-item title="厚度公差下限(mm)">
54 54 <template v-slot:footer>
55   - <uni-easyinput type="number" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差下限"
  55 + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" placeholder="请输入厚度公差下限"
56 56 :inputBorder="false"
57 57 @input="onRealNumberInput($event, item, idx, 'thicknessTolNeg')"
58 58 @blur="onRealNumberBlur(item, idx, 'thicknessTolNeg')" />
... ... @@ -67,7 +67,7 @@
67 67 </uni-list-item>
68 68 <uni-list-item title="宽度公差上限(mm)">
69 69 <template v-slot:footer>
70   - <uni-easyinput type="number" v-model="item.widthTolPos" placeholder="请输入宽度公差上限"
  70 + <uni-easyinput type="digit" v-model="item.widthTolPos" placeholder="请输入宽度公差上限"
71 71 :inputBorder="false"
72 72 @input="onRealNumberInput($event, item, idx, 'widthTolPos')"
73 73 @blur="onRealNumberBlur(item, idx, 'widthTolPos')" />
... ... @@ -75,7 +75,7 @@
75 75 </uni-list-item>
76 76 <uni-list-item title="宽度公差下限(mm)">
77 77 <template v-slot:footer>
78   - <uni-easyinput type="number" v-model="item.widthTolNeg" placeholder="请输入宽度公差下限"
  78 + <uni-easyinput type="digit" v-model="item.widthTolNeg" placeholder="请输入宽度公差下限"
79 79 :inputBorder="false"
80 80 @input="onRealNumberInput($event, item, idx, 'widthTolNeg')"
81 81 @blur="onRealNumberBlur(item, idx, 'widthTolNeg')" />
... ... @@ -90,7 +90,7 @@
90 90 </uni-list-item>
91 91 <uni-list-item title="长度公差上限(mm)">
92 92 <template v-slot:footer>
93   - <uni-easyinput type="number" v-model="item.lengthTolPos" placeholder="请输入长度公差上限"
  93 + <uni-easyinput type="digit" v-model="item.lengthTolPos" placeholder="请输入长度公差上限"
94 94 :inputBorder="false"
95 95 @input="onRealNumberInput($event, item, idx, 'lengthTolPos')"
96 96 @blur="onRealNumberBlur(item, idx, 'lengthTolPos')" />
... ... @@ -98,7 +98,7 @@
98 98 </uni-list-item>
99 99 <uni-list-item title="长度公差下限(mm)">
100 100 <template v-slot:footer>
101   - <uni-easyinput type="number" v-model="item.lengthTolNeg" placeholder="请输入长度公差下限"
  101 + <uni-easyinput type="digit" v-model="item.lengthTolNeg" placeholder="请输入长度公差下限"
102 102 :inputBorder="false"
103 103 @input="onRealNumberInput($event, item, idx, 'lengthTolNeg')"
104 104 @blur="onRealNumberBlur(item, idx, 'lengthTolNeg')" />
... ... @@ -113,8 +113,9 @@
113 113 <template v-slot:footer>
114 114 <uni-easyinput type="digit" v-model="item.quantity" placeholder="请输入数量kg"
115 115 :inputBorder="false"
116   - @input="onNonNegativeNumberInput($event, item, idx, 'quantity')"
117   - @blur="onNonNegativeNumberBlur(item, idx, 'quantity')" />
  116 + @input="onTwoDecimalInput($event, item, idx, 'quantity')"
  117 + @blur="onTwoDecimalBlur(item, idx, 'quantity')"
  118 + />
118 119 </template>
119 120 </uni-list-item>
120 121 <uni-list-item v-if="item.showSalesPrice" title="销售价格">
... ... @@ -380,6 +381,49 @@ export default {
380 381 if (isNaN(n)) item[field] = ''
381 382 if (typeof idx === 'number') this.$set(this.items, idx, { ...item })
382 383 },
  384 + // 限制输入为2位小数
  385 + onTwoDecimalInput(val, item, idx, field) {
  386 + let v = String(val != null ? val : (item && item[field]) || '')
  387 + v = v.replace(/[^0-9.]/g, '')
  388 + v = v.replace(/(\..*)\./g, '$1')
  389 +
  390 + // Restrict to 2 decimal places
  391 + const decimalIndex = v.indexOf('.')
  392 + if (decimalIndex !== -1 && v.length > decimalIndex + 3) {
  393 + v = v.substring(0, decimalIndex + 3)
  394 + }
  395 +
  396 + if (v.startsWith('.')) v = '0' + v
  397 +
  398 + // If the value was modified (truncated or cleaned)
  399 + if (String(val) !== v) {
  400 + // Hack: Temporarily set the dirty value to trigger Vue update mechanism
  401 + // This ensures that when we set the clean value back, Vue detects a change
  402 + item[field] = val
  403 + if (typeof idx === 'number') this.$set(this.items, idx, { ...item })
  404 +
  405 + // Then revert to the clean value asynchronously
  406 + setTimeout(() => {
  407 + item[field] = v
  408 + if (typeof idx === 'number') this.$set(this.items, idx, { ...item })
  409 + }, 0)
  410 + } else {
  411 + item[field] = v
  412 + if (typeof idx === 'number') this.$set(this.items, idx, { ...item })
  413 + }
  414 + },
  415 + onTwoDecimalBlur(item, idx, field) {
  416 + let v = String((item && item[field]) || '')
  417 + const num = Number(v)
  418 + if (isNaN(num) || num < 0) {
  419 + item[field] = '0'
  420 + } else {
  421 + if (v.endsWith('.')) {
  422 + item[field] = v.slice(0, -1)
  423 + }
  424 + }
  425 + if (typeof idx === 'number') this.$set(this.items, idx, { ...item })
  426 + },
383 427 toggleViewCollapse() {
384 428 this.collapsedView = !this.collapsedView
385 429 },
... ... @@ -729,7 +773,6 @@ export default {
729 773 color: rgba(0, 0, 0, 0.9);
730 774 padding-bottom: 16rpx;
731 775 margin-bottom: 24rpx;
732   - ;
733 776 border-bottom: 1px dashed #E7E7E7;
734 777 }
735 778
... ... @@ -846,7 +889,6 @@ export default {
846 889 color: rgba(0, 0, 0, 0.9);
847 890 padding-bottom: 16rpx;
848 891 margin-bottom: 24rpx;
849   - ;
850 892 border-bottom: 1px dashed #E7E7E7;
851 893 }
852 894
... ...
... ... @@ -162,6 +162,7 @@ export default {
162 162
163 163 .label {
164 164 max-width: 420rpx;
  165 + margin-right: 20rpx;
165 166 line-height: 32rpx;
166 167 font-size: 28rpx;
167 168 color: rgba(0, 0, 0, 0.6);
... ...
... ... @@ -63,7 +63,7 @@
63 63 <ProductRel ref="productRel" mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" @change="onProductsChange" :options="productList" />
64 64 <uni-list-item title="合计人民币金额(大写)">
65 65 <template v-slot:footer>
66   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled />
  66 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false" disabled />
67 67 </template>
68 68 </uni-list-item>
69 69 <uni-list-item title="交付定金、数额、时间">
... ... @@ -555,7 +555,7 @@ export default {
555 555 async onSubmit() {
556 556 if (!this.validateRequired()) return
557 557 const confirmRes = await new Promise(resolve => {
558   - uni.showModal({ title: '提示', content: '确定新增经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  558 + uni.showModal({ title: '提示', content: '确定新增外贸标准合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
559 559 })
560 560 if (!(confirmRes && confirmRes.confirm)) return
561 561 const clean = (obj) => {
... ...
... ... @@ -59,8 +59,10 @@
59 59 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
60 60 }}</text></view>
61 61 </view>
62   - <view class="section" v-if="status === 'STANDARD'">
63   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  62 + <view class="section" v-if="detail.status === 'STANDARD'">
  63 + <view class="row"><text class="label">双方盖章合同</text><text class="value act" @click="downloadFile(detail.signedContractFileId, detail.signedContractFileName)">{{
  64 + detail.signedContractFileName || '-' }}</text></view>
  65 + <view class="row"><text class="label">规范性合同</text><text class="value act" @click="downloadFile(detail.standardFileId, detail.standardFileName)">{{
64 66 detail.standardFileName || '-' }}</text></view>
65 67 <view class="row"><text class="label">合同是否规范</text><text class="value">{{
66 68 detail.standardStandardized ? '是' : '否' }}</text></view>
... ... @@ -119,6 +121,7 @@ import DetailButtons from '@/components/detail-buttons/index.vue'
119 121 import FileUpload from '@/components/file-upload/index.vue'
120 122 import SingleSelectSheet from '@/components/single-select/index.vue'
121 123 import { fillStandardApprovedName } from '@/utils/dic.js'
  124 +import { downloadFile } from '@/utils/downloadFile.js'
122 125
123 126 export default {
124 127 name: 'ContractForeignStdDetail',
... ... @@ -229,8 +232,8 @@ export default {
229 232 { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:delete')) },
230 233 { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:upload')) },
231 234 { ...this.buttons[3], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:upload-seal')) },
  235 + { ...this.buttons[5], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:review')) },
232 236 { ...this.buttons[4], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:approve')) },
233   - { ...this.buttons[5], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-standard-contract:review')) }
234 237 ]
235 238 }
236 239 },
... ... @@ -296,7 +299,7 @@ export default {
296 299 })
297 300 return
298 301 }
299   - if (!this.standardStandardized && this.uploadType === 'standard') {
  302 + if (!this.standardStandardized && this.standardStandardized !== false && this.uploadType === 'standard') {
300 303 uni.showToast({
301 304 title: '请选择合同是否规范',
302 305 icon: 'error'
... ... @@ -374,6 +377,7 @@ export default {
374 377 uni.setStorageSync(CACHE_KEY, this.getBusinessId())
375 378 uni.navigateTo({ url: '/pages/flow/audit_detail' })
376 379 },
  380 + downloadFile,
377 381 async loadDetail() {
378 382 if (!this.id) return
379 383 try {
... ... @@ -454,6 +458,10 @@ export default {
454 458 &_已签收 {
455 459 background-image: url('~@/static/images/contract/status_4.png');
456 460 }
  461 +
  462 + &_已取消 {
  463 + background-image: url('~@/static/images/contract/status_5.png');
  464 + }
457 465 }
458 466 }
459 467
... ... @@ -473,7 +481,8 @@ export default {
473 481 }
474 482
475 483 .label {
476   - width: 310rpx;
  484 + max-width: 310rpx;
  485 + margin-right: 20rpx;
477 486 color: rgba(0, 0, 0, 0.6);
478 487 font-size: 28rpx;
479 488 }
... ... @@ -483,8 +492,16 @@ export default {
483 492 text-align: right;
484 493 color: rgba(0, 0, 0, 0.9);
485 494 font-size: 28rpx;
  495 + white-space: pre-wrap;
  496 + word-break: break-all;
  497 +
486 498 }
487 499
  500 +.act {
  501 + color: $theme-primary;
  502 + }
  503 +
  504 +
488 505 .customer {
489 506 font-weight: 600;
490 507 font-size: 36rpx;
... ... @@ -546,4 +563,7 @@ export default {
546 563 color: rgba(0, 0, 0, 0.6);
547 564 font-size: 32rpx;
548 565 }
  566 +.upload-row {
  567 + margin-top: 20rpx;
  568 +}
549 569 </style>
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
49 49 <view class="card" @click="goDetail(item)">
50 50 <view class="card-header">
51 51 <text class="title omit2">{{ item.buyerName }}</text>
52   - <text v-if="item.status === 'STANDARD'" :class="['status']" :style="{ background: statusMap[item.shippingStatusName] }">{{ item.shippingStatusName }}</text>
  52 + <text v-if="item.status === 'STANDARD'" :class="['status', 'status_' + item.shippingStatusName]">{{ item.shippingStatusName }}</text>
53 53 </view>
54 54 <view class="info-row">
55 55 <text>编号</text><text>{{ item.code }}</text>
... ... @@ -94,8 +94,7 @@
94 94 <script>
95 95 import CardList from '@/components/card/index.vue'
96 96 import FilterModal from '@/components/filter/index.vue'
97   -import { queryContractApi, statusStyle,statusMap } from '@/api/contract.js'
98   -import { officeQueryApi } from '@/api/devManage.js'
  97 +import { queryContractApi, statusStyle } from '@/api/contract.js'
99 98
100 99 export default {
101 100 components: { CardList, FilterModal },
... ... @@ -118,7 +117,6 @@ export default {
118 117 filterForm: { deptId: '', deptName: '', dateRange: [] },
119 118 deptSelectVisible: false,
120 119 statusStyle,
121   - statusMap,
122 120 }
123 121 },
124 122 computed: {
... ... @@ -329,14 +327,31 @@ export default {
329 327 font-size: 30rpx;
330 328 font-weight: 600;
331 329 position: absolute;
332   - top: -36rpx;
333   - right: -32rpx;
  330 + top: -32rpx;
  331 + right: -12rpx;
334 332 height: 48rpx;
335   - line-height: 48rpx;
  333 + line-height: 50rpx;
336 334 color: #fff;
337 335 font-size: 24rpx;
338 336 padding: 0 14rpx;
339 337 border-radius: 6rpx;
  338 + &_审批中 {
  339 + background: $theme-primary;
  340 + }
  341 + &_生产中 {
  342 + background: #2BA471;
  343 + }
  344 + &_已发货 {
  345 + background: #E37318;
  346 + }
  347 + &_已签收 {
  348 + background: #858A99;
  349 + color: #ffffff;
  350 + }
  351 + &_已取消 {
  352 + background: #9E9E9E;
  353 + color: #ffffff;
  354 + }
340 355 }
341 356 }
342 357 .info-row {
... ... @@ -366,19 +381,19 @@ export default {
366 381 }
367 382 }
368 383
369   -.filter-form {
  384 +.filter-form {
370 385 .form-item { margin-bottom: 24rpx; }
371   - .label {
372   - margin-bottom: 20rpx;
  386 + .label {
  387 + margin-bottom: 20rpx;
373 388 color: rgba(0,0,0,0.9);
374 389 height: 44rpx;
375 390 line-height: 44rpx;
376 391 font-size: 30rpx;
377 392 }
378   - .fake-select {
379   - height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
  393 + .fake-select {
  394 + height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
380 395 .placeholder { color: #999; }
381 396 .value { color: #333; }
382 397 }
383 398 }
384   -</style>
\ No newline at end of file
  399 +</style>
... ...
... ... @@ -65,7 +65,7 @@
65 65 <ProductRel ref="productRel" mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" :list="productLineList" @change="onProductsChange" :options="productList" />
66 66 <uni-list-item title="合计人民币金额(大写)">
67 67 <template v-slot:footer>
68   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false"
  68 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false"
69 69 disabled />
70 70 </template>
71 71 </uni-list-item>
... ... @@ -531,7 +531,7 @@ export default {
531 531 console.log('onSubmit__payload', payload)
532 532 if (!this.validateRequired()) return
533 533 const confirmRes = await new Promise(resolve => {
534   - uni.showModal({ title: '提示', content: '确定保存当前经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  534 + uni.showModal({ title: '提示', content: '确定保存当前外贸标准合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
535 535 })
536 536 if (!(confirmRes && confirmRes.confirm)) return
537 537 const clean = (obj) => {
... ...
... ... @@ -60,13 +60,13 @@
60 60 </uni-list-item>
61 61 <uni-list-item title="厚度公差上限(mm)">
62 62 <template v-slot:footer>
63   - <uni-easyinput type="text" v-model="item.thicknessTolPos" :inputBorder="false"
  63 + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false"
64 64 placeholder="请输入厚度公差上限" @input="onNumberInput(idx, 'thicknessTolPos')" @blur="onNumberBlur(idx, 'thicknessTolPos', 9)" />
65 65 </template>
66 66 </uni-list-item>
67 67 <uni-list-item title="厚度公差下限(mm)">
68 68 <template v-slot:footer>
69   - <uni-easyinput type="text" v-model="item.thicknessTolNeg" :inputBorder="false"
  69 + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false"
70 70 placeholder="请输入厚度公差下限" @input="onNumberInput(idx, 'thicknessTolNeg')" @blur="onNumberBlur(idx, 'thicknessTolNeg', 9)" />
71 71 </template>
72 72 </uni-list-item>
... ... @@ -77,12 +77,12 @@
77 77 </uni-list-item>
78 78 <uni-list-item title="宽度公差上限(mm)">
79 79 <template v-slot:footer>
80   - <uni-easyinput type="text" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
  80 + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
81 81 </template>
82 82 </uni-list-item>
83 83 <uni-list-item title="宽度公差下限(mm)">
84 84 <template v-slot:footer>
85   - <uni-easyinput type="text" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
  85 + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
86 86 </template>
87 87 </uni-list-item>
88 88 <uni-list-item title="长度(mm)">
... ... @@ -92,13 +92,13 @@
92 92 </uni-list-item>
93 93 <uni-list-item title="长度公差上限(mm)">
94 94 <template v-slot:footer>
95   - <uni-easyinput type="text" v-model="item.lengthTolPos" :inputBorder="false"
  95 + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false"
96 96 placeholder="请输入长度公差上限" @input="onNumberInput(idx, 'lengthTolPos')" @blur="onNumberBlur(idx, 'lengthTolPos', 9)" />
97 97 </template>
98 98 </uni-list-item>
99 99 <uni-list-item title="长度公差下限(mm)">
100 100 <template v-slot:footer>
101   - <uni-easyinput type="text" v-model="item.lengthTolNeg" :inputBorder="false"
  101 + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false"
102 102 placeholder="请输入长度公差下限" @input="onNumberInput(idx, 'lengthTolNeg')" @blur="onNumberBlur(idx, 'lengthTolNeg', 9)" />
103 103 </template>
104 104 </uni-list-item>
... ... @@ -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="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 9)" />
  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="单价">
... ... @@ -119,17 +119,17 @@
119 119 </uni-list-item>
120 120 <uni-list-item title="外贸加工费">
121 121 <template v-slot:footer>
122   - <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" />
  122 + <uni-easyinput v-model="item.processingFee" type="digit" :inputBorder="false" placeholder="请输入外贸加工费" />
123 123 </template>
124 124 </uni-list-item>
125 125 <!-- <uni-list-item title="不含税金额">
126 126 <template v-slot:footer>
127   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  127 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
128 128 </template>
129 129 </uni-list-item> -->
130 130 <uni-list-item title="总金额">
131 131 <template v-slot:footer>
132   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  132 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="" />
133 133 </template>
134 134 </uni-list-item>
135 135 <uni-list-item title="发货日期">
... ... @@ -157,29 +157,33 @@
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 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>
  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 > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos }}
168 165 </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>
  166 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}
174 167 </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>
  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 > 0 ? '+' + item.widthTolPos : item.widthTolPos }}
  173 + </view>
  174 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}
  175 + </view>
  176 + </view>
  177 + <view v-if="item.length" class="value-spec_val p12">*</view>
  178 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  179 + <view v-if="item.length" class="value-spec_box">
  180 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}
  181 + </view>
  182 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
180 183 </view>
181 184 </view>
182 185 </view>
  186 + </view>
183 187 <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
184 188 <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view>
185 189 <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice)
... ... @@ -232,12 +236,10 @@ export default {
232 236 const m = Number(parts[1])
233 237 const d = Number(parts[2])
234 238 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}`
  239 + const yy = y
  240 + const mm = String(m).padStart(2, '0')
  241 + const dd = String(d).padStart(2, '0')
  242 + return `${yy}-${mm}-${dd}`
241 243 }
242 244 },
243 245 watch: {
... ...
... ... @@ -64,9 +64,9 @@
64 64 </uni-list-item>
65 65 <ProductRel ref="productRel" mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate"
66 66 @change="onProductsChange" :options="productList" />
67   - <uni-list-item title="合计人民币金额(大写)">
  67 + <uni-list-item title="合计金额(大写)">
68 68 <template v-slot:footer>
69   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled />
  69 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false" disabled />
70 70 </template>
71 71 </uni-list-item>
72 72 <uni-list-item title="交付定金、数额、时间">
... ... @@ -189,7 +189,7 @@
189 189 <div class="total-text">
190 190 合计
191 191 </div>
192   - <div class="total-item">
  192 + <div class="total-item" style="padding: 20rpx 0;">
193 193 <div class="total-item-text">
194 194 数量
195 195 </div>
... ... @@ -205,14 +205,14 @@
205 205 ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}
206 206 </div>
207 207 </div> -->
208   - <div class="total-item">
  208 + <!-- <div class="total-item">
209 209 <div class="total-item-text">
210 210 总金额
211 211 </div>
212 212 <div class="total-item-price text-red">
213   - ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}
  213 + -
214 214 </div>
215   - </div>
  215 + </div> -->
216 216 </div>
217 217 <button class="btn submit" type="primary" @click="onSubmit">提交</button>
218 218 </view>
... ... @@ -559,7 +559,7 @@ export default {
559 559 async onSubmit() {
560 560 if (!this.validateRequired()) return
561 561 const confirmRes = await new Promise(resolve => {
562   - uni.showModal({ title: '提示', content: '确定新增经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  562 + uni.showModal({ title: '提示', content: '确定新增外贸库存合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
563 563 })
564 564 if (!(confirmRes && confirmRes.confirm)) return
565 565 const clean = (obj) => {
... ...
... ... @@ -40,7 +40,7 @@
40 40 </view>
41 41
42 42 <view class="section">
43   - <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
  43 + <view class="row"><text class="label">合计金额(大写)</text><text class="value">{{
44 44 detail.totalAmountCapital || '-' }}</text></view>
45 45 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
46 46 '-' }}</text></view>
... ... @@ -73,13 +73,15 @@
73 73 </view>
74 74
75 75 <view class="section" v-if="detail.status === 'STANDARD'">
76   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  76 + <view class="row"><text class="label">双方盖章合同</text><text class="value act" @click="downloadFile(detail.signedContractFileId, detail.signedContractFileName)">{{
  77 + detail.signedContractFileName || '-' }}</text></view>
  78 + <view class="row"><text class="label">规范性合同</text><text class="value act" @click="downloadFile(detail.standardFileId, detail.standardFileName)">{{
77 79 detail.standardFileName || '-' }}</text></view>
78 80 <view class="row"><text class="label">合同是否规范</text><text class="value">{{
79 81 detail.standardStandardized ? '是' : '否' }}</text></view>
80 82 </view>
81 83 <view class="section" v-if="detail.status === 'FORMAL'">
82   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  84 + <view class="row"><text class="label">规范性合同</text><text class="value act" @click="downloadFile(detail.formalFileId, detail.formalFileName)">{{
83 85 detail.formalFileName || '-' }}</text></view>
84 86 <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized
85 87 ? '是' : '否' }}</text></view>
... ... @@ -138,6 +140,7 @@ import DetailButtons from '@/components/detail-buttons/index.vue'
138 140 import FileUpload from '@/components/file-upload/index.vue'
139 141 import SingleSelectSheet from '@/components/single-select/index.vue'
140 142 import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
  143 +import { downloadFile } from '@/utils/downloadFile.js'
141 144
142 145 export default {
143 146 name: 'ContractForeignStockDetail',
... ... @@ -294,13 +297,13 @@ export default {
294 297 { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload')) },
295 298 { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload')) },
296 299 { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-upload')) },
297   - { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) },
298   - { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) },
299   - { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-approve')) },
300 300 { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:review')) },
301 301 { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:review')) },
302 302 { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-review')) },
303 303 { ...this.buttons[12], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:upload-seal')) },
  304 + { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) },
  305 + { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:approve')) },
  306 + { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-inventory-contract:standard-approve')) },
304 307 ]
305 308 }
306 309 },
... ... @@ -366,7 +369,7 @@ export default {
366 369 })
367 370 return
368 371 }
369   - if (!this.standardStandardized && this.uploadType !== 'seal') {
  372 + if (!this.standardStandardized && this.standardStandardized !== false && this.uploadType !== 'seal') {
370 373 uni.showToast({
371 374 title: '请选择合同是否规范',
372 375 icon: 'error'
... ... @@ -465,6 +468,7 @@ export default {
465 468 uni.setStorageSync(CACHE_KEY, id)
466 469 uni.navigateTo({ url: '/pages/flow/audit_detail' })
467 470 },
  471 + downloadFile,
468 472 async loadDetail() {
469 473 if (!this.id) return
470 474 try {
... ... @@ -546,6 +550,10 @@ export default {
546 550 &_已签收 {
547 551 background-image: url('~@/static/images/contract/status_4.png');
548 552 }
  553 +
  554 + &_已取消 {
  555 + background-image: url('~@/static/images/contract/status_5.png');
  556 + }
549 557 }
550 558 }
551 559
... ... @@ -565,7 +573,8 @@ export default {
565 573 }
566 574
567 575 .label {
568   - width: 310rpx;
  576 + max-width: 310rpx;
  577 + margin-right: 20rpx;
569 578 color: rgba(0, 0, 0, 0.6);
570 579 font-size: 28rpx;
571 580 }
... ... @@ -575,6 +584,11 @@ export default {
575 584 text-align: right;
576 585 color: rgba(0, 0, 0, 0.9);
577 586 font-size: 28rpx;
  587 + white-space: pre-wrap;
  588 + word-break: break-all;
  589 + &.act {
  590 + color: $theme-primary;
  591 + }
578 592 }
579 593
580 594 .customer {
... ... @@ -638,4 +652,7 @@ export default {
638 652 color: rgba(0, 0, 0, 0.6);
639 653 font-size: 32rpx;
640 654 }
  655 +.upload-row {
  656 + margin-top: 20rpx;
  657 +}
641 658 </style>
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
49 49 <view class="card" @click="goDetail(item)">
50 50 <view class="card-header">
51 51 <text class="title omit2">{{ item.buyerName }}</text>
52   - <text v-if="item.status === 'STANDARD'" :class="['status']" :style="{ background: statusMap[item.shippingStatusName] }">{{ item.shippingStatusName }}</text>
  52 + <text v-if="item.status === 'STANDARD'" :class="['status', 'status_' + item.shippingStatusName]">{{ item.shippingStatusName }}</text>
53 53 </view>
54 54 <view class="info-row">
55 55 <text>编号</text><text>{{ item.code }}</text>
... ... @@ -96,8 +96,7 @@
96 96 <script>
97 97 import CardList from '@/components/card/index.vue'
98 98 import FilterModal from '@/components/filter/index.vue'
99   -import { queryContractApi, statusStyle,statusMap } from '@/api/contract.js'
100   -import { officeQueryApi } from '@/api/devManage.js'
  99 +import { queryContractApi, statusStyle } from '@/api/contract.js'
101 100
102 101 export default {
103 102 components: { CardList, FilterModal },
... ... @@ -118,7 +117,6 @@ export default {
118 117 filterForm: { deptId: '', deptName: '', dateRange: [] },
119 118 deptSelectVisible: false,
120 119 statusStyle,
121   - statusMap,
122 120 }
123 121 },
124 122 computed: {
... ... @@ -330,26 +328,30 @@ export default {
330 328 font-size: 30rpx;
331 329 font-weight: 600;
332 330 position: absolute;
333   - top: -36rpx;
334   - right: -32rpx;
  331 + top: -32rpx;
  332 + right: -12rpx;
335 333 height: 48rpx;
336   - line-height: 48rpx;
  334 + line-height: 50rpx;
337 335 color: #fff;
338 336 font-size: 24rpx;
339 337 padding: 0 14rpx;
340 338 border-radius: 6rpx;
341   - &.status_1 {
  339 + &_审批中 {
342 340 background: $theme-primary;
343 341 }
344   - &.status_2 {
  342 + &_生产中 {
345 343 background: #2BA471;
346 344 }
347   - &.status_3 {
348   - background: #D54941;
  345 + &_已发货 {
  346 + background: #E37318;
349 347 }
350   - &.status_4 {
351   - background: #E7E7E7;
352   - color: rgba(0,0,0,0.9);
  348 + &_已签收 {
  349 + background: #858A99;
  350 + color: #ffffff;
  351 + }
  352 + &_已取消 {
  353 + background: #9E9E9E;
  354 + color: #ffffff;
353 355 }
354 356 }
355 357 }
... ... @@ -380,19 +382,19 @@ export default {
380 382 }
381 383 }
382 384
383   -.filter-form {
  385 +.filter-form {
384 386 .form-item { margin-bottom: 24rpx; }
385   - .label {
386   - margin-bottom: 20rpx;
  387 + .label {
  388 + margin-bottom: 20rpx;
387 389 color: rgba(0,0,0,0.9);
388 390 height: 44rpx;
389 391 line-height: 44rpx;
390 392 font-size: 30rpx;
391 393 }
392   - .fake-select {
393   - height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
  394 + .fake-select {
  395 + height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
394 396 .placeholder { color: #999; }
395 397 .value { color: #333; }
396 398 }
397 399 }
398   -</style>
\ No newline at end of file
  400 +</style>
... ...
... ... @@ -4,14 +4,9 @@
4 4 <view class="lock-page">
5 5 <view class="block" v-for="(item, idx) in items" :key="idx">
6 6 <view class="block-header">
7   - <uni-data-checkbox
8   - multiple
9   - mode="default"
10   - :localdata="[{ text: '锁价', value: 'LOCKED' }]"
11   - :modelValue="item.locked ? ['LOCKED'] : []"
12   - :disabled="true"
13   - @change="onLockChange(idx, $event)"
14   - />
  7 + <uni-data-checkbox multiple mode="default" :localdata="[{ text: '锁价', value: 'LOCKED' }]"
  8 + :modelValue="item.locked ? ['LOCKED'] : []" :disabled="true"
  9 + @change="onLockChange(idx, $event)" />
15 10 <view class="ops" @click="toggleItem(idx)">
16 11 <image class="opIcon"
17 12 :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" />
... ... @@ -22,12 +17,14 @@
22 17 <uni-list v-show="item.collapsed">
23 18 <uni-list-item title="产品名称">
24 19 <template v-slot:footer>
25   - <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false" disabled />
  20 + <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false"
  21 + disabled />
26 22 </template>
27 23 </uni-list-item>
28 24 <uni-list-item title="行业">
29 25 <template v-slot:footer>
30   - <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false" disabled />
  26 + <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false"
  27 + disabled />
31 28 </template>
32 29 </uni-list-item>
33 30 <uni-list-item title="牌号">
... ... @@ -42,28 +39,39 @@
42 39 </uni-list-item>
43 40 <uni-list-item title="规格(mm)">
44 41 <template v-slot:footer>
45   - <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
46   - <view class="value value-spec">
47   - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
48   - <view v-if="item.thickness" class="value-spec_box">
49   - <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  42 + <view class="value value-spec">
  43 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  44 + <view v-if="item.thickness" class="value-spec_box">
  45 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{
  46 + item.thicknessTolPos > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos
  47 + }}
  48 + </view>
  49 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{
  50 + item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg
  51 + }}
  52 + </view>
  53 + </view>
  54 + <view v-if="item.width" class="value-spec_val p12">*</view>
  55 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  56 + <view v-if="item.width" class="value-spec_box">
  57 + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ?
  58 + '+' + item.widthTolPos : item.widthTolPos }}
  59 + </view>
  60 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ?
  61 + '+' + item.widthTolNeg : item.widthTolNeg }}
  62 + </view>
  63 + </view>
  64 + <view v-if="item.length" class="value-spec_val p12">*</view>
  65 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  66 + <view v-if="item.length" class="value-spec_box">
  67 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0
  68 + ? '+' + item.lengthTolPos : item.lengthTolPos }}
  69 + </view>
  70 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0
  71 + ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
  72 + </view>
  73 + </view>
50 74 </view>
51   - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
52   - </view>
53   - </view>
54   - <view v-if="item.width" class="value-spec_val p12">*</view>
55   - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
56   - <view v-if="item.width" class="value-spec_box">
57   - <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
58   - <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
59   - </view>
60   - <view v-if="item.length" class="value-spec_val p12">*</view>
61   - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
62   - <view v-if="item.length" class="value-spec_box">
63   - <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
64   - <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
65   - </view>
66   - </view>
67 75 </template>
68 76 </uni-list-item>
69 77 <uni-list-item title="状态">
... ... @@ -73,27 +81,32 @@
73 81 </uni-list-item>
74 82 <uni-list-item title="数量">
75 83 <template v-slot:footer>
76   - <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" disabled placeholder="不可编辑" />
  84 + <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" disabled
  85 + placeholder="不可编辑" />
77 86 </template>
78 87 </uni-list-item>
79 88 <uni-list-item title="单价">
80 89 <template v-slot:footer>
81   - <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" />
  90 + <uni-easyinput v-model="item.unitPrice" type="digit" :inputBorder="false"
  91 + placeholder="请输入单价" @input="onImmediateChange(idx)"
  92 + @blur="onNumberBlur(idx, 'unitPrice', 0)" />
82 93 </template>
83 94 </uni-list-item>
84   - <uni-list-item title="不含税金额">
  95 + <!-- <uni-list-item title="不含税金额">
85 96 <template v-slot:footer>
86   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  97 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false"
  98 + disabled placeholder="" />
87 99 </template>
88   - </uni-list-item>
  100 + </uni-list-item> -->
89 101 <uni-list-item title="总金额">
90 102 <template v-slot:footer>
91   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  103 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled
  104 + placeholder="" />
92 105 </template>
93 106 </uni-list-item>
94 107 <uni-list-item title="发货日期">
95 108 <template v-slot:footer>
96   - <uni-easyinput v-model="item.deliveryDate" :inputBorder="false" disabled />
  109 + <uni-easyinput v-model="item.deliveryDate" :inputBorder="false" disabled />
97 110 </template>
98 111 </uni-list-item>
99 112 </uni-list>
... ... @@ -101,12 +114,14 @@
101 114 <uni-list v-show="!item.collapsed">
102 115 <uni-list-item title="产品名称">
103 116 <template v-slot:footer>
104   - <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false" disabled />
  117 + <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false"
  118 + disabled />
105 119 </template>
106 120 </uni-list-item>
107 121 <uni-list-item title="行业">
108 122 <template v-slot:footer>
109   - <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false" disabled />
  123 + <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false"
  124 + disabled />
110 125 </template>
111 126 </uni-list-item>
112 127 <uni-list-item title="牌号">
... ... @@ -114,44 +129,45 @@
114 129 <uni-easyinput v-model="item.brand" placeholder="请输入牌号" :clearable="false" disabled />
115 130 </template>
116 131 </uni-list-item>
117   - <view class="footer">
118   - <div class="total">
119   - <div class="total-text">
120   - 合计
121   - </div>
122   - <div class="total-item">
123   - <div class="total-item-text">
124   - 数量
125   - </div>
126   - <div class="total-item-price">
127   - {{ (totalQuantity || 0).toFixed(2) }}kg
128   - </div>
129   - </div>
130   - <!-- <div class="total-item">
131   - <div class="total-item-text">
132   - 不含税金额
133   - </div>
134   - <div class="total-item-price text-red">
135   - ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}
136   - </div>
137   - </div> -->
138   - <div class="total-item">
139   - <div class="total-item-text">
140   - 总金额
141   - </div>
142   - <div class="total-item-price text-red">
143   - ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}
144   - </div>
145   - </div>
146   - </div>
147   - <button class="btn submit" type="primary" @click="onSubmit">提交</button>
148   - </view>
  132 +
149 133 </uni-list>
150 134 </view>
  135 + <view class="footer">
  136 + <div class="total">
  137 + <div class="total-text">
  138 + 合计
  139 + </div>
  140 + <div class="total-item">
  141 + <div class="total-item-text">
  142 + 数量
  143 + </div>
  144 + <div class="total-item-price">
  145 + {{ (totalQuantity || 0).toFixed(2) }}kg
  146 + </div>
  147 + </div>
  148 + <!-- <div class="total-item">
  149 + <div class="total-item-text">
  150 + 不含税金额
  151 + </div>
  152 + <div class="total-item-price text-red">
  153 + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}
  154 + </div>
  155 + </div> -->
  156 + <div class="total-item">
  157 + <div class="total-item-text">
  158 + 总金额
  159 + </div>
  160 + <div class="total-item-price text-red">
  161 + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}
  162 + </div>
  163 + </div>
  164 + </div>
  165 + <button class="btn submit" type="primary" @click="onSubmit">提交</button>
  166 + </view>
151 167 </view>
152 168 </scroll-view>
153 169
154   -
  170 +
155 171 </view>
156 172 </template>
157 173
... ... @@ -168,7 +184,7 @@ export default {
168 184 planQty: 30,
169 185 }
170 186 },
171   - computed: {
  187 + computed: {
172 188 totalQuantity() {
173 189 const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0)
174 190 return this.round(qty, 2)
... ... @@ -337,7 +353,7 @@ export default {
337 353 }
338 354 const invalid = selected.find(r => {
339 355 const p = this.toNumber(r.unitPrice)
340   - return !( p > 0)
  356 + return !(p > 0)
341 357 })
342 358 if (invalid) {
343 359 uni.showToast({ title: '请填写单价', icon: 'none' })
... ... @@ -350,7 +366,7 @@ export default {
350 366 // totalAmountExcludingTax: this.totalAmountExcludingTax,
351 367 totalAmountIncludingTax: this.totalAmountIncludingTax,
352 368 totalQuantity: this.totalQuantity,
353   - type:'INTL_INVENTORY_AGMT',
  369 + type: 'INTL_INVENTORY_AGMT',
354 370 contractDistributorLineList: selected
355 371 }
356 372
... ... @@ -365,7 +381,7 @@ export default {
365 381 uni.navigateTo({ url: '/pages/contract_foreign_stock/index' })
366 382 }, 500)
367 383 }).catch((err) => {
368   - uni.showToast({ title: err.msg ||'提交失败', icon: 'none' })
  384 + uni.showToast({ title: err.msg || '提交失败', icon: 'none' })
369 385 })
370 386 }
371 387 }
... ... @@ -424,6 +440,7 @@ export default {
424 440 width: 36rpx;
425 441 height: 36rpx;
426 442 }
  443 +
427 444 .block-header ::v-deep .uni-data-checklist .checklist-text {
428 445 font-size: 28rpx;
429 446 margin-left: 12rpx;
... ... @@ -556,6 +573,7 @@ export default {
556 573 ::v-deep .is-disabled {
557 574 background-color: transparent !important;
558 575 }
  576 +
559 577 // ::v-deep .uni-list-item__content-title {
560 578 // font-size: 28rpx;
561 579 // color: rgba(0, 0, 0, 0.9);
... ... @@ -721,42 +739,45 @@ export default {
721 739 background: $theme-primary;
722 740 color: #fff;
723 741 }
724   - .value-spec {
  742 +
  743 +.value-spec {
  744 + height: 48rpx;
  745 + display: flex;
  746 + align-items: center;
  747 + color: #000000;
  748 +
  749 + // justify-content: end;
  750 + &_box {
  751 + position: relative;
  752 + width: 60rpx;
725 753 height: 48rpx;
726   - display: flex;
727   - align-items: center;
728   - color: #000000;
729   - // justify-content: end;
730   - &_box {
731   - position: relative;
732   - width: 60rpx;
733   - height: 48rpx;
734   -
735   - &_1 {
736   - font-size: 16rpx;
737   - position: absolute;
738   - top: -10rpx;
739   - left: 0;
740   - }
741 754
742   - &_2 {
743   - font-size: 16rpx;
744   - position: absolute;
745   - bottom: -10rpx;
746   - left: 0;
747   - }
  755 + &_1 {
  756 + font-size: 16rpx;
  757 + position: absolute;
  758 + top: -10rpx;
  759 + left: 0;
748 760 }
749 761
750   - &_val {
751   - font-size: 28rpx;
752   -
753   - &.p12 {
754   - padding-right: 12rpx;
755   - }
  762 + &_2 {
  763 + font-size: 16rpx;
  764 + position: absolute;
  765 + bottom: -10rpx;
  766 + left: 0;
756 767 }
757 768 }
758   - .row-spec {
759   - height: 60rpx;
760   - align-items: center;
  769 +
  770 + &_val {
  771 + font-size: 28rpx;
  772 +
  773 + &.p12 {
  774 + padding-right: 12rpx;
761 775 }
  776 + }
  777 +}
  778 +
  779 +.row-spec {
  780 + height: 60rpx;
  781 + align-items: center;
  782 +}
762 783 </style>
\ No newline at end of file
... ...
... ... @@ -67,9 +67,9 @@
67 67 <ProductRel ref="productRel" mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate"
68 68 :list="productLineList" @change="onProductsChange" :options="productList" />
69 69
70   - <uni-list-item title="合计人民币金额(大写)">
  70 + <uni-list-item title="合计金额(大写)">
71 71 <template v-slot:footer>
72   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false"
  72 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false"
73 73 disabled />
74 74 </template>
75 75 </uni-list-item>
... ... @@ -188,7 +188,7 @@
188 188 <view class="footer">
189 189 <div class="total">
190 190 <div class="total-text">合计</div>
191   - <div class="total-item">
  191 + <div class="total-item" style="padding: 20rpx 0;">
192 192 <div class="total-item-text">数量</div>
193 193 <div class="total-item-price">{{ (totalQuantity || 0).toFixed(2) }}kg</div>
194 194 </div>
... ... @@ -196,10 +196,10 @@
196 196 <div class="total-item-text">不含税金额</div>
197 197 <div class="total-item-price text-red">¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}</div>
198 198 </div> -->
199   - <div class="total-item">
  199 + <!-- <div class="total-item">
200 200 <div class="total-item-text">总金额</div>
201 201 <div class="total-item-price text-red">¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}</div>
202   - </div>
  202 + </div> -->
203 203 </div>
204 204 <button class="btn submit" type="primary" @click="onSubmit">保存</button>
205 205 </view>
... ... @@ -534,7 +534,7 @@ export default {
534 534 console.log('onSubmit__payload', payload)
535 535 if (!this.validateRequired()) return
536 536 const confirmRes = await new Promise(resolve => {
537   - uni.showModal({ title: '提示', content: '确定保存当前经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  537 + uni.showModal({ title: '提示', content: '确定保存当前外贸库存合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
538 538 })
539 539 if (!(confirmRes && confirmRes.confirm)) return
540 540 const clean = (obj) => {
... ...
... ... @@ -60,13 +60,13 @@
60 60 </uni-list-item>
61 61 <uni-list-item title="厚度公差上限(mm)">
62 62 <template v-slot:footer>
63   - <uni-easyinput type="text" v-model="item.thicknessTolPos" :inputBorder="false"
  63 + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false"
64 64 placeholder="请输入厚度公差上限" @input="onNumberInput(idx, 'thicknessTolPos')" @blur="onNumberBlur(idx, 'thicknessTolPos', 9)" />
65 65 </template>
66 66 </uni-list-item>
67 67 <uni-list-item title="厚度公差下限(mm)">
68 68 <template v-slot:footer>
69   - <uni-easyinput type="text" v-model="item.thicknessTolNeg" :inputBorder="false"
  69 + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false"
70 70 placeholder="请输入厚度公差下限" @input="onNumberInput(idx, 'thicknessTolNeg')" @blur="onNumberBlur(idx, 'thicknessTolNeg', 9)" />
71 71 </template>
72 72 </uni-list-item>
... ... @@ -77,13 +77,13 @@
77 77 </uni-list-item>
78 78 <uni-list-item title="宽度公差上限(mm)">
79 79 <template v-slot:footer>
80   - <uni-easyinput type="text" v-model="item.widthTolPos" :inputBorder="false"
  80 + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false"
81 81 placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
82 82 </template>
83 83 </uni-list-item>
84 84 <uni-list-item title="宽度公差下限(mm)">
85 85 <template v-slot:footer>
86   - <uni-easyinput type="text" v-model="item.widthTolNeg" :inputBorder="false"
  86 + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false"
87 87 placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
88 88 </template>
89 89 </uni-list-item>
... ... @@ -94,13 +94,13 @@
94 94 </uni-list-item>
95 95 <uni-list-item title="长度公差上限(mm)">
96 96 <template v-slot:footer>
97   - <uni-easyinput type="text" v-model="item.lengthTolPos" :inputBorder="false"
  97 + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false"
98 98 placeholder="请输入长度公差上限" @input="onNumberInput(idx, 'lengthTolPos')" @blur="onNumberBlur(idx, 'lengthTolPos', 9)" />
99 99 </template>
100 100 </uni-list-item>
101 101 <uni-list-item title="长度公差下限(mm)">
102 102 <template v-slot:footer>
103   - <uni-easyinput type="text" v-model="item.lengthTolNeg" :inputBorder="false"
  103 + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false"
104 104 placeholder="请输入长度公差下限" @input="onNumberInput(idx, 'lengthTolNeg')" @blur="onNumberBlur(idx, 'lengthTolNeg', 9)" />
105 105 </template>
106 106 </uni-list-item>
... ... @@ -111,27 +111,27 @@
111 111 </uni-list-item>
112 112 <uni-list-item title="数量">
113 113 <template v-slot:footer>
114   - <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 9)" />
  114 + <uni-easyinput v-model="item.quantity" type="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 2)" />
115 115 </template>
116 116 </uni-list-item>
117 117 <uni-list-item title="单价">
118 118 <template v-slot:footer>
119   - <uni-easyinput v-model="item.unitPrice" disabled type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 9)" />
  119 + <uni-easyinput placeholder="-" disabled type="number" :inputBorder="false" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 9)" />
120 120 </template>
121 121 </uni-list-item>
122 122 <uni-list-item title="外贸加工费">
123 123 <template v-slot:footer>
124   - <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" />
  124 + <uni-easyinput v-model="item.processingFee" type="digit" :inputBorder="false" placeholder="请输入外贸加工费" />
125 125 </template>
126 126 </uni-list-item>
127 127 <!-- <uni-list-item title="不含税金额">
128 128 <template v-slot:footer>
129   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  129 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
130 130 </template>
131 131 </uni-list-item> -->
132 132 <uni-list-item title="总金额">
133 133 <template v-slot:footer>
134   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  134 + <uni-easyinput :inputBorder="false" disabled placeholder="-" />
135 135 </template>
136 136 </uni-list-item>
137 137 <uni-list-item title="发货日期">
... ... @@ -159,29 +159,33 @@
159 159 <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view>
160 160 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
161 161 <!-- 厚(公差) * 宽(公差) * 长(公差) -->
162   - <view class="row row-spec"><text class="label">规格(mm)</text>
163   - <view class="value value-spec">
164   - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
165   - <view v-if="item.thickness" class="value-spec_box">
166   - <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
167   - </view>
168   - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg }}
169   - </view>
  162 + <view class="row row-spec"><text class="label">规格(mm)</text>
  163 + <view class="value value-spec">
  164 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  165 + <view v-if="item.thickness" class="value-spec_box">
  166 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos }}
170 167 </view>
171   - <view v-if="item.width" class="value-spec_val p12">*</view>
172   - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
173   - <view v-if="item.width" class="value-spec_box">
174   - <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
175   - <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg }}</view>
  168 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}
176 169 </view>
177   - <view v-if="item.length" class="value-spec_val p12">*</view>
178   - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
179   - <view v-if="item.length" class="value-spec_box">
180   - <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
181   - <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg }}</view>
  170 + </view>
  171 + <view v-if="item.width" class="value-spec_val p12">*</view>
  172 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  173 + <view v-if="item.width" class="value-spec_box">
  174 + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' + item.widthTolPos : item.widthTolPos }}
  175 + </view>
  176 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}
  177 + </view>
  178 + </view>
  179 + <view v-if="item.length" class="value-spec_val p12">*</view>
  180 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  181 + <view v-if="item.length" class="value-spec_box">
  182 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}
  183 + </view>
  184 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
182 185 </view>
183 186 </view>
184 187 </view>
  188 + </view>
185 189 <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
186 190 <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view>
187 191 <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice)
... ... @@ -247,20 +251,18 @@ export default {
247 251 }))
248 252 },
249 253 minDeliveryDate() {
250   - const s = this.deliveryDate
251   - if (!s) return ''
252   - const parts = String(s).split('-')
253   - const y = Number(parts[0])
254   - const m = Number(parts[1])
255   - const d = Number(parts[2])
256   - if (!y || !m || !d) return ''
257   - const dt = new Date(y, m - 1, d)
258   - dt.setDate(dt.getDate() + 1)
259   - const yy = dt.getFullYear()
260   - const mm = String(dt.getMonth() + 1).padStart(2, '0')
261   - const dd = String(dt.getDate() - 1).padStart(2, '0')
262   - return `${yy}/${mm}/${dd}`
263   - }
  254 + const s = this.deliveryDate
  255 + if (!s) return ''
  256 + const parts = String(s).split('-')
  257 + const y = Number(parts[0])
  258 + const m = Number(parts[1])
  259 + const d = Number(parts[2])
  260 + if (!y || !m || !d) return ''
  261 + const yy = y
  262 + const mm = String(m).padStart(2, '0')
  263 + const dd = String(d).padStart(2, '0')
  264 + return `${yy}-${mm}-${dd}`
  265 + }
264 266 },
265 267 methods: {
266 268 defaultItem() {
... ...
... ... @@ -62,9 +62,9 @@
62 62 </template>
63 63 </uni-list-item>
64 64 <ProductRel ref="productRel" mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" @change="onProductsChange" :options="productList" />
65   - <uni-list-item title="合计人民币金额(大写)">
  65 + <uni-list-item title="合计金额(大写)">
66 66 <template v-slot:footer>
67   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled />
  67 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false" disabled />
68 68 </template>
69 69 </uni-list-item>
70 70 <uni-list-item title="交付定金、数额、时间">
... ... @@ -557,7 +557,7 @@ export default {
557 557 if (this.$refs.productRel && !this.$refs.productRel.validate()) return
558 558 if (!this.validateRequired()) return
559 559 const confirmRes = await new Promise(resolve => {
560   - uni.showModal({ title: '提示', content: '确定新增经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  560 + uni.showModal({ title: '提示', content: '确定新增外贸未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
561 561 })
562 562 if (!(confirmRes && confirmRes.confirm)) return
563 563 const clean = (obj) => {
... ...
... ... @@ -40,7 +40,7 @@
40 40 </view>
41 41
42 42 <view class="section">
43   - <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
  43 + <view class="row"><text class="label">合计金额(大写)</text><text class="value">{{
44 44 detail.totalAmountCapital || '-' }}</text></view>
45 45 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
46 46 '-' }}</text></view>
... ... @@ -73,7 +73,9 @@
73 73 </view>
74 74
75 75 <view class="section" v-if="detail.status === 'STANDARD'">
76   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  76 + <view class="row"><text class="label">双方盖章合同</text><text class="value act" @click="downloadFile(detail.signedContractFileId, detail.signedContractFileName)">{{
  77 + detail.signedContractFileName || '-' }}</text></view>
  78 + <view class="row"><text class="label">规范性合同</text><text class="value act" @click="downloadFile(detail.standardFileId, detail.standardFileName)">{{
77 79 detail.standardFileName || '-'
78 80 }}</text></view>
79 81 <view class="row"><text class="label">合同是否规范</text><text class="value">{{
... ... @@ -81,7 +83,7 @@
81 83 }}</text></view>
82 84 </view>
83 85 <view class="section" v-if="detail.status === 'FORMAL'">
84   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  86 + <view class="row"><text class="label">规范性合同</text><text class="value act" @click="downloadFile(detail.formalFileId, detail.formalFileName)">{{
85 87 detail.formalFileName || '-' }}</text></view>
86 88 <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized
87 89 ? '是' : '否' }}</text></view>
... ... @@ -139,6 +141,7 @@ import DetailButtons from '@/components/detail-buttons/index.vue'
139 141 import FileUpload from '@/components/file-upload/index.vue'
140 142 import SingleSelectSheet from '@/components/single-select/index.vue'
141 143 import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
  144 +import { downloadFile } from '@/utils/downloadFile.js'
142 145
143 146 export default {
144 147 name: 'ContractForeignUnplanDetail',
... ... @@ -301,13 +304,13 @@ export default {
301 304 { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:upload')) }, //上传正式合同附件
302 305 { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:upload')) }, //上传正式合同附件
303 306 { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-upload')) }, //上传标准合同附件
304   - { ...this.buttons[7], visible: (s === 'FORMAL' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同
305   - { ...this.buttons[8], visible: (s === 'STANDARD' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同
306   - { ...this.buttons[9], visible: (s === 'STANDARD' && f && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-approve')) }, //审核标准合同
307 307 { ...this.buttons[10], visible: (s === 'FORMAL' && a && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:review')) }, //正式合同审核详情
308 308 { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:review')) }, //正式合同审核详情
309 309 { ...this.buttons[12], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-review')) }, //标准合同审核详情
310   - { ...this.buttons[13], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-unlcoked-contract:upload-seal')) }, //上传双方盖章合同附件
  310 + { ...this.buttons[13], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:upload-seal')) }, //上传双方盖章合同附件
  311 + { ...this.buttons[7], visible: (s === 'FORMAL' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同
  312 + { ...this.buttons[8], visible: (s === 'STANDARD' && e && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:approve')) }, //审核正式合同
  313 + { ...this.buttons[9], visible: (s === 'STANDARD' && f && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:foreign-trade-unlocked-contract:standard-approve')) }, //审核标准合同
311 314 ]
312 315 }
313 316 },
... ... @@ -385,7 +388,7 @@ export default {
385 388 })
386 389 return
387 390 }
388   - if (!this.standardStandardized && this.uploadType !== 'seal') {
  391 + if (!this.standardStandardized && this.standardStandardized !== false && this.uploadType !== 'seal') {
389 392 uni.showToast({
390 393 title: '请选择合同是否规范',
391 394 icon: 'error'
... ... @@ -444,6 +447,7 @@ export default {
444 447 const match = (options || []).find(o => String(o.value) === String(current) || String(o.label) === String(current))
445 448 this.sheet = { ...this.sheet, visible: true, title: '合同是否规范', options, value: match ? match.value : '' }
446 449 },
  450 + downloadFile,
447 451 handleButtonClick(btn) {
448 452 if (!btn || btn.disabled) return
449 453 if (typeof btn.onClick === 'function') return btn.onClick(this.detail, btn.params)
... ... @@ -558,6 +562,10 @@ export default {
558 562 &_已签收 {
559 563 background-image: url('~@/static/images/contract/status_4.png');
560 564 }
  565 +
  566 + &_已取消 {
  567 + background-image: url('~@/static/images/contract/status_5.png');
  568 + }
561 569 }
562 570 }
563 571
... ... @@ -577,7 +585,8 @@ export default {
577 585 }
578 586
579 587 .label {
580   - width: 310rpx;
  588 + max-width: 310rpx;
  589 + margin-right: 20rpx;
581 590 color: rgba(0, 0, 0, 0.6);
582 591 font-size: 28rpx;
583 592 }
... ... @@ -587,6 +596,11 @@ export default {
587 596 text-align: right;
588 597 color: rgba(0, 0, 0, 0.9);
589 598 font-size: 28rpx;
  599 + white-space: pre-wrap;
  600 + word-break: break-all;
  601 + &.act {
  602 + color: $theme-primary;
  603 + }
590 604 }
591 605
592 606 .customer {
... ... @@ -650,4 +664,7 @@ export default {
650 664 color: rgba(0, 0, 0, 0.6);
651 665 font-size: 32rpx;
652 666 }
  667 +.upload-row {
  668 + margin-top: 20rpx;
  669 +}
653 670 </style>
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
49 49 <view class="card" @click="goDetail(item)">
50 50 <view class="card-header">
51 51 <text class="title omit2">{{ item.buyerName }}</text>
52   - <text v-if="item.status === 'STANDARD'" :class="['status']" :style="{ background: statusMap[item.shippingStatusName] }">{{ item.shippingStatusName }}</text>
  52 + <text v-if="item.status === 'STANDARD'" :class="['status', 'status_' + item.shippingStatusName]">{{ item.shippingStatusName }}</text>
53 53 </view>
54 54 <view class="info-row">
55 55 <text>编号</text><text>{{ item.code }}</text>
... ... @@ -63,7 +63,7 @@
63 63 <view class="info-row" v-if="item.status === 'STANDARD' || item.status === 'FORMAL'">
64 64 <text>{{ item.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text>
65 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>
  66 + <span v-else>-</span>
67 67 </view>
68 68 <view class="info-row">
69 69 <text>订货日期</text><text>{{ item.orderDate }}</text>
... ... @@ -96,8 +96,7 @@
96 96 <script>
97 97 import CardList from '@/components/card/index.vue'
98 98 import FilterModal from '@/components/filter/index.vue'
99   -import { queryContractApi, statusStyle,statusMap } from '@/api/contract.js'
100   -import { officeQueryApi } from '@/api/devManage.js'
  99 +import { queryContractApi, statusStyle } from '@/api/contract.js'
101 100
102 101 export default {
103 102 components: { CardList, FilterModal },
... ... @@ -117,8 +116,7 @@ export default {
117 116 filterVisible: false,
118 117 filterForm: { deptId: '', deptName: '', dateRange: [] },
119 118 deptSelectVisible: false,
120   - statusStyle,
121   - statusMap,
  119 + statusStyle
122 120 }
123 121 },
124 122 computed: {
... ... @@ -332,26 +330,30 @@ export default {
332 330 font-size: 30rpx;
333 331 font-weight: 600;
334 332 position: absolute;
335   - top: -36rpx;
336   - right: -32rpx;
  333 + top: -32rpx;
  334 + right: -12rpx;
337 335 height: 48rpx;
338   - line-height: 48rpx;
  336 + line-height: 50rpx;
339 337 color: #fff;
340 338 font-size: 24rpx;
341 339 padding: 0 14rpx;
342 340 border-radius: 6rpx;
343   - &.status_1 {
  341 + &_审批中 {
344 342 background: $theme-primary;
345 343 }
346   - &.status_2 {
  344 + &_生产中 {
347 345 background: #2BA471;
348 346 }
349   - &.status_3 {
350   - background: #D54941;
  347 + &_已发货 {
  348 + background: #E37318;
351 349 }
352   - &.status_4 {
353   - background: #E7E7E7;
354   - color: rgba(0,0,0,0.9);
  350 + &_已签收 {
  351 + background: #858A99;
  352 + color: #ffffff;
  353 + }
  354 + &_已取消 {
  355 + background: #9E9E9E;
  356 + color: #ffffff;
355 357 }
356 358 }
357 359 }
... ... @@ -382,19 +384,19 @@ export default {
382 384 }
383 385 }
384 386
385   -.filter-form {
  387 +.filter-form {
386 388 .form-item { margin-bottom: 24rpx; }
387   - .label {
388   - margin-bottom: 20rpx;
  389 + .label {
  390 + margin-bottom: 20rpx;
389 391 color: rgba(0,0,0,0.9);
390 392 height: 44rpx;
391 393 line-height: 44rpx;
392 394 font-size: 30rpx;
393 395 }
394   - .fake-select {
395   - height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
  396 + .fake-select {
  397 + height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
396 398 .placeholder { color: #999; }
397 399 .value { color: #333; }
398 400 }
399 401 }
400   -</style>
\ No newline at end of file
  402 +</style>
... ...
... ... @@ -4,13 +4,8 @@
4 4 <view class="lock-page">
5 5 <view class="block" v-for="(item, idx) in items" :key="idx">
6 6 <view class="block-header">
7   - <uni-data-checkbox
8   - multiple
9   - mode="default"
10   - :localdata="[{ text: '锁规', value: 'LOCKED' }]"
11   - :modelValue="item.locked ? ['LOCKED'] : []"
12   - @change="onLockChange(idx, $event)"
13   - />
  7 + <uni-data-checkbox multiple mode="default" :localdata="[{ text: '锁规', value: 'LOCKED' }]"
  8 + :modelValue="item.locked ? ['LOCKED'] : []" @change="onLockChange(idx, $event)" />
14 9 <view class="ops" @click="toggleItem(idx)">
15 10 <image class="opIcon"
16 11 :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" />
... ... @@ -21,12 +16,14 @@
21 16 <uni-list v-show="item.collapsed">
22 17 <uni-list-item title="产品名称">
23 18 <template v-slot:footer>
24   - <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false" disabled />
  19 + <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false"
  20 + disabled />
25 21 </template>
26 22 </uni-list-item>
27 23 <uni-list-item title="行业">
28 24 <template v-slot:footer>
29   - <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false" disabled />
  25 + <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false"
  26 + disabled />
30 27 </template>
31 28 </uni-list-item>
32 29 <uni-list-item title="牌号">
... ... @@ -41,28 +38,39 @@
41 38 </uni-list-item>
42 39 <uni-list-item title="规格(mm)">
43 40 <template v-slot:footer>
44   - <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
45   - <view class="value value-spec">
46   - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
47   - <view v-if="item.thickness" class="value-spec_box">
48   - <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  41 + <view class="value value-spec">
  42 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  43 + <view v-if="item.thickness" class="value-spec_box">
  44 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{
  45 + item.thicknessTolPos > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos
  46 + }}
  47 + </view>
  48 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{
  49 + item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg
  50 + }}
  51 + </view>
  52 + </view>
  53 + <view v-if="item.width" class="value-spec_val p12">*</view>
  54 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  55 + <view v-if="item.width" class="value-spec_box">
  56 + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ?
  57 + '+' + item.widthTolPos : item.widthTolPos }}
  58 + </view>
  59 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ?
  60 + '+' + item.widthTolNeg : item.widthTolNeg }}
  61 + </view>
  62 + </view>
  63 + <view v-if="item.length" class="value-spec_val p12">*</view>
  64 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  65 + <view v-if="item.length" class="value-spec_box">
  66 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0
  67 + ? '+' + item.lengthTolPos : item.lengthTolPos }}
  68 + </view>
  69 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0
  70 + ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
  71 + </view>
  72 + </view>
49 73 </view>
50   - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
51   - </view>
52   - </view>
53   - <view v-if="item.width" class="value-spec_val p12">*</view>
54   - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
55   - <view v-if="item.width" class="value-spec_box">
56   - <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
57   - <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
58   - </view>
59   - <view v-if="item.length" class="value-spec_val p12">*</view>
60   - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
61   - <view v-if="item.length" class="value-spec_box">
62   - <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
63   - <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
64   - </view>
65   - </view>
66 74 </template>
67 75 </uni-list-item>
68 76 <uni-list-item title="状态">
... ... @@ -72,27 +80,32 @@
72 80 </uni-list-item>
73 81 <uni-list-item title="数量">
74 82 <template v-slot:footer>
75   - <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" placeholder="请输入数量" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'quantity', 0)" />
  83 + <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false"
  84 + placeholder="请输入数量" @input="onImmediateChange(idx)"
  85 + @blur="onNumberBlur(idx, 'quantity', 0)" />
76 86 </template>
77 87 </uni-list-item>
78 88 <uni-list-item title="单价">
79 89 <template v-slot:footer>
80   - <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" />
  90 + <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false"
  91 + placeholder="请输入单价" @input="onImmediateChange(idx)"
  92 + @blur="onNumberBlur(idx, 'unitPrice', 0)" />
81 93 </template>
82 94 </uni-list-item>
83 95 <!-- <uni-list-item title="不含税金额">
84 96 <template v-slot:footer>
85   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  97 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
86 98 </template>
87 99 </uni-list-item> -->
88 100 <uni-list-item title="总金额">
89 101 <template v-slot:footer>
90   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  102 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled
  103 + placeholder="" />
91 104 </template>
92 105 </uni-list-item>
93 106 <uni-list-item title="发货日期">
94 107 <template v-slot:footer>
95   - <uni-easyinput v-model="item.deliveryDate" :inputBorder="false" disabled />
  108 + <uni-easyinput v-model="item.deliveryDate" :inputBorder="false" disabled />
96 109 </template>
97 110 </uni-list-item>
98 111 </uni-list>
... ... @@ -100,12 +113,14 @@
100 113 <uni-list v-show="!item.collapsed">
101 114 <uni-list-item title="产品名称">
102 115 <template v-slot:footer>
103   - <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false" disabled />
  116 + <uni-easyinput v-model="item.productName" placeholder="请输入产品名称" :clearable="false"
  117 + disabled />
104 118 </template>
105 119 </uni-list-item>
106 120 <uni-list-item title="行业">
107 121 <template v-slot:footer>
108   - <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false" disabled />
  122 + <uni-easyinput v-model="item.industry" placeholder="请输入行业" :clearable="false"
  123 + disabled />
109 124 </template>
110 125 </uni-list-item>
111 126 <uni-list-item title="牌号">
... ... @@ -113,40 +128,41 @@
113 128 <uni-easyinput v-model="item.brand" placeholder="请输入牌号" :clearable="false" disabled />
114 129 </template>
115 130 </uni-list-item>
116   - <view class="footer">
117   - <div class="total">
118   - <div class="total-text">
119   - 合计
120   - </div>
121   - <div class="total-item">
122   - <div class="total-item-text">
123   - 数量
124   - </div>
125   - <div class="total-item-price">
126   - {{ (totalQuantity || 0).toFixed(2) }}kg
127   - </div>
128   - </div>
129   - <!-- <div class="total-item">
130   - <div class="total-item-text">
131   - 不含税金额
132   - </div>
133   - <div class="total-item-price text-red">
134   - ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}
135   - </div>
136   - </div> -->
137   - <div class="total-item">
138   - <div class="total-item-text">
139   - 总金额
140   - </div>
141   - <div class="total-item-price text-red">
142   - ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}
143   - </div>
144   - </div>
145   - </div>
146   - <button class="btn submit" type="primary" @click="onSubmit">提交</button>
147   - </view>
  131 +
148 132 </uni-list>
149 133 </view>
  134 + <view class="footer">
  135 + <div class="total">
  136 + <div class="total-text">
  137 + 合计
  138 + </div>
  139 + <div class="total-item">
  140 + <div class="total-item-text">
  141 + 数量
  142 + </div>
  143 + <div class="total-item-price">
  144 + {{ (totalQuantity || 0).toFixed(2) }}kg
  145 + </div>
  146 + </div>
  147 + <!-- <div class="total-item">
  148 + <div class="total-item-text">
  149 + 不含税金额
  150 + </div>
  151 + <div class="total-item-price text-red">
  152 + ¥{{ (totalAmountExcludingTax || 0).toFixed(2) }}
  153 + </div>
  154 + </div> -->
  155 + <div class="total-item">
  156 + <div class="total-item-text">
  157 + 总金额
  158 + </div>
  159 + <div class="total-item-price text-red">
  160 + ¥{{ (totalAmountIncludingTax || 0).toFixed(2) }}
  161 + </div>
  162 + </div>
  163 + </div>
  164 + <button class="btn submit" type="primary" @click="onSubmit">提交</button>
  165 + </view>
150 166 </view>
151 167 </scroll-view>
152 168
... ... @@ -166,7 +182,7 @@ export default {
166 182 planQty: 30,
167 183 }
168 184 },
169   - computed: {
  185 + computed: {
170 186 totalQuantity() {
171 187 const qty = this.items.filter(it => it.locked).reduce((p, c) => p + this.toNumber(c.quantity), 0)
172 188 return this.round(qty, 2)
... ... @@ -349,7 +365,7 @@ export default {
349 365 // totalAmountExcludingTax: this.totalAmountExcludingTax,
350 366 totalAmountIncludingTax: this.totalAmountIncludingTax,
351 367 totalQuantity: this.totalQuantity,
352   - type:'INTL_OPEN_SPEC_AGMT',
  368 + type: 'INTL_OPEN_SPEC_AGMT',
353 369 contractDistributorLineList: selected
354 370 }
355 371
... ... @@ -364,7 +380,7 @@ export default {
364 380 uni.navigateTo({ url: '/pages/contract_foreign_unplan/index' })
365 381 }, 500)
366 382 }).catch((err) => {
367   - uni.showToast({ title: err.msg ||'提交失败', icon: 'none' })
  383 + uni.showToast({ title: err.msg || '提交失败', icon: 'none' })
368 384 })
369 385 }
370 386 }
... ... @@ -423,6 +439,7 @@ export default {
423 439 width: 36rpx;
424 440 height: 36rpx;
425 441 }
  442 +
426 443 .block-header ::v-deep .uni-data-checklist .checklist-text {
427 444 font-size: 28rpx;
428 445 margin-left: 12rpx;
... ... @@ -555,6 +572,7 @@ export default {
555 572 ::v-deep .is-disabled {
556 573 background-color: transparent !important;
557 574 }
  575 +
558 576 // ::v-deep .uni-list-item__content-title {
559 577 // font-size: 28rpx;
560 578 // color: rgba(0, 0, 0, 0.9);
... ... @@ -720,42 +738,45 @@ export default {
720 738 background: $theme-primary;
721 739 color: #fff;
722 740 }
  741 +
723 742 .value-spec {
  743 + height: 48rpx;
  744 + display: flex;
  745 + align-items: center;
  746 + color: #000000;
  747 +
  748 + // justify-content: end;
  749 + &_box {
  750 + position: relative;
  751 + width: 60rpx;
724 752 height: 48rpx;
725   - display: flex;
726   - align-items: center;
727   - color: #000000;
728   - // justify-content: end;
729   - &_box {
730   - position: relative;
731   - width: 60rpx;
732   - height: 48rpx;
733   -
734   - &_1 {
735   - font-size: 16rpx;
736   - position: absolute;
737   - top: -10rpx;
738   - left: 0;
739   - }
740 753
741   - &_2 {
742   - font-size: 16rpx;
743   - position: absolute;
744   - bottom: -10rpx;
745   - left: 0;
746   - }
  754 + &_1 {
  755 + font-size: 16rpx;
  756 + position: absolute;
  757 + top: -10rpx;
  758 + left: 0;
747 759 }
748 760
749   - &_val {
750   - font-size: 28rpx;
751   -
752   - &.p12 {
753   - padding-right: 12rpx;
754   - }
  761 + &_2 {
  762 + font-size: 16rpx;
  763 + position: absolute;
  764 + bottom: -10rpx;
  765 + left: 0;
755 766 }
756 767 }
757   - .row-spec {
758   - height: 60rpx;
759   - align-items: center;
  768 +
  769 + &_val {
  770 + font-size: 28rpx;
  771 +
  772 + &.p12 {
  773 + padding-right: 12rpx;
760 774 }
  775 + }
  776 +}
  777 +
  778 +.row-spec {
  779 + height: 60rpx;
  780 + align-items: center;
  781 +}
761 782 </style>
\ No newline at end of file
... ...
... ... @@ -56,7 +56,7 @@
56 56 <uni-list>
57 57 <uni-list-item title="现申请锁规格日期">
58 58 <template v-slot:footer>
59   - <uni-datetime-picker type="date" v-model="form.specLockDate" />
  59 + <uni-datetime-picker :start="minDate" type="date" v-model="form.specLockDate" />
60 60 </template>
61 61 </uni-list-item>
62 62 <uni-list-item title="延迟原因">
... ... @@ -97,6 +97,16 @@ export default {
97 97 form: { specLockDate: '', delayReason: '' }
98 98 }
99 99 },
  100 + computed: {
  101 + minDate() {
  102 + const now = new Date()
  103 + now.setDate(now.getDate() + 1)
  104 + const y = now.getFullYear()
  105 + const m = String(now.getMonth() + 1).padStart(2, '0')
  106 + const d = String(now.getDate()).padStart(2, '0')
  107 + return `${y}-${m}-${d}`
  108 + }
  109 + },
100 110 onLoad(options) {
101 111 const id = options && options.id ? options.id : ''
102 112 this.id = id
... ...
... ... @@ -66,9 +66,9 @@
66 66
67 67 <ProductRel ref="productRel" mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :list="productLineList" @change="onProductsChange" :options="productList" />
68 68
69   - <uni-list-item title="合计人民币金额(大写)">
  69 + <uni-list-item title="合计金额(大写)">
70 70 <template v-slot:footer>
71   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false"
  71 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false"
72 72 disabled />
73 73 </template>
74 74 </uni-list-item>
... ... @@ -533,7 +533,7 @@ export default {
533 533 if (!this.validateRequired()) return
534 534 if (this.$refs.productRel && !this.$refs.productRel.validate()) return
535 535 const confirmRes = await new Promise(resolve => {
536   - uni.showModal({ title: '提示', content: '确定保存当前经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  536 + uni.showModal({ title: '提示', content: '确定保存当前外贸未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
537 537 })
538 538 if (!(confirmRes && confirmRes.confirm)) return
539 539 const clean = (obj) => {
... ...
... ... @@ -7,7 +7,7 @@
7 7 <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" />
8 8 <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse">
9 9 <image class="opAdd" :src="collapsedView ? '/static/images/down.png' : '/static/images/up.png'" />
10   - <text class="op">{{ collapsedView ? '展开' : '收起'}} </text>
  10 + <text class="op">{{ collapsedView ? '展开' : '收起'}} </text>
11 11 </view>
12 12
13 13 </view>
... ... @@ -61,13 +61,13 @@
61 61 <uni-list-item title="厚度公差上限(mm)">
62 62 <template v-slot:footer>
63 63 <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false"
64   - placeholder="请输入厚度公差上限" @input="onNonNegativeInput(idx, 'thicknessTolPos')" @blur="onNonNegativeBlur(idx, 'thicknessTolPos', 9)" />
  64 + placeholder="请输入厚度公差上限" @input="onNumberInput(idx, 'thicknessTolPos')" @blur="onNumberBlur(idx, 'thicknessTolPos', 9)" />
65 65 </template>
66 66 </uni-list-item>
67 67 <uni-list-item title="厚度公差下限(mm)">
68 68 <template v-slot:footer>
69 69 <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false"
70   - placeholder="请输入厚度公差下限" @input="onNonNegativeInput(idx, 'thicknessTolNeg')" @blur="onNonNegativeBlur(idx, 'thicknessTolNeg', 9)" />
  70 + placeholder="请输入厚度公差下限" @input="onNumberInput(idx, 'thicknessTolNeg')" @blur="onNumberBlur(idx, 'thicknessTolNeg', 9)" />
71 71 </template>
72 72 </uni-list-item>
73 73 <uni-list-item title="宽度(mm)">
... ... @@ -77,12 +77,12 @@
77 77 </uni-list-item>
78 78 <uni-list-item title="宽度公差上限(mm)">
79 79 <template v-slot:footer>
80   - <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNonNegativeInput(idx, 'widthTolPos')" @blur="onNonNegativeBlur(idx, 'widthTolPos', 9)" />
  80 + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
81 81 </template>
82 82 </uni-list-item>
83 83 <uni-list-item title="宽度公差下限(mm)">
84 84 <template v-slot:footer>
85   - <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNonNegativeInput(idx, 'widthTolNeg')" @blur="onNonNegativeBlur(idx, 'widthTolNeg', 9)" />
  85 + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
86 86 </template>
87 87 </uni-list-item>
88 88 <uni-list-item title="长度(mm)">
... ... @@ -93,13 +93,13 @@
93 93 <uni-list-item title="长度公差上限(mm)">
94 94 <template v-slot:footer>
95 95 <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false"
96   - placeholder="请输入长度公差上限" @input="onNonNegativeInput(idx, 'lengthTolPos')" @blur="onNonNegativeBlur(idx, 'lengthTolPos', 9)" />
  96 + placeholder="请输入长度公差上限" @input="onNumberInput(idx, 'lengthTolPos')" @blur="onNumberBlur(idx, 'lengthTolPos', 9)" />
97 97 </template>
98 98 </uni-list-item>
99 99 <uni-list-item title="长度公差下限(mm)">
100 100 <template v-slot:footer>
101 101 <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false"
102   - placeholder="请输入长度公差下限" @input="onNonNegativeInput(idx, 'lengthTolNeg')" @blur="onNonNegativeBlur(idx, 'lengthTolNeg', 9)" />
  102 + placeholder="请输入长度公差下限" @input="onNumberInput(idx, 'lengthTolNeg')" @blur="onNumberBlur(idx, 'lengthTolNeg', 9)" />
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="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'quantity')" @blur="onNonNegativeBlur(idx, 'quantity', 9)" />
  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="单价">
... ... @@ -119,17 +119,17 @@
119 119 </uni-list-item>
120 120 <uni-list-item title="外贸加工费">
121 121 <template v-slot:footer>
122   - <uni-easyinput v-model="item.processingFee" type="number" :inputBorder="false" placeholder="请输入外贸加工费" />
  122 + <uni-easyinput v-model="item.processingFee" type="digit" :inputBorder="false" placeholder="请输入外贸加工费" />
123 123 </template>
124 124 </uni-list-item>
125 125 <!-- <uni-list-item title="不含税金额">
126 126 <template v-slot:footer>
127   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  127 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
128 128 </template>
129 129 </uni-list-item> -->
130 130 <uni-list-item title="总金额">
131 131 <template v-slot:footer>
132   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  132 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="" />
133 133 </template>
134 134 </uni-list-item>
135 135 <uni-list-item title="发货日期">
... ... @@ -158,27 +158,27 @@
158 158 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
159 159 <!-- 厚(公差) * 宽(公差) * 长(公差) -->
160 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>
  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 ? '+' + item.thicknessTolPos : item.thicknessTolPos }}
  165 + </view>
  166 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}
  167 + </view>
181 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 > 0 ? '+' + item.widthTolPos : item.widthTolPos }}</view>
  173 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : 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 > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}</view>
  179 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}</view>
  180 + </view>
  181 + </view>
182 182 </view>
183 183 <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
184 184 <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view>
... ... @@ -232,12 +232,10 @@ export default {
232 232 const m = Number(parts[1])
233 233 const d = Number(parts[2])
234 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}`
  235 + const yy = y
  236 + const mm = String(m).padStart(2, '0')
  237 + const dd = String(d).padStart(2, '0')
  238 + return `${yy}-${mm}-${dd}`
241 239 }
242 240 },
243 241 watch: {
... ... @@ -341,13 +339,13 @@ export default {
341 339 }
342 340 return null
343 341 }
344   -
  342 +
345 343 let err = check(it.thicknessTolPos, it.thicknessTolNeg, '厚度')
346 344 if (err) { uni.showToast({ title: err, icon: 'none' }); return false }
347   -
  345 +
348 346 err = check(it.widthTolPos, it.widthTolNeg, '宽度')
349 347 if (err) { uni.showToast({ title: err, icon: 'none' }); return false }
350   -
  348 +
351 349 err = check(it.lengthTolPos, it.lengthTolNeg, '长度')
352 350 if (err) { uni.showToast({ title: err, icon: 'none' }); return false }
353 351 }
... ... @@ -399,7 +397,7 @@ export default {
399 397 this.emitChange()
400 398 },
401 399 recalculate(idx) {
402   - const TAX_RATE = 0.13
  400 + // const TAX_RATE = 0.13
403 401 const it = this.items[idx]
404 402 if (!it) return
405 403 const qty = this.toNumber(it.quantity)
... ...
... ... @@ -49,6 +49,8 @@
49 49
50 50 <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value"
51 51 @confirm="onSheetConfirm" />
  52 + <MultiSelectSheet :visible.sync="multiSheet.visible" :title="multiSheet.title" :options="multiSheet.options" v-model="multiSheet.value"
  53 + @confirm="onMultiSheetConfirm" />
52 54
53 55 <RelateSelectSheet :visible.sync="relate.visible" :title="relate.title" :source="relate.source"
54 56 :display-fields="relate.display" :multiple="relate.multiple" :row-key="relate.rowKey"
... ... @@ -57,12 +59,13 @@
57 59 </template>
58 60 <script>
59 61 import SingleSelectSheet from '@/components/single-select/index.vue'
  62 +import MultiSelectSheet from '@/components/multi-select/index.vue'
60 63 import RelateSelectSheet from '@/components/relate-select/index.vue'
61 64 import { productVarietyQuery, getCodeApi, createApi } from '@/api/contract'
62 65 import { getDicByCodes } from '@/utils/dic'
63 66
64 67 export default {
65   - components: { SingleSelectSheet, RelateSelectSheet },
  68 + components: { SingleSelectSheet, RelateSelectSheet, MultiSelectSheet },
66 69 data() {
67 70 return {
68 71 form: {
... ... @@ -73,13 +76,14 @@ export default {
73 76 companyName: '',
74 77 materialTypeId: '',
75 78 materialTypeIdName: '',
76   - hasFrameworkAgreement: '',
77   - hasFrameworkAgreementName: '',
  79 + hasFrameworkAgreement: true,
  80 + hasFrameworkAgreementName: '是',
78 81 validityTime: ''
79 82 },
80 83 productVarietyList: [],
81 84 companyList: [],
82 85 sheet: { visible: false, title: '请选择', field: '', options: [], value: '' },
  86 + multiSheet: { visible: false, title: '请选择', field: '', options: [], value: '' },
83 87 relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }
84 88 }
85 89 },
... ... @@ -132,14 +136,25 @@ export default {
132 136 const match = (options || []).find(o => String(o.label) === String(current) || String(o.value) === String(current))
133 137 this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' }
134 138 }
  139 + const setMultiSheet = (title, options) => {
  140 + const current = this.form[field]
  141 + this.multiSheet = { ...this.multiSheet, visible: true, title, options, field, value: current || '' }
  142 + }
  143 +
135 144 if (field === 'company') {
136 145 setSheet('所属单位', this.companyList)
137 146 } else if (field === 'materialTypeId') {
138   - setSheet('品种', this.productVarietyList)
  147 + setMultiSheet('品种', this.productVarietyList)
139 148 } else if (field === 'hasFrameworkAgreement') {
140 149 setSheet('是否签订框架合同', [{ label: '是', value: true }, { label: '否', value: false }])
141 150 }
142 151 },
  152 + onMultiSheetConfirm({ value, label }) {
  153 + const field = this.multiSheet.field
  154 + if (!field) return
  155 + this.form[field] = value || ''
  156 + this.form[field + 'Name'] = label || ''
  157 + },
143 158 onSheetConfirm({ value, label }) {
144 159 const field = this.sheet.field
145 160 if (!field) return
... ...
... ... @@ -120,6 +120,8 @@ export default {
120 120 font-size: 28rpx;
121 121 color: rgba(0, 0, 0, 0.9);
122 122 text-align: right;
  123 + white-space: pre-wrap;
  124 + word-break: break-all;
123 125 }
124 126 }
125 127 </style>
\ No newline at end of file
... ...
... ... @@ -82,10 +82,20 @@ export default {
82 82
83 83 },
84 84 computed: {
85   -
  85 + extraCombined() {
  86 + return {
  87 + keyword: this.searchKeywordDebounced || undefined
  88 + }
  89 + }
86 90 },
87 91 watch: {
88   -
  92 + extraCombined: {
  93 + deep: true,
  94 + handler(v) {
  95 + this.extraParams = v
  96 + },
  97 + immediate: true
  98 + }
89 99 },
90 100 created() {
91 101 this.getProductVariety();
... ... @@ -128,7 +138,7 @@ export default {
128 138 }
129 139 // 关键字(使用去抖后的值避免频繁触发)
130 140 if (this.searchKeywordDebounced) {
131   - params.customerName = this.searchKeywordDebounced
  141 + params.keyword = this.searchKeywordDebounced
132 142 }
133 143 return queryApi(params)
134 144 .then(res => {
... ... @@ -282,7 +292,7 @@ export default {
282 292 font-weight: 600;
283 293 position: absolute;
284 294 top: -36rpx;
285   - right: -32rpx;
  295 + right: -12rpx;
286 296 height: 48rpx;
287 297 line-height: 48rpx;
288 298 color: #fff;
... ... @@ -402,4 +412,4 @@ export default {
402 412 }
403 413
404 414 }
405   -</style>
\ No newline at end of file
  415 +</style>
... ...
... ... @@ -49,6 +49,8 @@
49 49
50 50 <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value"
51 51 @confirm="onSheetConfirm" />
  52 + <MultiSelectSheet :visible.sync="multiSheet.visible" :title="multiSheet.title" :options="multiSheet.options" v-model="multiSheet.value"
  53 + @confirm="onMultiSheetConfirm" />
52 54 <RelateSelectSheet :visible.sync="relate.visible" :title="relate.title" :source="relate.source"
53 55 :display-fields="relate.display" :multiple="relate.multiple" :row-key="relate.rowKey"
54 56 :selectedKeys.sync="relate.selectedKeys" @confirm="onRelateConfirm" />
... ... @@ -57,12 +59,13 @@
57 59
58 60 <script>
59 61 import SingleSelectSheet from '@/components/single-select/index.vue'
  62 +import MultiSelectSheet from '@/components/multi-select/index.vue'
60 63 import RelateSelectSheet from '@/components/relate-select/index.vue'
61 64 import { productVarietyQuery, getCodeApi, getDetailApi, updateApi } from '@/api/contract'
62 65 import { getDicByCodes } from '@/utils/dic'
63 66
64 67 export default {
65   - components: { SingleSelectSheet, RelateSelectSheet },
  68 + components: { SingleSelectSheet, RelateSelectSheet, MultiSelectSheet },
66 69 data() {
67 70 return {
68 71 id: '',
... ... @@ -70,6 +73,7 @@ export default {
70 73 companyList: [],
71 74 productVarietyList: [],
72 75 sheet: { visible: false, title: '请选择', field: '', options: [], value: '' },
  76 + multiSheet: { visible: false, title: '请选择', field: '', options: [], value: '' },
73 77 relate: { visible: false, title: '选择', source: '', display: [], multiple: false, rowKey: 'id', selectedKeys: [], fieldKey: '' }
74 78 }
75 79 },
... ... @@ -122,10 +126,21 @@ export default {
122 126 const match = (options || []).find(o => String(o.value) === String(current))
123 127 this.sheet = { ...this.sheet, visible: true, title, options, field, value: match ? match.value : '' }
124 128 }
  129 + const setMultiSheet = (title, options) => {
  130 + const current = this.form[field]
  131 + this.multiSheet = { ...this.multiSheet, visible: true, title, options, field, value: current || '' }
  132 + }
  133 +
125 134 if (field === 'company') setSheet('所属单位', this.companyList)
126   - else if (field === 'materialTypeId') setSheet('品种', this.productVarietyList)
  135 + else if (field === 'materialTypeId') setMultiSheet('品种', this.productVarietyList)
127 136 else if (field === 'hasFrameworkAgreement') setSheet('是否签订框架合同', [{ label: '是', value: true }, { label: '否', value: false }])
128 137 },
  138 + onMultiSheetConfirm({ value, label }) {
  139 + const field = this.multiSheet.field
  140 + if (!field) return
  141 + this.form[field] = value || ''
  142 + this.form[field + 'Name'] = label || ''
  143 + },
129 144 onSheetConfirm({ value, label }) {
130 145 const field = this.sheet.field
131 146 if (!field) return
... ...
... ... @@ -61,10 +61,10 @@
61 61 <view class="item-title"><text class="required">*</text><text>区域</text></view>
62 62 </template>
63 63 </uni-list-item>
64   - <ProductRel ref="productRel" mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" @change="onProductsChange" :options="productList" :rawToProdRatioList="rawToProdRatioList" />
65   - <uni-list-item title="合计人民币金额(大写)">
  64 + <ProductRel ref="productRel" mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" @change="onProductsChange" :options="productList" :rawToProdRatioList="rawToProdRatioList" :rawProductList="rawProductList" :rawProductGradeList="rawProductGradeList" />
  65 + <uni-list-item title="合计金额(大写)">
66 66 <template v-slot:footer>
67   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled />
  67 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false" disabled />
68 68 </template>
69 69 </uni-list-item>
70 70 <uni-list-item title="交付定金、数额、时间">
... ... @@ -295,6 +295,8 @@ export default {
295 295 defaultRemark: '',
296 296 regionOptions: [],
297 297 rawToProdRatioList: [],
  298 + rawProductList: [],
  299 + rawProductGradeList: [],
298 300 }
299 301 },
300 302 created() {
... ... @@ -441,20 +443,26 @@ export default {
441 443 },
442 444 async loadExtraOptions() {
443 445 try {
444   - const results = await getDicByCodes(['CONDITIONS_REQUIRED', 'APPLICABLE_STANDARD', 'CONTRACT_PRODUCT','RAW_TO_PROD_RATIO'])
  446 + const results = await getDicByCodes(['CONDITIONS_REQUIRED', 'APPLICABLE_STANDARD', 'CONTRACT_PRODUCT','RAW_TO_PROD_RATIO', 'RAW_MATERIAL', 'RAW_MATERIAL_GRADE'])
445 447 const c1 = results && results.CONDITIONS_REQUIRED && results.CONDITIONS_REQUIRED.data ? results.CONDITIONS_REQUIRED.data : []
446 448 const c2 = results && results.APPLICABLE_STANDARD && results.APPLICABLE_STANDARD.data ? results.APPLICABLE_STANDARD.data : []
447 449 const c3 = results && results.CONTRACT_PRODUCT && results.CONTRACT_PRODUCT.data ? results.CONTRACT_PRODUCT.data : []
448 450 const c4 = results && results.RAW_TO_PROD_RATIO && results.RAW_TO_PROD_RATIO.data ? results.RAW_TO_PROD_RATIO.data : []
  451 + const c5 = results && results.RAW_MATERIAL && results.RAW_MATERIAL.data ? results.RAW_MATERIAL.data : []
  452 + const c6 = results && results.RAW_MATERIAL_GRADE && results.RAW_MATERIAL_GRADE.data ? results.RAW_MATERIAL_GRADE.data : []
449 453 this.specialTermsList = c1.map(it => ({ label: it.name, value: it.code }))
450 454 this.executionStandardList = c2.map(it => ({ label: it.name, value: it.code }))
451 455 this.productList = c3.map(it => ({ label: it.name, value: it.code }))
452 456 this.rawToProdRatioList = c4.map(it => ({ label: it.name, value: it.code }))
  457 + this.rawProductList = c5.map(it => ({ label: it.name, value: it.code }))
  458 + this.rawProductGradeList = c6.map(it => ({ label: it.name, value: it.code }))
453 459 } catch (e) {
454 460 this.specialTermsList = []
455 461 this.executionStandardList = []
456 462 this.productList = []
457 463 this.rawToProdRatioList = []
  464 + this.rawProductList = []
  465 + this.rawProductGradeList = []
458 466 }
459 467 },
460 468 displayLabel(field) {
... ... @@ -560,7 +568,7 @@ export default {
560 568 async onSubmit() {
561 569 if (!this.validateRequired()) return
562 570 const confirmRes = await new Promise(resolve => {
563   - uni.showModal({ title: '提示', content: '确定新增经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  571 + uni.showModal({ title: '提示', content: '确定新增加工标准合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
564 572 })
565 573 if (!(confirmRes && confirmRes.confirm)) return
566 574 const clean = (obj) => {
... ... @@ -587,9 +595,6 @@ export default {
587 595 totalAmountIncludingTax: this.totalAmountIncludingTax,
588 596 contractStdProcessingLineList: lines.map(it => ({
589 597 ...it,
590   - productId: it.rawProductId || '',
591   - productName: it.rawProductName || '',
592   - productGrade: it.rawProductGrade || '',
593 598 }))
594 599 })
595 600 console.log('onSubmit__payload', payload)
... ...
... ... @@ -28,7 +28,7 @@ statusStyl<template>
28 28 </view>
29 29
30 30 <view class="section">
31   - <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
  31 + <view class="row"><text class="label">合计金额(大写)</text><text class="value">{{
32 32 detail.totalAmountCapital || '-' }}</text></view>
33 33 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
34 34 '-' }}</text></view>
... ... @@ -60,7 +60,9 @@ statusStyl<template>
60 60 </view>
61 61
62 62 <view class="section">
63   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-'
  63 + <view class="row"><text class="label">规范性合同</text><text class="value act"
  64 + @click="downloadFile(detail.standardFileId, detail.standardFileName)"
  65 + >{{ detail.standardFileName || '-'
64 66 }}</text></view>
65 67 <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否'
66 68 }}</text></view>
... ... @@ -117,6 +119,7 @@ import DetailButtons from '@/components/detail-buttons/index.vue'
117 119 import FileUpload from '@/components/file-upload/index.vue'
118 120 import SingleSelectSheet from '@/components/single-select/index.vue'
119 121 import { fillStandardApprovedName } from '@/utils/dic.js'
  122 +import { downloadFile } from '@/utils/downloadFile.js'
120 123
121 124 export default {
122 125 name: 'ContractProcessDetail',
... ... @@ -219,8 +222,8 @@ export default {
219 222 { ...this.buttons[0], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:modify')) },
220 223 { ...this.buttons[1], visible: (s === 'DRAFT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:delete')) },
221 224 { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS' && this.$auth.hasPermi('contract-manage:processed-standard-contract:upload')) },
  225 + { ...this.buttons[4], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:processed-standard-contract:review')) },
222 226 { ...this.buttons[3], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:processed-standard-contract:approve')) },
223   - { ...this.buttons[4], visible: (s === 'STANDARD' && this.$auth.hasPermi('contract-manage:processed-standard-contract:review')) }
224 227 ]
225 228 }
226 229 },
... ... @@ -285,7 +288,7 @@ export default {
285 288 })
286 289 return
287 290 }
288   - if (!this.standardStandardized) {
  291 + if (!this.standardStandardized && this.standardStandardized !== false) {
289 292 uni.showToast({
290 293 title: '请选择合同是否规范',
291 294 icon: 'error'
... ... @@ -358,6 +361,7 @@ export default {
358 361 uni.setStorageSync(CACHE_KEY, id)
359 362 uni.navigateTo({ url: '/pages/flow/audit_detail' })
360 363 },
  364 + downloadFile,
361 365 async loadDetail() {
362 366 if (!this.id) return
363 367 try {
... ... @@ -438,6 +442,10 @@ export default {
438 442 &_已签收 {
439 443 background-image: url('~@/static/images/contract/status_4.png');
440 444 }
  445 +
  446 + &_已取消 {
  447 + background-image: url('~@/static/images/contract/status_5.png');
  448 + }
441 449 }
442 450 }
443 451 .section1 {
... ... @@ -456,9 +464,10 @@ export default {
456 464 }
457 465
458 466 .label {
459   - width: 310rpx;
  467 + max-width: 310rpx;
460 468 color: rgba(0, 0, 0, 0.6);
461 469 font-size: 28rpx;
  470 + margin-right: 20rpx;
462 471 }
463 472
464 473 .value {
... ... @@ -466,6 +475,11 @@ export default {
466 475 text-align: right;
467 476 color: rgba(0, 0, 0, 0.9);
468 477 font-size: 28rpx;
  478 + white-space: pre-wrap;
  479 + word-break: break-all;
  480 + &.act {
  481 + color: $theme-primary;
  482 + }
469 483 }
470 484
471 485 .customer {
... ... @@ -516,4 +530,7 @@ export default {
516 530 color: rgba(0, 0, 0, 0.6);
517 531 font-size: 32rpx;
518 532 }
  533 +.upload-row {
  534 + margin-top: 20rpx;
  535 +}
519 536 </style>
\ No newline at end of file
... ...
... ... @@ -49,7 +49,7 @@
49 49 <view class="card" @click="goDetail(item)">
50 50 <view class="card-header">
51 51 <text class="title omit2">{{ item.buyerName }}</text>
52   - <text v-if="item.status === 'STANDARD'" :class="['status']" :style="{ background: statusMap[item.shippingStatusName] }">{{ item.shippingStatusName }}</text>
  52 + <text v-if="item.status === 'STANDARD'" :class="['status', 'status_' + item.shippingStatusName]">{{ item.shippingStatusName }}</text>
53 53 </view>
54 54 <view class="info-row">
55 55 <text>编号</text><text>{{ item.code }}</text>
... ... @@ -94,8 +94,7 @@
94 94 <script>
95 95 import CardList from '@/components/card/index.vue'
96 96 import FilterModal from '@/components/filter/index.vue'
97   -import { queryContractApi, statusStyle,statusMap } from '@/api/contract.js'
98   -import { officeQueryApi } from '@/api/devManage.js'
  97 +import { queryContractApi, statusStyle } from '@/api/contract.js'
99 98
100 99 export default {
101 100 components: { CardList, FilterModal },
... ... @@ -116,7 +115,6 @@ export default {
116 115 filterForm: { deptId: '', deptName: '', dateRange: [] },
117 116 deptSelectVisible: false,
118 117 statusStyle,
119   - statusMap,
120 118 }
121 119 },
122 120 computed: {
... ... @@ -329,26 +327,30 @@ export default {
329 327 font-size: 30rpx;
330 328 font-weight: 600;
331 329 position: absolute;
332   - top: -36rpx;
333   - right: -32rpx;
  330 + top: -32rpx;
  331 + right: -12rpx;
334 332 height: 48rpx;
335   - line-height: 48rpx;
  333 + line-height: 50rpx;
336 334 color: #fff;
337 335 font-size: 24rpx;
338 336 padding: 0 14rpx;
339 337 border-radius: 6rpx;
340   - &.status_1 {
  338 + &_审批中 {
341 339 background: $theme-primary;
342 340 }
343   - &.status_2 {
  341 + &_生产中 {
344 342 background: #2BA471;
345 343 }
346   - &.status_3 {
347   - background: #D54941;
  344 + &_已发货 {
  345 + background: #E37318;
348 346 }
349   - &.status_4 {
350   - background: #E7E7E7;
351   - color: rgba(0,0,0,0.9);
  347 + &_已签收 {
  348 + background: #858A99;
  349 + color: #ffffff;
  350 + }
  351 + &_已取消 {
  352 + background: #9E9E9E;
  353 + color: #ffffff;
352 354 }
353 355 }
354 356 }
... ... @@ -379,19 +381,19 @@ export default {
379 381 }
380 382 }
381 383
382   -.filter-form {
  384 +.filter-form {
383 385 .form-item { margin-bottom: 24rpx; }
384   - .label {
385   - margin-bottom: 20rpx;
  386 + .label {
  387 + margin-bottom: 20rpx;
386 388 color: rgba(0,0,0,0.9);
387 389 height: 44rpx;
388 390 line-height: 44rpx;
389 391 font-size: 30rpx;
390 392 }
391   - .fake-select {
392   - height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
  393 + .fake-select {
  394 + height: 80rpx; line-height: 80rpx; padding: 0 20rpx; background: #f3f3f3; border-radius: 12rpx;
393 395 .placeholder { color: #999; }
394 396 .value { color: #333; }
395 397 }
396 398 }
397   -</style>
\ No newline at end of file
  399 +</style>
... ...
... ... @@ -41,11 +41,11 @@
41 41 </template>
42 42 </uni-list-item>
43 43
44   - <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :list="productLineList" @change="onProductsChange" :options="productList" />
  44 + <ProductRel mode="add" :deliveryDate="form.orderDate" :deliveryDateBase="form.deliveryDate" :rawToProdRatioList="rawToProdRatioList" :list="productLineList" @change="onProductsChange" :options="productList" :rawProductList="rawProductList" :rawProductGradeList="rawProductGradeList" />
45 45
46   - <uni-list-item title="合计人民币金额(大写)">
  46 + <uni-list-item title="合计金额(大写)">
47 47 <template v-slot:footer>
48   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false"
  48 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false"
49 49 disabled />
50 50 </template>
51 51 </uni-list-item>
... ... @@ -266,6 +266,8 @@ export default {
266 266 productList: [],
267 267 regionOptions: [],
268 268 rawToProdRatioList: [],
  269 + rawProductList: [],
  270 + rawProductGradeList: [],
269 271 }
270 272 },
271 273 onLoad(query) {
... ... @@ -383,20 +385,27 @@ export default {
383 385 },
384 386 async loadExtraOptions() {
385 387 try {
386   - const results = await getDicByCodes(['CONDITIONS_REQUIRED', 'APPLICABLE_STANDARD', 'CONTRACT_PRODUCT','RAW_TO_PROD_RATIO'])
  388 + const results = await getDicByCodes(['CONDITIONS_REQUIRED', 'APPLICABLE_STANDARD', 'CONTRACT_PRODUCT','RAW_TO_PROD_RATIO', 'RAW_MATERIAL', 'RAW_MATERIAL_GRADE'])
387 389 const c1 = results && results.CONDITIONS_REQUIRED && results.CONDITIONS_REQUIRED.data ? results.CONDITIONS_REQUIRED.data : []
388 390 const c2 = results && results.APPLICABLE_STANDARD && results.APPLICABLE_STANDARD.data ? results.APPLICABLE_STANDARD.data : []
389 391 const c3 = results && results.CONTRACT_PRODUCT && results.CONTRACT_PRODUCT.data ? results.CONTRACT_PRODUCT.data : []
390 392 const c4 = results && results.RAW_TO_PROD_RATIO && results.RAW_TO_PROD_RATIO.data ? results.RAW_TO_PROD_RATIO.data : []
  393 + const c5 = results && results.RAW_MATERIAL && results.RAW_MATERIAL.data ? results.RAW_MATERIAL.data : []
  394 + const c6 = results && results.RAW_MATERIAL_GRADE && results.RAW_MATERIAL_GRADE.data ? results.RAW_MATERIAL_GRADE.data : []
391 395 this.rawToProdRatioList = c4.map(it => ({ label: it.name, value: it.code }))
392 396 this.specialTermsList = c1.map(it => ({ label: it.name, value: it.code }))
393 397 this.executionStandardList = c2.map(it => ({ label: it.name, value: it.code }))
394 398 this.productList = c3.map(it => ({ label: it.name, value: it.code }))
  399 + console.log('c5', c5)
  400 + this.rawProductList = c5.map(it => ({ label: it.name, value: it.code }))
  401 + this.rawProductGradeList = c6.map(it => ({ label: it.name, value: it.code }))
395 402 } catch (e) {
396 403 this.specialTermsList = []
397 404 this.executionStandardList = []
398 405 this.productList = []
399 406 this.rawToProdRatioList = []
  407 + this.rawProductList = []
  408 + this.rawProductGradeList = []
400 409 }
401 410 },
402 411 displayLabel(field) {
... ... @@ -486,12 +495,12 @@ export default {
486 495 }
487 496 const strEmpty = (v) => (v === undefined || v === null || (typeof v === 'string' && v.trim() === ''))
488 497 const numEmpty = (v) => (v === undefined || v === null || v === '' || (typeof v === 'number' && isNaN(v)))
  498 + console.log('list11', list)
489 499 for (const [idx, it] of list.entries()) {
490 500 if (
491 501 strEmpty(it.productName) ||
492 502 strEmpty(it.industry) ||
493 503 strEmpty(it.quality) ||
494   - strEmpty(it.brand) ||
495 504 numEmpty(it.productQuantity) ||
496 505 strEmpty(it.unitPrice) ||
497 506 strEmpty(it.deliveryDate)
... ... @@ -505,7 +514,7 @@ export default {
505 514 console.log('onSubmit__payload', payload)
506 515 if (!this.validateRequired()) return
507 516 const confirmRes = await new Promise(resolve => {
508   - uni.showModal({ title: '提示', content: '确定保存当前经销未锁规合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
  517 + uni.showModal({ title: '提示', content: '确定保存当前加工标准合同吗?', confirmText: '确定', cancelText: '取消', success: resolve })
509 518 })
510 519 if (!(confirmRes && confirmRes.confirm)) return
511 520 const clean = (obj) => {
... ...
... ... @@ -19,7 +19,7 @@
19 19 </view>
20 20
21 21 <view class="section">
22   - <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
  22 + <view class="row"><text class="label">合计金额(大写)</text><text class="value">{{
23 23 detail.totalAmountCapital || '-' }}</text></view>
24 24 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
25 25 '-' }}</text></view>
... ...
... ... @@ -21,9 +21,9 @@
21 21 <view class="item-title"><text>原材料名称</text></view>
22 22 </template>
23 23 </uni-list-item>
24   - <uni-list-item title="原材料牌号">
25   - <template v-slot:footer>
26   - <uni-easyinput v-model="item.rawProductGrade" :inputBorder="false" placeholder="请输入原材料牌号" />
  24 + <uni-list-item class="select-item" :class="item.rawProductGradeName ? 'is-filled' : 'is-empty'" clickable @click="openProductGradeSheet(idx)" :rightText="item.rawProductGradeName || '请选择原材料牌号'" showArrow>
  25 + <template v-slot:body>
  26 + <view class="item-title"><text>原材料牌号</text></view>
27 27 </template>
28 28 </uni-list-item>
29 29 <uni-list-item title="行业">
... ... @@ -38,9 +38,9 @@
38 38 <view class="item-title"><text>原材料名称</text></view>
39 39 </template>
40 40 </uni-list-item>
41   - <uni-list-item title="原材料牌号">
42   - <template v-slot:footer>
43   - <uni-easyinput v-model="item.rawProductGrade" :inputBorder="false" placeholder="请输入原材料牌号" />
  41 + <uni-list-item class="select-item" :class="item.rawProductGradeName ? 'is-filled' : 'is-empty'" clickable @click="openProductGradeSheet(idx)" :rightText="item.rawProductGradeName || '请选择原材料牌号'" showArrow>
  42 + <template v-slot:body>
  43 + <view class="item-title"><text>原材料牌号</text></view>
44 44 </template>
45 45 </uni-list-item>
46 46 <uni-list-item title="行业">
... ... @@ -58,14 +58,14 @@
58 58 <uni-easyinput v-model="item.supplyTime" :inputBorder="false" placeholder="请输入原材料提供时间" />
59 59 </template>
60 60 </uni-list-item>
61   - <uni-list-item class="select-item" :class="item.rawToProdRatioName ? 'is-filled' : 'is-empty'" clickable @click="openRawToProdRatioSheet(idx)" :rightText="item.rawToProdRatioName || '请选择原材料与产品数量比'" showArrow>
  61 + <uni-list-item class="select-item" :class="item.materialProductRatioName ? 'is-filled' : 'is-empty'" clickable @click="openRawToProdRatioSheet(idx)" :rightText="item.materialProductRatioName || '请选择原材料与产品数量比'" showArrow>
62 62 <template v-slot:body>
63 63 <view class="item-title"><text>原材料与产品数量比</text></view>
64 64 </template>
65 65 </uni-list-item>
66   - <uni-list-item title="原材料与产品数量比备注">
  66 + <uni-list-item title="原材料与产品数量比备注" v-if="item.materialProductRatio === '10'">
67 67 <template v-slot:footer>
68   - <uni-easyinput v-model="item.materialProductRatioRemarks" :disabled="item.materialProductRatio !== '10'" :inputBorder="false" placeholder="请输入原材料与产品数量比备注" />
  68 + <uni-easyinput v-model="item.materialProductRatioRemarks" :inputBorder="false" placeholder="请输入原材料与产品数量比备注" />
69 69 </template>
70 70 </uni-list-item>
71 71
... ... @@ -92,13 +92,13 @@
92 92 </uni-list-item>
93 93 <uni-list-item title="厚度公差上限(mm)">
94 94 <template v-slot:footer>
95   - <uni-easyinput type="text" v-model="item.thicknessTolPos" :inputBorder="false"
  95 + <uni-easyinput type="digit" v-model="item.thicknessTolPos" :inputBorder="false"
96 96 placeholder="请输入厚度公差上限" @input="onNumberInput(idx, 'thicknessTolPos')" @blur="onNumberBlur(idx, 'thicknessTolPos', 9)" />
97 97 </template>
98 98 </uni-list-item>
99 99 <uni-list-item title="厚度公差下限(mm)">
100 100 <template v-slot:footer>
101   - <uni-easyinput type="text" v-model="item.thicknessTolNeg" :inputBorder="false"
  101 + <uni-easyinput type="digit" v-model="item.thicknessTolNeg" :inputBorder="false"
102 102 placeholder="请输入厚度公差下限" @input="onNumberInput(idx, 'thicknessTolNeg')" @blur="onNumberBlur(idx, 'thicknessTolNeg', 9)" />
103 103 </template>
104 104 </uni-list-item>
... ... @@ -109,12 +109,12 @@
109 109 </uni-list-item>
110 110 <uni-list-item title="宽度公差上限(mm)">
111 111 <template v-slot:footer>
112   - <uni-easyinput type="text" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
  112 + <uni-easyinput type="digit" v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差上限" @input="onNumberInput(idx, 'widthTolPos')" @blur="onNumberBlur(idx, 'widthTolPos', 9)" />
113 113 </template>
114 114 </uni-list-item>
115 115 <uni-list-item title="宽度公差下限(mm)">
116 116 <template v-slot:footer>
117   - <uni-easyinput type="text" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
  117 + <uni-easyinput type="digit" v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差下限" @input="onNumberInput(idx, 'widthTolNeg')" @blur="onNumberBlur(idx, 'widthTolNeg', 9)" />
118 118 </template>
119 119 </uni-list-item>
120 120 <uni-list-item title="长度(mm)">
... ... @@ -124,19 +124,19 @@
124 124 </uni-list-item>
125 125 <uni-list-item title="长度公差上限(mm)">
126 126 <template v-slot:footer>
127   - <uni-easyinput type="text" v-model="item.lengthTolPos" :inputBorder="false"
  127 + <uni-easyinput type="digit" v-model="item.lengthTolPos" :inputBorder="false"
128 128 placeholder="请输入长度公差上限" @input="onNumberInput(idx, 'lengthTolPos')" @blur="onNumberBlur(idx, 'lengthTolPos', 9)" />
129 129 </template>
130 130 </uni-list-item>
131 131 <uni-list-item title="长度公差下限(mm)">
132 132 <template v-slot:footer>
133   - <uni-easyinput type="text" v-model="item.lengthTolNeg" :inputBorder="false"
  133 + <uni-easyinput type="digit" v-model="item.lengthTolNeg" :inputBorder="false"
134 134 placeholder="请输入长度公差下限" @input="onNumberInput(idx, 'lengthTolNeg')" @blur="onNumberBlur(idx, 'lengthTolNeg', 9)" />
135 135 </template>
136 136 </uni-list-item>
137 137 <uni-list-item title="定作物数量">
138 138 <template v-slot:footer>
139   - <uni-easyinput v-model="item.productQuantity" type="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'productQuantity')" @blur="onNonNegativeBlur(idx, 'productQuantity', 9)" />
  139 + <uni-easyinput v-model="item.productQuantity" type="digit" :inputBorder="false" placeholder="请输入数量kg" @input="onNonNegativeInput(idx, 'productQuantity')" @blur="onNonNegativeBlur(idx, 'productQuantity', 2)" />
140 140 </template>
141 141 </uni-list-item>
142 142 <uni-list-item title="加工费单价">
... ... @@ -146,12 +146,12 @@
146 146 </uni-list-item>
147 147 <uni-list-item title="不含税金额">
148 148 <template v-slot:footer>
149   - <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  149 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="" />
150 150 </template>
151 151 </uni-list-item>
152 152 <uni-list-item title="总金额">
153 153 <template v-slot:footer>
154   - <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  154 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="" />
155 155 </template>
156 156 </uni-list-item>
157 157 <uni-list-item title="发货日期">
... ... @@ -175,35 +175,39 @@
175 175 <view v-else class="view-list" v-show="!collapsedView">
176 176 <view v-for="(item, idx) in items" :key="'v-' + idx" class="card">
177 177 <view class="row"><text class="label">原材料名称</text><text class="value">{{ item.rawProductName }}</text></view>
178   - <view class="row"><text class="label">原材料牌号</text><text class="value">{{ item.rawProductGrade }}</text></view>
179   - <view class="row"><text class="label">原材料提供时间</text><text class="value">{{ item.rawProductProvideDate }}</text></view>
180   - <view class="row"><text class="label">原材料产品数量比</text><text class="value">{{ item.rawToProdRatioName }}</text></view>
  178 + <view class="row"><text class="label">原材料牌号</text><text class="value">{{ item.rawProductGradeName }}</text></view>
  179 + <view class="row"><text class="label">原材料提供时间</text><text class="value">{{ item.supplyTime }}</text></view>
  180 + <view class="row"><text class="label">原材料产品数量比</text><text class="value">{{ item.materialProductRatioName }}</text></view>
181 181 <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view>
182 182 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
183 183 <!-- 厚(公差) * 宽(公差) * 长(公差) -->
184   - <view class="row row-spec"><text class="label">规格(mm)</text>
185   - <view class="value value-spec">
186   - <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
187   - <view v-if="item.thickness" class="value-spec_box">
188   - <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
189   - </view>
190   - <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg }}
191   - </view>
  184 + <view class="row row-spec"><text class="label">规格(mm)</text>
  185 + <view class="value value-spec">
  186 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  187 + <view v-if="item.thickness" class="value-spec_box">
  188 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos }}
  189 + </view>
  190 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }}
192 191 </view>
193   - <view v-if="item.width" class="value-spec_val p12">*</view>
194   - <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
195   - <view v-if="item.width" class="value-spec_box">
196   - <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
197   - <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg }}</view>
  192 + </view>
  193 + <view v-if="item.width" class="value-spec_val p12">*</view>
  194 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  195 + <view v-if="item.width" class="value-spec_box">
  196 + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' + item.widthTolPos : item.widthTolPos }}
198 197 </view>
199   - <view v-if="item.length" class="value-spec_val p12">*</view>
200   - <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
201   - <view v-if="item.length" class="value-spec_box">
202   - <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
203   - <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg }}</view>
  198 + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }}
  199 + </view>
  200 + </view>
  201 + <view v-if="item.length" class="value-spec_val p12">*</view>
  202 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  203 + <view v-if="item.length" class="value-spec_box">
  204 + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}
  205 + </view>
  206 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}
204 207 </view>
205 208 </view>
206 209 </view>
  210 + </view>
207 211 <view class="row"><text class="label">定做物数量</text><text class="value">{{ item.productQuantity }}</text></view>
208 212 <view class="row"><text class="label">加工费单价</text><text class="value">{{ formatCurrency(item.unitPrice)
209 213 }}</text>
... ... @@ -230,7 +234,9 @@ export default {
230 234 deliveryDateBase: { type: String, default: '' },
231 235 options: { type: Array, default: () => [] },
232 236 deliveryDate: { type: String, default: '' },
233   - rawToProdRatioList: { type: Array, default: () => [] }
  237 + rawToProdRatioList: { type: Array, default: () => [] },
  238 + rawProductList: { type: Array, default: () => [] },
  239 + rawProductGradeList: { type: Array, default: () => [] },
234 240 },
235 241 components: { SingleSelectSheet },
236 242 data() {
... ... @@ -250,11 +256,18 @@ export default {
250 256 },
251 257 ratioOptions() {
252 258 const list = Array.isArray(this.rawToProdRatioList) ? this.rawToProdRatioList : []
  259 + console.log('list', list)
253 260 return list.map(o => ({
254 261 label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')),
255 262 value: o.value != null ? o.value : (o.id != null ? o.id : o.code)
256 263 }))
257 264 },
  265 + rawProductOptions() {
  266 + return Array.isArray(this.rawProductList) ? this.rawProductList : []
  267 + },
  268 + rawProductGradeOptions() {
  269 + return Array.isArray(this.rawProductGradeList) ? this.rawProductGradeList : []
  270 + },
258 271 minDeliveryDate() {
259 272 const s = this.deliveryDate
260 273 if (!s) return ''
... ... @@ -263,12 +276,10 @@ export default {
263 276 const m = Number(parts[1])
264 277 const d = Number(parts[2])
265 278 if (!y || !m || !d) return ''
266   - const dt = new Date(y, m - 1, d)
267   - dt.setDate(dt.getDate() + 1)
268   - const yy = dt.getFullYear()
269   - const mm = String(dt.getMonth() + 1).padStart(2, '0')
270   - const dd = String(dt.getDate() - 1).padStart(2, '0')
271   - return `${yy}/${mm}/${dd}`
  279 + const yy = y
  280 + const mm = String(m).padStart(2, '0')
  281 + const dd = String(d).padStart(2, '0')
  282 + return `${yy}-${mm}-${dd}`
272 283 }
273 284 },
274 285 watch: {
... ... @@ -278,8 +289,6 @@ export default {
278 289 },
279 290 list: {
280 291 handler(v) {
281   - // const arr = Array.isArray(v) ? v : []
282   - // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
283 292 this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
284 293 console.log('v', v)
285 294 },
... ... @@ -289,11 +298,12 @@ export default {
289 298 created() {
290 299 const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
291 300 this.items = init
  301 + console.log('init', init)
292 302 this.recalculateAll()
293 303 },
294 304 methods: {
295 305 defaultItem() {
296   - return { productId:'', productName:'', productGrade:'', productStatus:'', rawProductId: '', rawProductName: '', rawProductGrade: '', industry: '',materialProductRatioRemarks:'', supplyTime: '存料加工', materialProductRatio: '', rawToProdRatioName: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', productQuantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '' }
  306 + return { productId:'', productName:'', productGrade:'', productStatus:'', rawProductId: '', rawProductName: '', rawProductGrade: '', industry: '',materialProductRatioRemarks:'', supplyTime: '存料加工', materialProductRatio: '', materialProductRatioName: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', productQuantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, deliveryDate: '' }
297 307 },
298 308 onNumberInput(idx, field) {
299 309 const it = this.items[idx]
... ... @@ -405,11 +415,25 @@ export default {
405 415 return [t, w, l].filter(Boolean).join(' × ')
406 416 },
407 417 openProductSheet(idx) {
408   - const opts = this.selectOptions
  418 + const opts = this.rawProductOptions
409 419 const current = this.items[idx] && this.items[idx].rawProductId
410 420 const match = opts.find(o => String(o.value) === String(current))
411 421 this.sheet = { ...this.sheet, visible: true, title: '请选择原材料名称', options: opts, idx, value: match ? match.value : '', mode: 'product' }
412 422 },
  423 + openProductGradeSheet(idx) {
  424 + const it = this.items[idx]
  425 + if (!it || !it.rawProductId) {
  426 + uni.showToast({ title: '请先选择原材料名称', icon: 'none' })
  427 + return
  428 + }
  429 + const opts = this.rawProductGradeOptions.filter(o => {
  430 + const code = o.value
  431 + return code && it.rawProductId && String(code).startsWith(String(it.rawProductId))
  432 + })
  433 + const current = it.rawProductGrade
  434 + const match = opts.find(o => String(o.value) === String(current))
  435 + this.sheet = { ...this.sheet, visible: true, title: '请选择原材料牌号', options: opts, idx, value: match ? match.value : '', mode: 'grade' }
  436 + },
413 437 openProductTargetSheet(idx) {
414 438 const opts = this.selectOptions
415 439 const current = this.items[idx] && this.items[idx].productId
... ... @@ -428,10 +452,17 @@ export default {
428 452 if (!it) { this.sheet.visible = false; return }
429 453 if (this.sheet.mode === 'ratio') {
430 454 it.materialProductRatio = value
431   - it.rawToProdRatioName = label || ''
  455 + it.materialProductRatioName = label || ''
432 456 } else if (this.sheet.mode === 'product') {
  457 + if (it.rawProductId !== value) {
  458 + it.rawProductGrade = ''
  459 + it.rawProductGradeName = ''
  460 + }
433 461 it.rawProductId = value
434 462 it.rawProductName = label || ''
  463 + } else if (this.sheet.mode === 'grade') {
  464 + it.rawProductGrade = value
  465 + it.rawProductGradeName = label || ''
435 466 } else if (this.sheet.mode === 'target') {
436 467 it.productId = value
437 468 it.productName = label || ''
... ...
... ... @@ -60,7 +60,7 @@
60 60 <ProductRel ref="productRel" mode="add" :deliveryDateBase="form.deliveryDate" :deliveryDate="form.orderDate" @change="onProductsChange" :options="productList" />
61 61 <uni-list-item title="合计人民币金额(大写)">
62 62 <template v-slot:footer>
63   - <uni-easyinput v-model="form.totalAmountCapital" placeholder="自动计算" :inputBorder="false" disabled />
  63 + <uni-easyinput v-model="form.totalAmountCapital" placeholder="" :inputBorder="false" disabled />
64 64 </template>
65 65 </uni-list-item>
66 66 <uni-list-item title="交付定金、数额、时间">
... ...