Commit 538dc29f777cac84df3b0a9496c80fb2a2fac992

Authored by gesilong
1 parent f96cd580

commit: 合同联调

... ... @@ -9,7 +9,7 @@ export const statusStyle = [
9 9
10 10 export const statusMap = {
11 11 '生产中': '#2BA471',
12   - '审中': '#3D48A3',
  12 + '审中': '#3D48A3',
13 13 '已签收': '#E7E7E7',
14 14 '已发货': '#D54941',
15 15 }
... ... @@ -23,6 +23,14 @@ export function queryApi(params) {
23 23 params
24 24 })
25 25 }
  26 +// 查询锁价无规格申请单列表
  27 +export function querySpecLockApi(params) {
  28 + return request({
  29 + url: `${baseUrl}/specLockDelayApplication/query`,
  30 + method: 'get',
  31 + params
  32 + })
  33 +}
26 34
27 35 // 查询合同列表
28 36 export function queryContractApi(params) {
... ... @@ -67,6 +75,13 @@ export function getDetailApi(id) {
67 75 params: { id }
68 76 })
69 77 }
  78 +export function getSpecDetailApi(id) {
  79 + return request({
  80 + url: `${baseUrl}/specLockDelayApplication`,
  81 + method: 'get',
  82 + params: { id }
  83 + })
  84 +}
70 85
71 86 export function updateApi(data) {
72 87 return request({
... ...
... ... @@ -439,6 +439,27 @@
439 439 "navigationBarBackgroundColor": "#ffffff",
440 440 "navigationBarTextStyle": "black"
441 441 }
  442 + },{
  443 + "path": "pages/contract_unlocked_operation/detail",
  444 + "style": {
  445 + "navigationBarTitleText": "锁价无规格操作申请单详情",
  446 + "navigationBarBackgroundColor": "#ffffff",
  447 + "navigationBarTextStyle": "black"
  448 + }
  449 + },{
  450 + "path": "pages/contract_unlocked_operation/modify",
  451 + "style": {
  452 + "navigationBarTitleText": "编辑锁价无规格操作申请单",
  453 + "navigationBarBackgroundColor": "#ffffff",
  454 + "navigationBarTextStyle": "black"
  455 + }
  456 + },{
  457 + "path": "pages/contract_unlocked_operation/index",
  458 + "style": {
  459 + "navigationBarTitleText": "锁价无规格操作申请单",
  460 + "navigationBarBackgroundColor": "#ffffff",
  461 + "navigationBarTextStyle": "black"
  462 + }
442 463 }
443 464 ],
444 465 "subPackages": [{
... ...
... ... @@ -250,7 +250,7 @@ export default {
250 250
251 251 .list-box {
252 252 flex: 1;
253   - padding-top: 112rpx;
  253 + padding-top: 140rpx;
254 254
255 255 &.pad-batch {
256 256 padding-bottom: 144rpx;
... ...
  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 customer">{{ form.contractCode }}</text>
  7 + <view class="row"><text class="label">客户名称</text><text class="value">{{ form.customerName }}</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.workshopName }}</text></view>
  10 + <view class="row"><text class="label">订单类型</text><text class="value">{{ form.contractType }}</text></view>
  11 + <view class="row"><text class="label">原来订货日期</text><text class="value">{{ form.contractDocumentDate }}</text></view>
  12 + <view class="row"><text class="label">第几次申请</text><text class="value">{{ form.applicationCount }}</text></view>
  13 + <view class="row"><text class="label">数量</text><text class="value">{{ form.totalQuantity }}</text></view>
  14 + </view>
  15 + <view class="section">
  16 + <view class="row"><text class="label">现申请锁规格日期</text><text class="value">{{ form.specLockDate }}</text></view>
  17 + <view class="row"><text class="label">延迟原因</text><text class="value">{{ form.delayReason }}</text></view>
  18 + <view class="row"><text class="label">制单日期</text><text class="value">{{ form.orderDate }}</text></view>
  19 + </view>
  20 + </view>
  21 + </scroll-view>
  22 + <detail-buttons :buttons="displayButtons" @click="handleButtonClick" />
  23 + </view>
  24 +</template>
  25 +
  26 +<script>
  27 +import DetailButtons from '@/components/detail-buttons/index.vue'
  28 +import { getSpecDetailApi } from '@/api/contract.js'
  29 +
  30 +export default {
  31 + components: { DetailButtons },
  32 + data() {
  33 + return {
  34 + id: '',
  35 + form: {
  36 + id: '', contractCode: '', customerName: '', deptName: '', workshopName: '', contractType: '', contractDocumentDate: '', applicationCount: '', totalQuantity: '', specLockDate: '', delayReason: '', orderDate: ''
  37 +
  38 + }
  39 + }
  40 + },
  41 + computed: {
  42 + displayButtons() {
  43 + return [
  44 + // { text: '删除', variant: 'danger' },
  45 + { text: '编辑', variant: 'outline' }
  46 + ]
  47 + }
  48 + },
  49 + onLoad(query) {
  50 + this.id = (query && query.id) ? query.id : ''
  51 + },
  52 + created() {
  53 + this.loadDetail()
  54 + },
  55 + methods: {
  56 + loadDetail() {
  57 + if (!this.id) return
  58 + getSpecDetailApi(this.id).then(res => {
  59 + const d = res.data || {}
  60 + const m = d || {}
  61 + const yesNo = m.hasFrameworkAgreement === 'Y' || m.hasFrameworkAgreement === true
  62 + this.form = {
  63 + id: m.id || '',
  64 + contractCode: m.contractCode || '',
  65 + customerName: m.customerName || (m.customer && m.customer.name) || '',
  66 + deptName: m.deptName || (m.dept && m.dept.name) || '',
  67 + workshopName: m.workshopName || (m.workshop && m.workshop.name) || '',
  68 + contractType: m.contractType || '',
  69 + contractDocumentDate: m.contractDocumentDate || '',
  70 + applicationCount: m.applicationCount || '',
  71 + totalQuantity: m.totalQuantity || '',
  72 + specLockDate: m.specLockDate || '',
  73 + delayReason: m.delayReason || '',
  74 + orderDate: m.orderDate || ''
  75 + }
  76 + })
  77 + },
  78 + handleButtonClick(btn) {
  79 + if (btn && btn.text === '编辑') {
  80 + return uni.navigateTo({ url: `/pages/contract_unlocked_operation/modify?id=${this.id}` })
  81 + }
  82 + // if (btn && btn.text === '删除') {
  83 + // uni.showToast({ title: '暂未接入删除接口', icon: 'none' })
  84 + // }
  85 + }
  86 + }
  87 +}
  88 +</script>
  89 +
  90 +<style lang="scss" scoped>
  91 +.page {
  92 + display: flex;
  93 + flex-direction: column;
  94 + height: 100%;
  95 +}
  96 +
  97 +.scroll {
  98 + flex: 1;
  99 + padding: 8rpx 0 144rpx 0;
  100 +}
  101 +
  102 +.detail-page {
  103 + background: #f3f3f3;
  104 +}
  105 +
  106 +.section {
  107 + padding: 32rpx;
  108 + background: #fff;
  109 + margin-bottom: 20rpx;
  110 +}
  111 +
  112 +.row {
  113 + display: flex;
  114 + margin-bottom: 28rpx;
  115 +
  116 + &.customer {
  117 + font-size: 36rpx;
  118 + font-weight: 600;
  119 + color: rgba(0, 0, 0, 0.9);
  120 + margin-bottom: 12rpx;
  121 + }
  122 +
  123 + .label {
  124 + width: 120rpx;
  125 + line-height: 32rpx;
  126 + font-size: 28rpx;
  127 + color: rgba(0, 0, 0, 0.6);
  128 + }
  129 +
  130 + .value {
  131 + flex: 1;
  132 + line-height: 32rpx;
  133 + font-size: 28rpx;
  134 + color: rgba(0, 0, 0, 0.9);
  135 + text-align: right;
  136 + }
  137 +}
  138 +</style>
\ No newline at end of file
... ...
  1 +<template>
  2 + <view class="page">
  3 + <view class="framework-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" @input="onSearchInput" />
  7 + <view class="tool-icons">
  8 + <!-- <image class="tool-icon" src="/static/images/dev_manage/add_icon.png" @click="onAdd" /> -->
  9 + <!-- <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> -->
  10 + </view>
  11 + </view>
  12 +
  13 + </view>
  14 + <!-- 列表卡片组件 -->
  15 + <view :class="['list-box', { 'pad-batch': batchMode }]">
  16 + <card-list ref="cardRef" :fetch-fn="fetchList" :query="query" :extra="extraParams" :selectable="batchMode"
  17 + row-key="id" :enable-refresh="true" :enable-load-more="true" @error="onCardError">
  18 + <template v-slot="{ item, selected }">
  19 + <view class="card" @click="goDetail(item)">
  20 + <view class="card-header">
  21 + <text class="title omit2">{{ item.contractCode }}</text>
  22 + <text :class="['status']" :style="{ background: statusMap[item.approvalStatusName] }">{{ item.approvalStatusName }}</text>
  23 +
  24 + </view>
  25 + <view class="info-row">
  26 + <text>客户名称</text><text>{{ item.customerName }}</text>
  27 + </view>
  28 + <view class="info-row">
  29 + <text>办事处</text><text>{{ item.deptName }}</text>
  30 + </view>
  31 + <view class="info-row">
  32 + <text>现申请锁规格日期</text><text>{{ item.specLockDate }}</text>
  33 + </view>
  34 + <view class="info-row">
  35 + <text>制单日期</text><text>{{ item.orderDate }}</text>
  36 + </view>
  37 + </view>
  38 + </template>
  39 + </card-list>
  40 + </view>
  41 + <!-- 筛选弹框 -->
  42 + <!-- <filter-modal :visible.sync="filterVisible" :value.sync="filterForm" title="筛选" @reset="onFilterReset"
  43 + @confirm="onFilterConfirm">
  44 + <template v-slot="{ model }">
  45 + <view class="filter-form">
  46 + <view class="form-item">
  47 + <view class="label">品种</view>
  48 + <uni-data-checkbox mode="tag" :multiple="false" :value-field="'value'" :text-field="'text'"
  49 + v-model="model.materialTypeId" @change="onMaterialTypeChange" :localdata="materialTypeOptions" />
  50 + </view>
  51 + <view class="form-item">
  52 + <view class="label">授权截止时间</view>
  53 + <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" />
  54 + </view>
  55 + </view>
  56 + </template>
  57 + </filter-modal> -->
  58 + </view>
  59 +</template>
  60 +
  61 +<script>
  62 +import CardList from '@/components/card/index.vue'
  63 +import FilterModal from '@/components/filter/index.vue'
  64 +import { getDicByCodes, getDicName } from '@/utils/dic';
  65 +import { querySpecLockApi,statusMap } from '@/api/contract.js'
  66 +
  67 +import { productVarietyQueryApi } from '@/api/devManage.js'
  68 +export default {
  69 + components: { CardList, FilterModal },
  70 + data() {
  71 + return {
  72 + searchKeyword: '',
  73 + searchKeywordDebounced: '',
  74 + // 批量选择
  75 + batchMode: false,
  76 + // 给到 card 的筛选值
  77 + query: { materialTypeId: '', dateRange: [] },
  78 + extraParams: {},
  79 +
  80 + // 筛选弹框
  81 + filterVisible: false,
  82 + filterForm: { materialTypeId: '', dateRange: [] },
  83 + materialTypeOptions: [],
  84 + statusMap
  85 + }
  86 +
  87 + },
  88 + computed: {
  89 +
  90 + },
  91 + watch: {
  92 +
  93 + },
  94 + created() {
  95 + this.getProductVariety();
  96 + },
  97 + // 页面触底兜底:当页面自身滚动到底部时,转调卡片组件加载更多
  98 + onReachBottom() {
  99 + if (this.$refs && this.$refs.cardRef && this.$refs.cardRef.onLoadMore) {
  100 + this.$refs.cardRef.onLoadMore()
  101 + }
  102 + },
  103 + beforeDestroy() {
  104 + if (this.searchDebounceTimer) {
  105 + clearTimeout(this.searchDebounceTimer)
  106 + this.searchDebounceTimer = null
  107 + }
  108 + },
  109 + methods: {
  110 + // uni-search-bar 确认搜索:更新关键字并触发 CardList 刷新
  111 + search(e) {
  112 + const val = e && e.value != null ? e.value : this.searchKeyword
  113 + this.searchKeyword = val
  114 + this.searchKeywordDebounced = val
  115 + },
  116 + // 输入实时搜索:1200ms 防抖,仅在停止输入超过阈值后刷新
  117 + onSearchInput(val) {
  118 + if (this.searchDebounceTimer) clearTimeout(this.searchDebounceTimer)
  119 + this.searchDebounceTimer = setTimeout(() => {
  120 + this.searchKeywordDebounced = this.searchKeyword
  121 + this.searchDebounceTimer = null
  122 + }, 1200)
  123 + },
  124 + // 列表接口(真实请求)
  125 + fetchList({ pageIndex, pageSize, query, extra }) {
  126 + const params = { pageIndex, pageSize, ...extra, ...query }
  127 + // 处理日期范围
  128 + if (Array.isArray(params.dateRange) && params.dateRange.length === 2) {
  129 + params.validityTimeStart = params.dateRange[0] + ' 00:00:00'
  130 + params.validityTimeEnd = params.dateRange[1] + ' 23:59:59'
  131 + delete params.dateRange
  132 + }
  133 + // 关键字(使用去抖后的值避免频繁触发)
  134 + if (this.searchKeywordDebounced) {
  135 + params.customerName = this.searchKeywordDebounced
  136 + }
  137 + return querySpecLockApi({...params,available:true})
  138 + .then(res => {
  139 + console.log('fetchList', res)
  140 + const _data = res.data || {};
  141 + const records = _data.datas || [];
  142 + const totalCount = _data.totalCount || 0;
  143 + const hasNext = _data.hasNext || false
  144 + return { records, totalCount, hasNext }
  145 + })
  146 + .catch(err => {
  147 + console.error('fetchList error', err)
  148 + this.onCardError()
  149 + return { records: [], totalCount: 0, hasNext: false }
  150 + })
  151 + },
  152 + onCardError() {
  153 + uni.showToast({ title: '列表加载失败', icon: 'none' })
  154 + },
  155 +
  156 + openFilter() {
  157 + this.filterVisible = true
  158 + },
  159 + onFilterReset(payload) {
  160 + // 保持弹框不关闭,仅同步表单
  161 + this.filterForm = payload
  162 + },
  163 + onFilterConfirm(payload) {
  164 + // 合并筛选值
  165 + this.query = { ...this.query, ...payload }
  166 + },
  167 + onMaterialTypeChange(e) {
  168 + const raw = e && e.detail && e.detail.value !== undefined
  169 + ? e.detail.value
  170 + : (e && e.value !== undefined ? e.value : '')
  171 + // 直接同步到外层 filterForm,驱动 FilterModal 的 innerModel 更新
  172 + this.filterForm.materialTypeId = raw
  173 + },
  174 +
  175 + // onAdd() {
  176 + // uni.navigateTo({ url: '/pages/contract_unlocked_operation/add' })
  177 + // },
  178 +
  179 + goDetail(item) {
  180 + const id = item && item.id ? item.id : ''
  181 + if (!id) return
  182 + uni.navigateTo({ url: `/pages/contract_unlocked_operation/detail?id=${id}` })
  183 + },
  184 +
  185 +
  186 +
  187 + getProductVariety() {
  188 + productVarietyQueryApi({
  189 + pageIndex: 1,
  190 + pageSize: 9999,
  191 + available: true
  192 + }).then(res => {
  193 + const _data = res.data || {};
  194 + const records = _data.datas || [];
  195 + this.materialTypeOptions = records.map(item => ({
  196 + value: item.id,
  197 + text: item.name
  198 + }))
  199 + })
  200 + },
  201 + }
  202 +}
  203 +</script>
  204 +
  205 +<style lang="scss" scoped>
  206 +.page {
  207 + display: flex;
  208 + flex-direction: column;
  209 + height: 100vh;
  210 +}
  211 +
  212 +.framework-list-fixed {
  213 + position: fixed;
  214 + top: 96rpx;
  215 + left: 0;
  216 + right: 0;
  217 + z-index: 2;
  218 + background: #fff;
  219 +
  220 + .search-row {
  221 + display: flex;
  222 + align-items: center;
  223 + padding: 16rpx 32rpx;
  224 +
  225 + .uni-searchbar {
  226 + padding: 0;
  227 + flex: 1;
  228 + }
  229 +
  230 + .tool-icons {
  231 + display: flex;
  232 +
  233 + .tool-icon {
  234 + width: 48rpx;
  235 + height: 48rpx;
  236 + display: block;
  237 + margin-left: 32rpx;
  238 + }
  239 + }
  240 + }
  241 +
  242 +
  243 +}
  244 +
  245 +/* 仅当前页覆盖 uni-search-bar 盒子高度 */
  246 +::v-deep .uni-searchbar__box {
  247 + height: 80rpx !important;
  248 + justify-content: start;
  249 +
  250 + .uni-searchbar__box-search-input {
  251 + font-size: 32rpx !important;
  252 + }
  253 +}
  254 +
  255 +.list-box {
  256 + flex: 1;
  257 + padding-top: 140rpx;
  258 +
  259 + &.pad-batch {
  260 + padding-bottom: 144rpx;
  261 + }
  262 +
  263 + .card {
  264 + position: relative;
  265 + }
  266 +
  267 + .card-header {
  268 + margin-bottom: 28rpx;
  269 + position: relative;
  270 +
  271 + .title {
  272 + font-size: 36rpx;
  273 + font-weight: 600;
  274 + line-height: 50rpx;
  275 + color: rgba(0, 0, 0, 0.9);
  276 + width: 578rpx;
  277 + }
  278 +
  279 + .status {
  280 + font-size: 30rpx;
  281 + font-weight: 600;
  282 + position: absolute;
  283 + top: -36rpx;
  284 + right: -32rpx;
  285 + height: 48rpx;
  286 + line-height: 48rpx;
  287 + color: #fff;
  288 + font-size: 24rpx;
  289 + padding: 0 14rpx;
  290 + border-radius: 6rpx;
  291 +
  292 + &.status_1 {
  293 + background: #3D48A3;
  294 + }
  295 +
  296 + &.status_2 {
  297 + background: #2BA471;
  298 + }
  299 +
  300 + &.status_3 {
  301 + background: #D54941;
  302 + }
  303 +
  304 + &.status_4 {
  305 + background: #E7E7E7;
  306 + color: rgba(0, 0, 0, 0.9);
  307 + }
  308 + }
  309 + }
  310 +
  311 + .info-row {
  312 + display: flex;
  313 + align-items: center;
  314 + color: rgba(0, 0, 0, 0.6);
  315 + font-size: 28rpx;
  316 + margin-bottom: 24rpx;
  317 + height: 32rpx;
  318 +
  319 + &:last-child {
  320 + margin-bottom: 0;
  321 + }
  322 +
  323 + text {
  324 + width: 60%;
  325 +
  326 + &:last-child {
  327 + color: rgba(0, 0, 0, 0.9);
  328 + width: 40%;
  329 + }
  330 + }
  331 + }
  332 +}
  333 +
  334 +.filter-form {
  335 + .form-item {
  336 + margin-bottom: 24rpx;
  337 + }
  338 +
  339 + .label {
  340 + margin-bottom: 20rpx;
  341 + color: rgba(0, 0, 0, 0.9);
  342 + height: 44rpx;
  343 + line-height: 44rpx;
  344 + font-size: 30rpx;
  345 + }
  346 +
  347 + .fake-select {
  348 + height: 80rpx;
  349 + line-height: 80rpx;
  350 + padding: 0 20rpx;
  351 + background: #f3f3f3;
  352 + border-radius: 12rpx;
  353 +
  354 + .placeholder {
  355 + color: #999;
  356 + }
  357 +
  358 + .value {
  359 + color: #333;
  360 + }
  361 + }
  362 +}
  363 +/* 深度覆盖 uni-data-checkbox(mode=tag)内部的 tag 展示与间距 */
  364 +::v-deep .filter-form .uni-data-checklist .checklist-group {
  365 + .checklist-box {
  366 + &.is--tag {
  367 + width: 212rpx;
  368 + margin-top: 0;
  369 + margin-bottom: 24rpx;
  370 + margin-right: 24rpx;
  371 + height: 80rpx;
  372 + padding: 0;
  373 + border-radius: 12rpx;
  374 + background-color: #f3f3f3;
  375 + border-color: #f3f3f3;
  376 +
  377 + &:nth-child(3n) {
  378 + margin-right: 0;
  379 + }
  380 +
  381 + .checklist-content {
  382 + display: flex;
  383 + justify-content: center;
  384 + }
  385 +
  386 + .checklist-text {
  387 + color: rgba(0, 0, 0, 0.9);
  388 + font-size: 28rpx;
  389 + }
  390 + }
  391 +
  392 + &.is-checked {
  393 + background-color: $theme-primary-plain-bg !important;
  394 + border-color: $theme-primary-plain-bg !important;
  395 +
  396 + .checklist-text {
  397 + color: $theme-primary !important;
  398 + }
  399 + }
  400 + }
  401 +
  402 +}
  403 +</style>
\ No newline at end of file
... ...
  1 +<template>
  2 + <view class="page">
  3 + <scroll-view class="scroll" scroll-y>
  4 + <view class="detail-page">
  5 + <view class="section">
  6 + <uni-list>
  7 + <uni-list-item title="客户名称">
  8 + <template v-slot:footer>
  9 + <uni-easyinput v-model="detail.customerName" :clearable="false" disabled />
  10 + </template>
  11 + </uni-list-item>
  12 + <uni-list-item title="订单编号">
  13 + <template v-slot:footer>
  14 + <uni-easyinput v-model="detail.contractCode" :clearable="false" disabled />
  15 + </template>
  16 + </uni-list-item>
  17 + <uni-list-item title="办事处">
  18 + <template v-slot:footer>
  19 + <uni-easyinput v-model="detail.deptName" :clearable="false" disabled />
  20 + </template>
  21 + </uni-list-item>
  22 + <uni-list-item title="所属分厂">
  23 + <template v-slot:footer>
  24 + <uni-easyinput v-model="detail.workshopName" :clearable="false" disabled />
  25 + </template>
  26 + </uni-list-item>
  27 + <uni-list-item title="订单类型">
  28 + <template v-slot:footer>
  29 + <uni-easyinput v-model="detail.contractType" :clearable="false" disabled />
  30 + </template>
  31 + </uni-list-item>
  32 + <uni-list-item title="原订货日期">
  33 + <template v-slot:footer>
  34 + <uni-easyinput v-model="detail.orderDate" :clearable="false" disabled />
  35 + </template>
  36 + </uni-list-item>
  37 + <uni-list-item title="第几次申请">
  38 + <template v-slot:footer>
  39 + <uni-easyinput v-model="detail.applicationCount" :clearable="false" disabled />
  40 + </template>
  41 + </uni-list-item>
  42 + <uni-list-item title="制单日期">
  43 + <template v-slot:footer>
  44 + <uni-easyinput v-model="detail.contractDocumentDate" :clearable="false" disabled />
  45 + </template>
  46 + </uni-list-item>
  47 + <uni-list-item title="数量">
  48 + <template v-slot:footer>
  49 + <uni-easyinput v-model="detail.totalQuantity" :clearable="false" disabled />
  50 + </template>
  51 + </uni-list-item>
  52 + </uni-list>
  53 + </view>
  54 +
  55 + <view class="section1">
  56 + <uni-list>
  57 + <uni-list-item title="现申请锁规格日期">
  58 + <template v-slot:footer>
  59 + <uni-datetime-picker type="date" v-model="form.specLockDate" />
  60 + </template>
  61 + </uni-list-item>
  62 + <uni-list-item title="延迟原因">
  63 + <template v-slot:footer>
  64 + <uni-easyinput v-model="form.delayReason" placeholder="请输入原因" :inputBorder="false" />
  65 + </template>
  66 + </uni-list-item>
  67 + </uni-list>
  68 + </view>
  69 + </view>
  70 + </scroll-view>
  71 + <view class="footer">
  72 + <button class="btn submit" type="primary" @click="onSubmit">提交</button>
  73 + </view>
  74 + </view>
  75 +</template>
  76 +
  77 +<script>
  78 +import { getSpecDetailApi, specLockDelayApplication } from '@/api/contract'
  79 +export default {
  80 + name: 'LockApplyForeignUnplan',
  81 + data() {
  82 + return {
  83 + id: '',
  84 + detail: {
  85 + contractCode: '',
  86 + customerName: '',
  87 + deptName: '',
  88 + workshopName: '',
  89 + orderType: '',
  90 + orderTypeName: '',
  91 + orderDate: '',
  92 + applicationCount: '',
  93 + contractDocumentDate: '',
  94 + totalQuantity: ''
  95 + },
  96 + form: { specLockDate: '', delayReason: '' }
  97 + }
  98 + },
  99 + onLoad(options) {
  100 + const id = options && options.id ? options.id : ''
  101 + this.id = id
  102 + this.loadDetail()
  103 + },
  104 + methods: {
  105 + async loadDetail() {
  106 + if (!this.id) return
  107 + try {
  108 + const res = await getSpecDetailApi(this.id)
  109 + const data = res && res.data ? res.data : {}
  110 + this.detail = {
  111 + ...data,
  112 + contractCode: data.contractCode || '',
  113 + customerName: data.customerName || '',
  114 + deptName: data.deptName || '',
  115 + workshopName: data.workshopName || '',
  116 + orderType: data.orderType || '',
  117 + contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单',
  118 + orderDate: (data.orderDate || '').slice(0, 10),
  119 + applicationCount: data.applicationCount || '',
  120 + contractDocumentDate: (data.contractDocumentDate || '').slice(0, 10),
  121 + totalQuantity: data.totalQuantity || ''
  122 + }
  123 + } catch (e) {
  124 + this.detail = { ...this.detail }
  125 + }
  126 + },
  127 +
  128 + onSubmit() {
  129 + const date = this.form.specLockDate
  130 + const reason = this.form.delayReason
  131 + const emptyDate = !date
  132 + if (emptyDate) {
  133 + uni.showToast({ title: '请填写日期', icon: 'none' })
  134 + return
  135 + }
  136 + uni.showModal({
  137 + title: '确认提交',
  138 + content: '确定提交锁规无规格申请吗?',
  139 + success: (res) => {
  140 + if (res.confirm) {
  141 + specLockDelayApplication({
  142 + ...this.detail,
  143 + specLockDate: date,
  144 + delayReason: reason
  145 + }).then(res => {
  146 + if (res.code === 200) {
  147 + uni.showToast({ title: '提交成功', icon: 'success' })
  148 + setTimeout(() => {
  149 + uni.navigateTo({ url: '/pages/contract_unlocked_operation/index' })
  150 + }, 1000)
  151 + } else {
  152 + uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
  153 + }
  154 + })
  155 + }
  156 + }
  157 + })
  158 + }
  159 + }
  160 +}
  161 +</script>
  162 +
  163 +<style lang="scss" scoped>
  164 +.page {
  165 + display: flex;
  166 + flex-direction: column;
  167 + height: 100%;
  168 +}
  169 +
  170 +.scroll {
  171 + flex: 1;
  172 + padding: 8rpx 0 144rpx;
  173 +}
  174 +
  175 +.detail-page {
  176 + background: #f3f3f3;
  177 +}
  178 +
  179 +.section {
  180 + background: #fff;
  181 + margin-bottom: 20rpx;
  182 +}
  183 +.section1 {
  184 + background: #fff;
  185 + margin-bottom: 20rpx;
  186 +}
  187 +
  188 +.row {
  189 + display: flex;
  190 + margin-bottom: 20rpx;
  191 + align-items: center;
  192 +}
  193 +
  194 +.row:last-child {
  195 + margin-bottom: 0;
  196 +}
  197 +
  198 +.label {
  199 + width: 280rpx;
  200 + color: rgba(0, 0, 0, 0.6);
  201 + font-size: 28rpx;
  202 +}
  203 +
  204 +.value {
  205 + flex: 1;
  206 + text-align: right;
  207 + color: rgba(0, 0, 0, 0.9);
  208 + font-size: 28rpx;
  209 +}
  210 +
  211 +.customer {
  212 + font-weight: 600;
  213 + font-size: 36rpx;
  214 + color: rgba(0, 0, 0, 0.9);
  215 + padding-bottom: 12rpx;
  216 +}
  217 +
  218 +.footer {
  219 + position: fixed;
  220 + left: 0; right: 0; bottom: 0;
  221 + padding: 24rpx 32rpx 48rpx;
  222 + background: #fff;
  223 + box-shadow: 0 -8rpx 24rpx rgba(0,0,0,0.06);
  224 +}
  225 +.footer .btn { height: 80rpx; line-height: 80rpx; border-radius: 12rpx; font-size: 32rpx; }
  226 +.footer .submit { background: $theme-primary; color: #fff; }
  227 +
  228 +::v-deep .uni-list {
  229 + .uni-easyinput {
  230 + display: flex;
  231 +
  232 + .uni-input-input {
  233 + color: rgba(0, 0, 0, 0.9);
  234 + }
  235 + }
  236 +
  237 + .uni-input-placeholder {
  238 + z-index: 1;
  239 + }
  240 +
  241 + .uni-input-input {
  242 + background-color: #ffffff;
  243 + }
  244 +
  245 + background: transparent;
  246 +
  247 + &-item {
  248 + &__extra-text {
  249 + font-size: 32rpx;
  250 + }
  251 +
  252 + &__content-title {
  253 + font-size: 32rpx;
  254 + color: rgba(0, 0, 0, 0.9);
  255 + }
  256 +
  257 + &__container {
  258 + padding: 32rpx;
  259 +
  260 + .uni-easyinput {
  261 + &__placeholder-class {
  262 + font-size: 32rpx;
  263 + color: rgba(0, 0, 0, 0.4);
  264 + }
  265 +
  266 + &__content {
  267 + border: none;
  268 + background-color: #ffffff !important;
  269 +
  270 + &-input {
  271 + padding-left: 0 !important;
  272 + height: 48rpx;
  273 + line-height: 48rpx;
  274 + font-size: 32rpx;
  275 + }
  276 +
  277 + .content-clear-icon {
  278 + font-size: 44rpx !important;
  279 + }
  280 + }
  281 + }
  282 +
  283 + .item-title,
  284 + .uni-list-item__content {
  285 + flex: none;
  286 + min-height: 48rpx;
  287 + line-height: 48rpx;
  288 + font-size: 32rpx;
  289 + position: relative;
  290 + width: 162rpx;
  291 + margin-right: 32rpx;
  292 + color: rgba(0, 0, 0, 0.9);
  293 +
  294 + .required {
  295 + color: red;
  296 + position: absolute;
  297 + top: 50%;
  298 + transform: translateY(-50%);
  299 + left: -16rpx;
  300 + }
  301 + }
  302 + }
  303 +
  304 + &.select-item {
  305 + &.is-empty {
  306 + .uni-list-item__extra-text {
  307 + color: rgba(0, 0, 0, 0.4) !important;
  308 + }
  309 + }
  310 +
  311 + &.is-filled {
  312 + .uni-list-item__extra-text {
  313 + color: rgba(0, 0, 0, 0.9) !important;
  314 + }
  315 + }
  316 + }
  317 +
  318 + &.mgb10 {
  319 + margin-bottom: 20rpx;
  320 + }
  321 + }
  322 +}
  323 +
  324 +// ::v-deep .uni-list-item__container {
  325 +// padding: 32rpx;
  326 +// }
  327 +
  328 +::v-deep .is-disabled {
  329 + background-color: transparent !important;
  330 +}
  331 +// ::v-deep .uni-list-item__content-title {
  332 +// font-size: 28rpx;
  333 +// color: rgba(0, 0, 0, 0.9);
  334 +// }
  335 +
  336 +// ::v-deep .uni-list-item__extra-text {
  337 +// font-size: 32rpx;
  338 +// }
  339 +
  340 +::v-deep .uni-easyinput {
  341 + width: 100%;
  342 +}
  343 +
  344 +::v-deep .uni-easyinput__placeholder-class {
  345 + font-size: 32rpx;
  346 + color: rgba(0, 0, 0, 0.4);
  347 +}
  348 +
  349 +::v-deep .uni-easyinput__content {
  350 + border: none;
  351 + display: flex;
  352 +}
  353 +
  354 +::v-deep .uni-easyinput__content-input {
  355 + padding-left: 0 !important;
  356 + height: 48rpx;
  357 + line-height: 48rpx;
  358 + font-size: 32rpx;
  359 + color: rgba(0, 0, 0, 0.9);
  360 +}
  361 +</style>
\ No newline at end of file
... ...
... ... @@ -137,7 +137,7 @@ export default {
137 137 {
138 138 text: '锁价无规格操作申请单',
139 139 icon: '/static/images/index/contract_foreign_unplan.png',
140   - link: '/pages/contract_foreign_unplan/index',
  140 + link: '/pages/contract_unlocked_operation/index',
141 141 name: 'UnlockedOperationApplication'
142 142 },
143 143 ],
... ...