Commit 7aad9fe52b86366d7a27b2f559cf82cf6da64c10

Authored by gesilong
1 parent 9979df20

commit: 审核+审核详情的联调

  1 +<template>
  2 + <view class="page">
  3 + <view class="detail-page">
  4 + <view class="section">
  5 + <text class="row customer">{{ detail.code }}</text>
  6 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核状态</text><text
  7 + class="value">{{ detail.standardApprovedName || '-' }}</text></view>
  8 + <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
  9 + '-'}}</text></view>
  10 + <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' }}</text>
  11 + </view>
  12 + <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
  13 + </view>
  14 + <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
  15 + <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName ||
  16 + '-'}}</text></view>
  17 + </view>
  18 +
  19 + <view class="section1">
  20 + <ProductRel mode="view" :list="productList" />
  21 + </view>
  22 +
  23 + <view class="section">
  24 + <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{ detail.totalAmountCapital
  25 + || '-' }}</text></view>
  26 + <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo || '-'
  27 + }}</text></view>
  28 + <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements ||
  29 + '-' }}</text></view>
  30 + <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms || '-'
  31 + }}</text></view>
  32 + <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode ||
  33 + '-'}}</text></view>
  34 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  35 + }}</text></view>
  36 + <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
  37 + detail.includesPackagingFeeName || '-' }}</text></view>
  38 + <view class="row"><text class="label">单价中是否已包含运费</text><text class="value">{{
  39 + detail.includesTransportFeeName || '-' }}</text></view>
  40 + <view class="row"><text class="label">需方指定收货人</text><text class="value">{{
  41 + detail.designatedConsignee || '-' }}</text></view>
  42 +
  43 + <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
  44 + '-' }}</text></view>
  45 + <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
  46 + || '-' }}</text></view>
  47 + <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
  48 + class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
  49 + <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
  50 + || '-' }}</text></view>
  51 + <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
  52 + }}</text></view>
  53 + </view>
  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 ?
  59 + '是' : '否' }}</text></view>
  60 + </view>
  61 +
  62 + <view class="section" style="margin-bottom: 150rpx;">
  63 + <text class="row customer">具体质量要求</text>
  64 + <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
  65 + '-' }}</text></view>
  66 + <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
  67 + }}</text></view>
  68 + <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
  69 + }}</text></view>
  70 + <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
  71 + }}</text></view>
  72 + <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
  73 + }}</text></view>
  74 + <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
  75 + }}</text></view>
  76 + </view>
  77 + </view>
  78 + </view>
  79 +</template>
  80 +<script>
  81 +import { getContractApi } from '@/api/contract'
  82 +import ProductRel from './productRel.vue'
  83 +
  84 +export default {
  85 + name: 'FormalContractViewer',
  86 + components: { ProductRel },
  87 + props: { id: { type: [String, Number], default: '' } },
  88 + data() {
  89 + return {
  90 + id: '',
  91 + detail: {
  92 + code: '',
  93 + supplier: '',
  94 + supplierName: '',
  95 + buyer: '',
  96 + buyerName: '',
  97 + orderDate: '',
  98 + unit: '',
  99 + workshopId: '',
  100 + workshopName: '',
  101 + designatedConsignee: '',
  102 + specialTerms: '',
  103 + specialTermsName: '',
  104 + executionStandard: '',
  105 + executionStandardName: '',
  106 + executionStandardRemarks: '',
  107 + includesPackagingFee: false,
  108 + includesPackagingFeeName: '',
  109 + includesTransportFee: false,
  110 + includesTransportFeeName: '',
  111 + totalAmountCapital: '',
  112 + depositInfo: '',
  113 + packagingRequirements: '',
  114 + paymentTerms: '',
  115 + transportMode: '',
  116 + destinationId: '',
  117 + destinationLabel: '',
  118 + specialInstructions: '',
  119 + remarks: '',
  120 + pieceWeightHead: '',
  121 + surface: '',
  122 + tolerance: '',
  123 + performance: '',
  124 + component: '',
  125 + packaging: ''
  126 + },
  127 + productList: [],
  128 + fileInfo: { id: '', name: '' },
  129 + yesNoList: [{ label: '是', value: true }, { label: '否', value: false }],
  130 + standardStandardized: '',
  131 + standardStandardizedName: '',
  132 + sheet: { visible: false, title: '请选择', options: [], value: '' },
  133 + }
  134 + },
  135 + watch: {
  136 + id: {
  137 + immediate: true,
  138 + handler(val) {
  139 + const v = (val !== undefined && val !== null) ? String(val) : ''
  140 + if (v) this.loadDetail(v)
  141 + }
  142 + }
  143 + },
  144 + methods: {
  145 + loadDetail(id) {
  146 + const rid = (id !== undefined && id !== null) ? String(id) : ''
  147 + if (!rid) return
  148 + getContractApi(rid).then(res => {
  149 + const data = res && res.data ? res.data : {}
  150 + const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
  151 + const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
  152 + this.detail = {
  153 + ...this.detail,
  154 + ...data,
  155 + includesPackagingFeeName, includesTransportFeeName,
  156 + destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
  157 + destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
  158 + }
  159 + const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
  160 + this.productList = lines
  161 + }).catch(() => { })
  162 + },
  163 + getFormValues() {
  164 + const m = this.detail || {}
  165 + return JSON.parse(JSON.stringify(m))
  166 + }
  167 + }
  168 +}
  169 +</script>
  170 +<style lang="scss" scoped>
  171 +.page {
  172 + display: flex;
  173 + flex-direction: column;
  174 + height: 100%;
  175 +}
  176 +
  177 +.scroll {
  178 + flex: 1;
  179 + padding: 8rpx 0 144rpx;
  180 +}
  181 +
  182 +.detail-page {
  183 + background: #f3f3f3;
  184 +}
  185 +
  186 +.section {
  187 + padding: 32rpx;
  188 + background: #fff;
  189 + margin-bottom: 20rpx;
  190 +}
  191 +
  192 +.section1 {
  193 + background: #fff;
  194 + margin-bottom: 20rpx;
  195 +}
  196 +
  197 +.row {
  198 + display: flex;
  199 + margin-bottom: 20rpx;
  200 + align-items: center;
  201 +}
  202 +
  203 +.row:last-child {
  204 + margin-bottom: 0;
  205 +}
  206 +
  207 +.label {
  208 + width: 280rpx;
  209 + color: rgba(0, 0, 0, 0.6);
  210 + font-size: 28rpx;
  211 +}
  212 +
  213 +.row1 {
  214 + display: flex;
  215 + justify-content: space-between;
  216 + align-items: center;
  217 + color: rgba(0, 0, 0, 0.9);
  218 + margin: 32rpx 0;
  219 +}
  220 +
  221 +.label1 {
  222 + width: 280rpx;
  223 + color: rgba(0, 0, 0, 0.6);
  224 + font-size: 32rpx;
  225 +}
  226 +
  227 +.value {
  228 + flex: 1;
  229 + text-align: right;
  230 + color: rgba(0, 0, 0, 0.9);
  231 + font-size: 28rpx;
  232 +}
  233 +
  234 +.customer {
  235 + font-weight: 600;
  236 + font-size: 36rpx;
  237 + color: rgba(0, 0, 0, 0.9);
  238 + padding-bottom: 12rpx;
  239 +}
  240 +
  241 +.upload-dialog {
  242 + background: #fff;
  243 + border-top-left-radius: 16rpx;
  244 + border-top-right-radius: 16rpx;
  245 +}
  246 +
  247 +.upload-header {
  248 + display: flex;
  249 + position: relative;
  250 + align-items: center;
  251 + justify-content: center;
  252 + padding: 32rpx 32rpx;
  253 +}
  254 +
  255 +.upload-header .title {
  256 + font-size: 36rpx;
  257 + color: rgba(0, 0, 0, 0.9);
  258 + font-weight: 600;
  259 +}
  260 +
  261 +.upload-body {
  262 + padding: 16rpx 32rpx;
  263 + border-bottom: 1rpx solid #E7E7E7;
  264 +}
  265 +
  266 +.upload-body .section-title {
  267 + font-size: 32rpx;
  268 + color: rgba(0, 0, 0, 0.9);
  269 + font-weight: 600;
  270 + line-height: 48rpx;
  271 +}
  272 +
  273 +.upload-footer {
  274 + padding: 24rpx 32rpx 48rpx;
  275 +}
  276 +
  277 +.upload-footer .submit {
  278 + background: $theme-primary;
  279 + color: #fff;
  280 +}
  281 +</style>
... ...
  1 +<template>
  2 + <view class="product-rel">
  3 + <view class="header">
  4 + <image class="opCollapse" src="/static/images/title.png" />
  5 + <text class="title">产品</text>
  6 + <view class="ops">
  7 + <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" />
  8 + <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse">
  9 + <image class="opAdd" :src="collapsedView ? '/static/images/down.png' : '/static/images/up.png'" />
  10 + <text class="op">{{ collapsedView ? '展开' : '收起'}} </text>
  11 + </view>
  12 +
  13 + </view>
  14 + </view>
  15 +
  16 + <view v-if="mode === 'add'" class="add-list">
  17 + <view v-for="(item, idx) in items" :key="idx" class="block">
  18 + <uni-list v-show="item.collapsed">
  19 + <uni-list-item class="select-item" :class="item.productName ? 'is-filled' : 'is-empty'" clickable @click="openProductSheet(idx)" :rightText="item.productName || '请选择产品名称'" showArrow>
  20 + <template v-slot:body>
  21 + <view class="item-title"><text>产品名称</text></view>
  22 + </template>
  23 + </uni-list-item>
  24 + <uni-list-item title="行业">
  25 + <template v-slot:footer>
  26 + <uni-easyinput v-model="item.industry" :inputBorder="false" placeholder="请输入行业名称" />
  27 + </template>
  28 + </uni-list-item>
  29 + <uni-list-item title="牌号">
  30 + <template v-slot:footer>
  31 + <uni-easyinput v-model="item.brand" :inputBorder="false" placeholder="请输入牌号" />
  32 + </template>
  33 + </uni-list-item>
  34 + </uni-list>
  35 + <uni-list v-show="!item.collapsed">
  36 + <uni-list-item class="select-item" :class="item.productName ? 'is-filled' : 'is-empty'" clickable @click="openProductSheet(idx)" :rightText="item.productName || '请选择产品名称'" showArrow>
  37 + <template v-slot:body>
  38 + <view class="item-title"><text>产品名称</text></view>
  39 + </template>
  40 + </uni-list-item>
  41 + <uni-list-item title="行业">
  42 + <template v-slot:footer>
  43 + <uni-easyinput v-model="item.industry" :inputBorder="false" placeholder="请输入行业名称" />
  44 + </template>
  45 + </uni-list-item>
  46 + <uni-list-item title="牌号">
  47 + <template v-slot:footer>
  48 + <uni-easyinput v-model="item.brand" :inputBorder="false" placeholder="请输入牌号" />
  49 + </template>
  50 + </uni-list-item>
  51 + <uni-list-item title="品质">
  52 + <template v-slot:footer>
  53 + <uni-easyinput v-model="item.quality" :inputBorder="false" placeholder="请输入品质" />
  54 + </template>
  55 + </uni-list-item>
  56 + <uni-list-item title="厚度">
  57 + <template v-slot:footer>
  58 + <uni-easyinput v-model="item.thickness" :inputBorder="false" placeholder="请输入厚度" />
  59 + </template>
  60 + </uni-list-item>
  61 + <uni-list-item title="厚度公差(单项+)">
  62 + <template v-slot:footer>
  63 + <uni-easyinput v-model="item.thicknessTolPos" :inputBorder="false"
  64 + placeholder="请输入厚度公差(单项+)" />
  65 + </template>
  66 + </uni-list-item>
  67 + <uni-list-item title="厚度公差(单项-)">
  68 + <template v-slot:footer>
  69 + <uni-easyinput v-model="item.thicknessTolNeg" :inputBorder="false"
  70 + placeholder="请输入厚度公差(单项-)" />
  71 + </template>
  72 + </uni-list-item>
  73 + <uni-list-item title="宽度">
  74 + <template v-slot:footer>
  75 + <uni-easyinput v-model="item.width" :inputBorder="false" placeholder="请输入宽度" />
  76 + </template>
  77 + </uni-list-item>
  78 + <uni-list-item title="宽度公差(单项+)">
  79 + <template v-slot:footer>
  80 + <uni-easyinput v-model="item.widthTolPos" :inputBorder="false" placeholder="请输入宽度公差(单项+)" />
  81 + </template>
  82 + </uni-list-item>
  83 + <uni-list-item title="宽度公差(单项-)">
  84 + <template v-slot:footer>
  85 + <uni-easyinput v-model="item.widthTolNeg" :inputBorder="false" placeholder="请输入宽度公差(单项-)" />
  86 + </template>
  87 + </uni-list-item>
  88 + <uni-list-item title="长度">
  89 + <template v-slot:footer>
  90 + <uni-easyinput v-model="item.length" :inputBorder="false" placeholder="请输入长度" />
  91 + </template>
  92 + </uni-list-item>
  93 + <uni-list-item title="长度公差(单项+)">
  94 + <template v-slot:footer>
  95 + <uni-easyinput v-model="item.lengthTolPos" :inputBorder="false"
  96 + placeholder="请输入长度公差(单项+)" />
  97 + </template>
  98 + </uni-list-item>
  99 + <uni-list-item title="长度公差(单项-)">
  100 + <template v-slot:footer>
  101 + <uni-easyinput v-model="item.lengthTolNeg" :inputBorder="false"
  102 + placeholder="请输入长度公差(单项-)" />
  103 + </template>
  104 + </uni-list-item>
  105 + <uni-list-item title="状态">
  106 + <template v-slot:footer>
  107 + <uni-easyinput v-model="item.status" :inputBorder="false" placeholder="请输入状态" />
  108 + </template>
  109 + </uni-list-item>
  110 + <uni-list-item title="数量">
  111 + <template v-slot:footer>
  112 + <uni-easyinput v-model="item.quantity" type="number" :inputBorder="false" placeholder="请输入数量" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'quantity', 0)" />
  113 + </template>
  114 + </uni-list-item>
  115 + <uni-list-item title="单价">
  116 + <template v-slot:footer>
  117 + <uni-easyinput v-model="item.unitPrice" type="number" :inputBorder="false" placeholder="请输入单价" @input="onImmediateChange(idx)" @blur="onNumberBlur(idx, 'unitPrice', 0)" />
  118 + </template>
  119 + </uni-list-item>
  120 + <uni-list-item title="不含税金额">
  121 + <template v-slot:footer>
  122 + <uni-easyinput v-model="item.amountExcludingTax" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  123 + </template>
  124 + </uni-list-item>
  125 + <uni-list-item title="总金额">
  126 + <template v-slot:footer>
  127 + <uni-easyinput v-model="item.totalAmount" type="number" :inputBorder="false" disabled placeholder="自动计算" />
  128 + </template>
  129 + </uni-list-item>
  130 + <uni-list-item title="发货日期">
  131 + <template v-slot:footer>
  132 + <uni-datetime-picker type="date" v-model="item.orderDate" @change="onDateChange(idx, $event)" />
  133 + </template>
  134 + </uni-list-item>
  135 + </uni-list>
  136 + <view class="block-ops">
  137 + <div class="del" @click="onRemove(idx)">
  138 + <image src="/static/images/delete.png" class="icon" />
  139 + 删除
  140 + </div>
  141 + <div class="toggle" @click="toggleItem(idx)">
  142 + <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" class="icon" />
  143 + {{ item.collapsed ? '展开' : '收起' }}</div>
  144 + </view>
  145 + </view>
  146 + </view>
  147 +
  148 + <view v-else class="view-list" v-show="!collapsedView">
  149 + <view v-for="(item, idx) in items" :key="'v-' + idx" class="card">
  150 + <view class="row"><text class="label">产品名称</text><text class="value">{{ item.productName }}</text></view>
  151 + <view class="row"><text class="label">行业</text><text class="value">{{ item.industry }}</text></view>
  152 + <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view>
  153 + <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
  154 + <view class="row"><text class="label">规格</text><text class="value">{{ item.specDisplay }}</text></view>
  155 + <view class="row"><text class="label">状态</text><text class="value">{{ item.status }}</text></view>
  156 + <view class="row"><text class="label">数量</text><text class="value">{{ item.quantity }}</text></view>
  157 + <view class="row"><text class="label">单价</text><text class="value">{{ formatCurrency(item.unitPrice)
  158 + }}</text>
  159 + </view>
  160 + <view class="row"><text class="label">不含税金额</text><text class="value">{{
  161 + formatCurrency(item.amountExcludingTax)
  162 + }}</text></view>
  163 + <view class="row"><text class="label">总金额</text><text class="value">{{ formatCurrency(item.totalAmount)
  164 + }}</text></view>
  165 + <view class="row"><text class="label">发货日期</text><text class="value">{{ item.orderDate }}</text></view>
  166 + </view>
  167 + </view>
  168 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onProductConfirm" />
  169 + </view>
  170 +</template>
  171 +<script>
  172 +import SingleSelectSheet from '@/components/single-select/index.vue'
  173 +export default {
  174 + name: 'ProductRel',
  175 + props: {
  176 + mode: { type: String, default: 'add' },
  177 + list: { type: Array, default: () => [] },
  178 + max: { type: Number, default: 8 },
  179 + orderDateBase: { type: String, default: '' },
  180 + options: { type: Array, default: () => [] }
  181 + },
  182 + components: { SingleSelectSheet },
  183 + data() {
  184 + return {
  185 + items: [],
  186 + collapsedView: false,
  187 + sheet: { visible: false, title: '请选择产品', options: [], value: '', idx: -1 }
  188 + }
  189 + },
  190 + computed: {
  191 + selectOptions() {
  192 + const list = Array.isArray(this.options) ? this.options : []
  193 + return list.map(o => ({
  194 + label: o.label != null ? o.label : (o.text != null ? o.text : (o.name != null ? o.name : '')),
  195 + value: o.value != null ? o.value : (o.id != null ? o.id : o.productId)
  196 + }))
  197 + }
  198 + },
  199 + watch: {
  200 + items: {
  201 + handler() { this.emitChange() },
  202 + deep: true
  203 + },
  204 + list: {
  205 + handler(v) {
  206 + // const arr = Array.isArray(v) ? v : []
  207 + // this.items = arr.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
  208 + this.items = v.map(x => ({ ...this.defaultItem(), ...x, collapsed: true }))
  209 + console.log('v', v)
  210 + },
  211 + deep: true
  212 + }
  213 + },
  214 + created() {
  215 + const init = Array.isArray(this.list) && this.list.length > 0 ? this.list.map(v => ({ ...this.defaultItem(), ...v, collapsed: true })) : [{ ...this.defaultItem(), collapsed: false }]
  216 + this.items = init
  217 + this.recalculateAll()
  218 + },
  219 + methods: {
  220 + defaultItem() {
  221 + return { productId: '', productName: '', industry: '', brand: '', quality: '', thickness: '', thicknessTolPos: '', thicknessTolNeg: '', width: '', widthTolPos: '', widthTolNeg: '', length: '', lengthTolPos: '', lengthTolNeg: '', status: '', quantity: '', unitPrice: '', amountExcludingTax: 0, totalAmount: 0, orderDate: '' }
  222 + },
  223 + onImmediateChange(idx) {
  224 + this.$nextTick(() => this.recalculate(idx))
  225 + },
  226 + toNumber(val) {
  227 + if (typeof val === 'number') return isNaN(val) ? 0 : val
  228 + const n = parseFloat(String(val).replace(/[^0-9.\-]/g, ''))
  229 + return isNaN(n) ? 0 : n
  230 + },
  231 + round(val, digits = 2) {
  232 + const n = Number(val)
  233 + if (isNaN(n)) return 0
  234 + const m = Math.pow(10, digits)
  235 + return Math.round(n * m) / m
  236 + },
  237 + onNumberBlur(idx, field, digits) {
  238 + const it = this.items[idx]
  239 + if (!it) return
  240 + const raw = it[field]
  241 + // 如果为空则保持为空,不自动置为0,仅重新计算依赖字段
  242 + if (raw === '' || raw === null || raw === undefined) {
  243 + this.$set(this.items, idx, it)
  244 + this.recalculate(idx)
  245 + return
  246 + }
  247 + const num = this.toNumber(raw)
  248 + const rounded = this.round(num, digits)
  249 + it[field] = rounded
  250 + this.$set(this.items, idx, it)
  251 + this.recalculate(idx)
  252 + },
  253 + formatCurrency(val) {
  254 + if (val == null || val === '') return ''
  255 + const num = Number(val)
  256 + const pre = isNaN(num) ? '' : '¥'
  257 + const fixed = isNaN(num) ? String(val) : num.toFixed(2)
  258 + return `${pre}${fixed}`
  259 + },
  260 + specOf(item) {
  261 + const t = [item.thickness, item.thicknessTolPos, item.thicknessTolNeg].filter(Boolean).join('/')
  262 + const w = [item.width, item.widthTolPos, item.widthTolNeg].filter(Boolean).join('/')
  263 + const l = [item.length, item.lengthTolPos, item.lengthTolNeg].filter(Boolean).join('/')
  264 + return [t, w, l].filter(Boolean).join(' × ')
  265 + },
  266 + openProductSheet(idx) {
  267 + const opts = this.selectOptions
  268 + const current = this.items[idx] && this.items[idx].productId
  269 + const match = opts.find(o => o.value === current)
  270 + this.sheet = { ...this.sheet, visible: true, title: '请选择产品', options: opts, idx, value: match ? match.value : '' }
  271 + },
  272 + onProductConfirm({ value, label }) {
  273 + const idx = this.sheet.idx
  274 + const it = this.items[idx]
  275 + if (!it) { this.sheet.visible = false; return }
  276 + it.productId = value
  277 + it.productName = label || ''
  278 + this.$set(this.items, idx, it)
  279 + this.sheet.visible = false
  280 + this.emitChange()
  281 + },
  282 + recalculate(idx) {
  283 + const TAX_RATE = 0.13
  284 + const it = this.items[idx]
  285 + if (!it) return
  286 + const qty = this.toNumber(it.quantity)
  287 + const price = this.toNumber(it.unitPrice)
  288 + const total = this.round(qty * price, 2)
  289 + const excl = this.round(total / (1 + TAX_RATE), 2)
  290 + const next = { ...it, totalAmount: total, amountExcludingTax: excl }
  291 + this.$set(this.items, idx, next)
  292 + },
  293 + recalculateAll() {
  294 + for (let i = 0; i < this.items.length; i++) this.recalculate(i)
  295 + },
  296 + onAdd() {
  297 + if (this.items.length >= this.max) return uni.showToast({ title: `最多添加${this.max}个`, icon: 'none' })
  298 + const obj = this.defaultItem()
  299 + obj.collapsed = true
  300 + this.items.push(obj)
  301 + this.emitChange()
  302 + },
  303 + onRemove(idx) {
  304 + this.items.splice(idx, 1)
  305 + this.emitChange()
  306 + },
  307 + toggleItem(idx) {
  308 + const it = this.items[idx]
  309 + if (!it) return
  310 + it.collapsed = !it.collapsed
  311 + this.$set(this.items, idx, it)
  312 + },
  313 + emitChange() {
  314 + const out = this.items.map(it => ({ ...it, specDisplay: this.specOf(it) }))
  315 + this.$emit('input', out)
  316 + this.$emit('update:value', out)
  317 + this.$emit('change', out)
  318 + },
  319 + onDateChange(idx, e) {
  320 + const it = this.items[idx]
  321 + if (!it) return
  322 + const val = typeof e === 'string' ? e : (e && e.detail && e.detail.value) ? e.detail.value : it.orderDate
  323 + const dateStr = String(val).slice(0, 10)
  324 + const base = this.orderDateBase ? new Date(this.orderDateBase) : null
  325 + const d = new Date(dateStr)
  326 + if (base && !isNaN(d.getTime()) && d.getTime() < base.getTime()) {
  327 + uni.showToast({ title: '发货日期不得早于订货日期', icon: 'none' })
  328 + it.orderDate = this.orderDateBase
  329 + } else {
  330 + it.orderDate = dateStr
  331 + }
  332 + this.$set(this.items, idx, it)
  333 + },
  334 + toggleViewCollapse() {
  335 + this.collapsedView = !this.collapsedView
  336 + }
  337 + }
  338 +}
  339 +</script>
  340 +<style lang="scss" scoped>
  341 +.product-rel {
  342 + margin-top: 10px;
  343 +}
  344 +
  345 +.header {
  346 + background-color: #fff;
  347 + display: flex;
  348 + align-items: center;
  349 + padding: 24rpx 32rpx;
  350 + border-bottom: 1rpx solid #f0f0f0;
  351 +}
  352 +
  353 +.dot {
  354 + width: 16rpx;
  355 + height: 16rpx;
  356 + background: #3D48A3;
  357 + border-radius: 50%;
  358 + margin-right: 12rpx;
  359 +}
  360 +
  361 +.title {
  362 + font-size: 32rpx;
  363 + color: rgba(0, 0, 0, 0.9);
  364 + font-weight: 600;
  365 +}
  366 +
  367 +.ops {
  368 + margin-left: auto;
  369 +}
  370 +.op {
  371 + color: $theme-primary;
  372 + font-size: 28rpx;
  373 + margin-left: 8rpx;
  374 +}
  375 +.op1 {
  376 + display: flex;
  377 + align-items: center;
  378 +}
  379 +
  380 +.opAdd {
  381 + color: rgba(0, 0, 0, 0.6);
  382 + width: 40rpx;
  383 + height: 40rpx;
  384 +}
  385 +
  386 +.opCollapse {
  387 + color: rgba(0, 0, 0, 0.6);
  388 + width: 32rpx;
  389 + height: 28rpx;
  390 + margin-right: 16rpx;
  391 + margin-top: 8rpx;
  392 +}
  393 +
  394 +
  395 +.block {
  396 + background: #fff;
  397 + margin-bottom: 20rpx;
  398 +}
  399 +::v-deep .uni-list-item__content {
  400 + display: flex;
  401 + justify-content: center;
  402 +}
  403 +::v-deep .uni-list {
  404 + background: transparent;
  405 +
  406 + &-item {
  407 + &__container {
  408 + padding: 32rpx;
  409 + }
  410 +
  411 + &__content-title {
  412 + font-size: 28rpx;
  413 + color: rgba(0, 0, 0, 0.9);
  414 + }
  415 +
  416 + &__extra-text {
  417 + font-size: 32rpx;
  418 + }
  419 +
  420 + .uni-easyinput {
  421 + width: 100%;
  422 +
  423 + &__placeholder-class {
  424 + font-size: 32rpx;
  425 + color: rgba(0, 0, 0, 0.4);
  426 + }
  427 +
  428 + &__content {
  429 + border: none;
  430 + display: flex;
  431 + &-input {
  432 + padding-left: 0 !important;
  433 + height: 48rpx;
  434 + line-height: 48rpx;
  435 + font-size: 32rpx;
  436 + }
  437 + }
  438 +
  439 + .uni-input-placeholder {
  440 + // z-index: 2;
  441 + }
  442 + }
  443 + }
  444 +}
  445 +
  446 +.block-ops {
  447 + display: flex;
  448 + padding: 20rpx 32rpx 20rpx;
  449 + justify-content: space-around;
  450 +}
  451 +
  452 +.del {
  453 + color: #D54941;
  454 + font-size: 28rpx;
  455 + display: flex;
  456 + align-items: center;
  457 + image {
  458 + width: 40rpx;
  459 + height: 40rpx;
  460 + }
  461 +}
  462 +
  463 +.toggle {
  464 + color: $theme-primary;
  465 + font-size: 28rpx;
  466 + display: flex;
  467 + align-items: center;
  468 + image {
  469 + width: 40rpx;
  470 + height: 40rpx;
  471 + }
  472 +}
  473 +
  474 +.view-list {
  475 + padding: 24rpx 32rpx;
  476 + background: #ffffff;
  477 +}
  478 +
  479 +.card {
  480 + background: #f3f3f3;
  481 + border-radius: 16rpx;
  482 + padding: 24rpx;
  483 + margin-bottom: 20rpx;
  484 +}
  485 +
  486 +.row {
  487 + display: flex;
  488 + margin-bottom: 20rpx;
  489 +}
  490 +
  491 +.row:last-child {
  492 + margin-bottom: 0;
  493 +}
  494 +
  495 +.label {
  496 + width: 120rpx;
  497 + color: rgba(0, 0, 0, 0.6);
  498 + font-size: 28rpx;
  499 +}
  500 +
  501 +.value {
  502 + flex: 1;
  503 + text-align: right;
  504 + color: rgba(0, 0, 0, 0.9);
  505 + font-size: 28rpx;
  506 +}
  507 +</style>
... ...
  1 +<template>
  2 + <view class="page">
  3 + <view class="detail-page">
  4 + <view class="section">
  5 + <text class="row customer">{{ detail.code }}</text>
  6 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核状态</text><text
  7 + class="value">{{ detail.standardApprovedName || '-' }}</text></view>
  8 + <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
  9 + '-'}}</text></view>
  10 + <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' }}</text>
  11 + </view>
  12 + <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
  13 + </view>
  14 + <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
  15 + <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName ||
  16 + '-'}}</text></view>
  17 + </view>
  18 +
  19 + <view class="section1">
  20 + <ProductRel mode="view" :list="productList" />
  21 + </view>
  22 +
  23 + <view class="section">
  24 + <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{ detail.totalAmountCapital
  25 + || '-' }}</text></view>
  26 + <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo || '-'
  27 + }}</text></view>
  28 + <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements ||
  29 + '-' }}</text></view>
  30 + <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms || '-'
  31 + }}</text></view>
  32 + <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode ||
  33 + '-'}}</text></view>
  34 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  35 + }}</text></view>
  36 + <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
  37 + detail.includesPackagingFeeName || '-' }}</text></view>
  38 + <view class="row"><text class="label">单价中是否已包含运费</text><text class="value">{{
  39 + detail.includesTransportFeeName || '-' }}</text></view>
  40 + <view class="row"><text class="label">需方指定收货人</text><text class="value">{{
  41 + detail.designatedConsignee || '-' }}</text></view>
  42 +
  43 + <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
  44 + '-' }}</text></view>
  45 + <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
  46 + || '-' }}</text></view>
  47 + <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
  48 + class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
  49 + <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
  50 + || '-' }}</text></view>
  51 + <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
  52 + }}</text></view>
  53 + </view>
  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 ?
  59 + '是' : '否' }}</text></view>
  60 + </view>
  61 +
  62 + <view class="section" style="margin-bottom: 150rpx;">
  63 + <text class="row customer">具体质量要求</text>
  64 + <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
  65 + '-' }}</text></view>
  66 + <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
  67 + }}</text></view>
  68 + <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
  69 + }}</text></view>
  70 + <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
  71 + }}</text></view>
  72 + <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
  73 + }}</text></view>
  74 + <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
  75 + }}</text></view>
  76 + </view>
  77 + </view>
  78 + </view>
  79 +</template>
  80 +<script>
  81 +import { getContractApi } from '@/api/contract'
  82 +import ProductRel from './productRel.vue'
  83 +
  84 +export default {
  85 + name: 'StandardContractViewer',
  86 + components: { ProductRel },
  87 + props: { id: { type: [String, Number], default: '' } },
  88 + data() {
  89 + return {
  90 + id: '',
  91 + detail: {
  92 + code: '',
  93 + supplier: '',
  94 + supplierName: '',
  95 + buyer: '',
  96 + buyerName: '',
  97 + orderDate: '',
  98 + unit: '',
  99 + workshopId: '',
  100 + workshopName: '',
  101 + designatedConsignee: '',
  102 + specialTerms: '',
  103 + specialTermsName: '',
  104 + executionStandard: '',
  105 + executionStandardName: '',
  106 + executionStandardRemarks: '',
  107 + includesPackagingFee: false,
  108 + includesPackagingFeeName: '',
  109 + includesTransportFee: false,
  110 + includesTransportFeeName: '',
  111 + totalAmountCapital: '',
  112 + depositInfo: '',
  113 + packagingRequirements: '',
  114 + paymentTerms: '',
  115 + transportMode: '',
  116 + destinationId: '',
  117 + destinationLabel: '',
  118 + specialInstructions: '',
  119 + remarks: '',
  120 + pieceWeightHead: '',
  121 + surface: '',
  122 + tolerance: '',
  123 + performance: '',
  124 + component: '',
  125 + packaging: ''
  126 + },
  127 + productList: [],
  128 + fileInfo: { id: '', name: '' },
  129 + yesNoList: [{ label: '是', value: true }, { label: '否', value: false }],
  130 + standardStandardized: '',
  131 + standardStandardizedName: '',
  132 + sheet: { visible: false, title: '请选择', options: [], value: '' },
  133 + }
  134 + },
  135 + watch: {
  136 + id: {
  137 + immediate: true,
  138 + handler(val) {
  139 + const v = (val !== undefined && val !== null) ? String(val) : ''
  140 + if (v) this.loadDetail(v)
  141 + }
  142 + }
  143 + },
  144 + methods: {
  145 + loadDetail(id) {
  146 + const rid = (id !== undefined && id !== null) ? String(id) : ''
  147 + if (!rid) return
  148 + getContractApi(rid).then(res => {
  149 + const data = res && res.data ? res.data : {}
  150 + const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
  151 + const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
  152 + this.detail = {
  153 + ...this.detail,
  154 + ...data,
  155 + includesPackagingFeeName, includesTransportFeeName,
  156 + destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
  157 + destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
  158 + }
  159 + const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
  160 + this.productList = lines
  161 + }).catch(() => { })
  162 + },
  163 + getFormValues() {
  164 + const m = this.detail || {}
  165 + return JSON.parse(JSON.stringify(m))
  166 + }
  167 + }
  168 +}
  169 +</script>
  170 +<style lang="scss" scoped>
  171 +.page {
  172 + display: flex;
  173 + flex-direction: column;
  174 + height: 100%;
  175 +}
  176 +
  177 +.scroll {
  178 + flex: 1;
  179 + padding: 8rpx 0 144rpx;
  180 +}
  181 +
  182 +.detail-page {
  183 + background: #f3f3f3;
  184 +}
  185 +
  186 +.section {
  187 + padding: 32rpx;
  188 + background: #fff;
  189 + margin-bottom: 20rpx;
  190 +}
  191 +
  192 +.section1 {
  193 + background: #fff;
  194 + margin-bottom: 20rpx;
  195 +}
  196 +
  197 +.row {
  198 + display: flex;
  199 + margin-bottom: 20rpx;
  200 + align-items: center;
  201 +}
  202 +
  203 +.row:last-child {
  204 + margin-bottom: 0;
  205 +}
  206 +
  207 +.label {
  208 + width: 280rpx;
  209 + color: rgba(0, 0, 0, 0.6);
  210 + font-size: 28rpx;
  211 +}
  212 +
  213 +.row1 {
  214 + display: flex;
  215 + justify-content: space-between;
  216 + align-items: center;
  217 + color: rgba(0, 0, 0, 0.9);
  218 + margin: 32rpx 0;
  219 +}
  220 +
  221 +.label1 {
  222 + width: 280rpx;
  223 + color: rgba(0, 0, 0, 0.6);
  224 + font-size: 32rpx;
  225 +}
  226 +
  227 +.value {
  228 + flex: 1;
  229 + text-align: right;
  230 + color: rgba(0, 0, 0, 0.9);
  231 + font-size: 28rpx;
  232 +}
  233 +
  234 +.customer {
  235 + font-weight: 600;
  236 + font-size: 36rpx;
  237 + color: rgba(0, 0, 0, 0.9);
  238 + padding-bottom: 12rpx;
  239 +}
  240 +
  241 +.upload-dialog {
  242 + background: #fff;
  243 + border-top-left-radius: 16rpx;
  244 + border-top-right-radius: 16rpx;
  245 +}
  246 +
  247 +.upload-header {
  248 + display: flex;
  249 + position: relative;
  250 + align-items: center;
  251 + justify-content: center;
  252 + padding: 32rpx 32rpx;
  253 +}
  254 +
  255 +.upload-header .title {
  256 + font-size: 36rpx;
  257 + color: rgba(0, 0, 0, 0.9);
  258 + font-weight: 600;
  259 +}
  260 +
  261 +.upload-body {
  262 + padding: 16rpx 32rpx;
  263 + border-bottom: 1rpx solid #E7E7E7;
  264 +}
  265 +
  266 +.upload-body .section-title {
  267 + font-size: 32rpx;
  268 + color: rgba(0, 0, 0, 0.9);
  269 + font-weight: 600;
  270 + line-height: 48rpx;
  271 +}
  272 +
  273 +.upload-footer {
  274 + padding: 24rpx 32rpx 48rpx;
  275 +}
  276 +
  277 +.upload-footer .submit {
  278 + background: $theme-primary;
  279 + color: #fff;
  280 +}
  281 +</style>
... ...
... ... @@ -5,14 +5,14 @@
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 7 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8   - }}</text></view>
  8 + }}</text></view>
9 9 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
10   - }}</text></view>
  10 + }}</text></view>
11 11 <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
12 12 </view>
13 13 <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
14 14 <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'
15   - }}</text></view>
  15 + }}</text></view>
16 16 </view>
17 17
18 18 <view class="section1">
... ... @@ -23,14 +23,15 @@
23 23 <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
24 24 detail.totalAmountCapital || '-' }}</text></view>
25 25 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
26   - '-' }}</text></view>
  26 + '-' }}</text></view>
27 27 <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
28   - || '-' }}</text></view>
  28 + || '-' }}</text></view>
29 29 <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||
30   - '-' }}</text></view>
  30 + '-' }}</text></view>
31 31 <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'
32   - }}</text></view>
33   - <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  32 + }}</text></view>
  33 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel ||
  34 + '-'
34 35 }}</text></view>
35 36 <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
36 37 detail.includesPackagingFeeName || '-' }}</text></view>
... ... @@ -40,35 +41,37 @@
40 41 detail.designatedConsignee || '-' }}</text></view>
41 42
42 43 <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
43   - '-' }}</text></view>
  44 + '-' }}</text></view>
44 45 <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
45   - || '-' }}</text></view>
  46 + || '-' }}</text></view>
46 47 <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
47 48 class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
48 49 <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
49   - || '-' }}</text></view>
  50 + || '-' }}</text></view>
50 51 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
51   - }}</text></view>
  52 + }}</text></view>
52 53 </view>
53 54 <view class="section" v-if="status === 'STANDARD'">
54   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-' }}</text></view>
55   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否' }}</text></view>
  55 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  56 + detail.standardFileName || '-' }}</text></view>
  57 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{
  58 + detail.standardStandardized ? '是' : '否' }}</text></view>
56 59 </view>
57 60
58 61 <view class="section">
59 62 <text class="row customer">具体质量要求</text>
60 63 <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
61   - '-' }}</text></view>
  64 + '-' }}</text></view>
62 65 <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
63   - }}</text></view>
  66 + }}</text></view>
64 67 <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
65   - }}</text></view>
  68 + }}</text></view>
66 69 <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
67   - }}</text></view>
  70 + }}</text></view>
68 71 <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
69   - }}</text></view>
  72 + }}</text></view>
70 73 <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
71   - }}</text></view>
  74 + }}</text></view>
72 75 </view>
73 76 </view>
74 77 </scroll-view>
... ... @@ -77,7 +80,8 @@
77 80 <view class="upload-dialog">
78 81 <view class="upload-header">
79 82 <text class="title">{{ uploadType === 'standard' ? '上传规范性合同' : '上传双方盖章合同' }}</text>
80   - <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" @click="$refs.uploadPopup.close()" />
  83 + <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22"
  84 + @click="$refs.uploadPopup.close()" />
81 85 </view>
82 86 <view class="upload-body">
83 87 <text class="section-title">附件上传:</text>
... ... @@ -87,8 +91,8 @@
87 91 <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view>
88 92 <view class="row1" @click="openStandardizedSheet" v-if="uploadType === 'standard'">
89 93 <view class="label1">合同是否规范</view>
90   - <uni-icons type="right" size="18" v-if="!standardStandardizedName" ></uni-icons>
91   - <view class="value" v-else >{{standardStandardizedName}}</view>
  94 + <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons>
  95 + <view class="value" v-else>{{ standardStandardizedName }}</view>
92 96 </view>
93 97 </view>
94 98 <view class="upload-footer">
... ... @@ -96,7 +100,8 @@
96 100 </view>
97 101 </view>
98 102 </uni-popup>
99   - <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onSheetConfirm" />
  103 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  104 + v-model="sheet.value" @confirm="onSheetConfirm" />
100 105 </view>
101 106 </template>
102 107
... ... @@ -156,62 +161,63 @@ export default {
156 161 packaging: ''
157 162 },
158 163 productList: [],
159   - buttons: [{
160   - text: '编辑',
161   - visible: true,
162   - variant: 'outline',
163   - event: 'edit',
164   - },
165   - {
166   - text: '删除',
167   - visible: true,
168   - variant: 'outline',
169   - event: 'delete',
170   - style: {
171   - color: '#D54941',
172   - border: '1px solid #D54941'
173   - }
174   - },
175   - {
176   - text: '上传合同附件',
177   - visible: true,
178   - variant: 'outline',
179   - event: 'upload'
180   - },
181   - {
182   - text: '上传双方盖章合同',
183   - visible: true,
184   - variant: 'outline',
185   - event: 'uploadSeal'
186   - },
187   - {
188   - text: '审核',
189   - visible: true,
190   - variant: 'primary',
191   - event: 'audit'
192   - },
193   - {
194   - text: '审核详情',
195   - visible: true,
196   - variant: 'primary',
197   - event: 'auditDetail'
198   - },
199   - ],
  164 + buttons: [{
  165 + text: '编辑',
  166 + visible: true,
  167 + variant: 'outline',
  168 + event: 'edit',
  169 + },
  170 + {
  171 + text: '删除',
  172 + visible: true,
  173 + variant: 'outline',
  174 + event: 'delete',
  175 + style: {
  176 + color: '#D54941',
  177 + border: '1px solid #D54941'
  178 + }
  179 + },
  180 + {
  181 + text: '上传合同附件',
  182 + visible: true,
  183 + variant: 'outline',
  184 + event: 'upload'
  185 + },
  186 + {
  187 + text: '上传双方盖章合同',
  188 + visible: true,
  189 + variant: 'outline',
  190 + event: 'uploadSeal'
  191 + },
  192 + {
  193 + text: '审核',
  194 + visible: true,
  195 + variant: 'primary',
  196 + event: 'audit'
  197 + },
  198 + {
  199 + text: '审核详情',
  200 + visible: true,
  201 + variant: 'primary',
  202 + event: 'auditDetail'
  203 + },
  204 + ],
200 205 }
201 206 },
202 207 computed: {
203   - displayButtons() {
204   - const s = this.detail && this.detail.status || ''
205   - const t = this.detail.standardApproved || ''
206   - return [
207   - { ...this.buttons[0]},
208   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
209   - { ...this.buttons[1], visible: (s === 'DRAFT') },
210   - { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') },
211   - { ...this.buttons[3], visible: (s === 'STANDARD') },
212   - // { ...this.buttons[4], visible: (s === 'STANDARD') }
213   - ]
214   - }
  208 + displayButtons() {
  209 + const s = this.detail && this.detail.status || false
  210 + const t = this.detail.standardApproved || false
  211 + const e = this.detail.standardShowExamine || false
  212 + return [
  213 + { ...this.buttons[0], visible: (s === 'DRAFT') },
  214 + { ...this.buttons[1], visible: (s === 'DRAFT') },
  215 + { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') },
  216 + { ...this.buttons[3], visible: (s === 'STANDARD') },
  217 + { ...this.buttons[4], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  218 + { ...this.buttons[5], visible: (s === 'STANDARD') }
  219 + ]
  220 + }
215 221 },
216 222 onLoad(options) {
217 223 const id = options && options.id ? options.id : ''
... ... @@ -252,7 +258,7 @@ export default {
252 258 url: '/pages/contract_foreign_std/modify' + query
253 259 })
254 260 },
255   - uploadContract(id, type = 'standard'){
  261 + uploadContract(id, type = 'standard') {
256 262 if (!id) return
257 263 this.uploadId = id
258 264 this.uploadType = type
... ... @@ -282,14 +288,14 @@ export default {
282 288 id: this.id,
283 289 signedContractFileId: this.fileInfo.id,
284 290 signedContractFileName: this.fileInfo.name,
285   - }
  291 + }
286 292 const api = this.uploadType === 'standard' ? uploadStandardContract : uploadSignedContractFile
287 293 uni.showModal({
288 294 title: '确认提交',
289 295 content: '确定提交' + (this.uploadType === 'standard' ? '标准合同' : '双方盖章合同') + '吗?',
290 296 success: (res) => {
291 297 if (res.confirm) {
292   - api({...this.detail, ...data}).then(() => {
  298 + api({ ...this.detail, ...data }).then(() => {
293 299 uni.showToast({
294 300 title: '上传' + (this.uploadType === 'standard' ? '标准合同' : '双方盖章合同') + '成功',
295 301 icon: 'success'
... ... @@ -328,8 +334,21 @@ export default {
328 334 if (e === 'delete') return this.onDelete(btn && btn.params)
329 335 if (e === 'upload') return this.uploadContract(this.detail.id || '')
330 336 if (e === 'uploadSeal') return this.uploadContract(this.detail.id || '', 'seal')
331   - // if (e === 'audit') return this.onAudit(btn && btn.params)
332   - // if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  337 + if (e === 'audit') return this.onAudit(btn && btn.params)
  338 + if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  339 + },
  340 + getBusinessId() {
  341 + return (this.detail && (this.detail.id || this.detail.code)) || ''
  342 + },
  343 + onAudit() {
  344 + const CACHE_KEY = 'sourceBusinessId'
  345 + uni.setStorageSync(CACHE_KEY, this.getBusinessId())
  346 + uni.navigateTo({ url: '/pages/flow/audit' })
  347 + },
  348 + onAuditDetail() {
  349 + const CACHE_KEY = 'sourceBusinessId'
  350 + uni.setStorageSync(CACHE_KEY, this.getBusinessId())
  351 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
333 352 },
334 353 async loadDetail() {
335 354 if (!this.id) return
... ... @@ -338,9 +357,9 @@ export default {
338 357 const data = res && res.data ? res.data : {}
339 358 const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
340 359 const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
341   - this.detail = {
342   - ...this.detail,
343   - ...data,
  360 + this.detail = {
  361 + ...this.detail,
  362 + ...data,
344 363 includesPackagingFeeName, includesTransportFeeName,
345 364 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
346 365 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
... ... @@ -377,6 +396,7 @@ export default {
377 396 background: #fff;
378 397 margin-bottom: 20rpx;
379 398 }
  399 +
380 400 .section1 {
381 401 background: #fff;
382 402 margin-bottom: 20rpx;
... ... @@ -411,11 +431,13 @@ export default {
411 431 color: rgba(0, 0, 0, 0.9);
412 432 padding-bottom: 12rpx;
413 433 }
  434 +
414 435 .upload-dialog {
415 436 background: #fff;
416 437 border-top-left-radius: 16rpx;
417 438 border-top-right-radius: 16rpx;
418 439 }
  440 +
419 441 .upload-header {
420 442 display: flex;
421 443 position: relative;
... ... @@ -423,23 +445,34 @@ export default {
423 445 justify-content: center;
424 446 padding: 32rpx 32rpx;
425 447 }
  448 +
426 449 .upload-header .title {
427 450 font-size: 36rpx;
428 451 color: rgba(0, 0, 0, 0.9);
429 452 font-weight: 600;
430 453 }
431   -.upload-body {
432   - padding: 16rpx 32rpx;
  454 +
  455 +.upload-body {
  456 + padding: 16rpx 32rpx;
433 457 border-bottom: 1rpx solid #E7E7E7;
434 458 }
  459 +
435 460 .upload-body .section-title {
436 461 font-size: 32rpx;
437 462 color: rgba(0, 0, 0, 0.9);
438 463 font-weight: 600;
439 464 line-height: 48rpx;
440 465 }
441   -.upload-footer { padding: 24rpx 32rpx 48rpx; }
442   -.upload-footer .submit { background: $theme-primary; color: #fff; }
  466 +
  467 +.upload-footer {
  468 + padding: 24rpx 32rpx 48rpx;
  469 +}
  470 +
  471 +.upload-footer .submit {
  472 + background: $theme-primary;
  473 + color: #fff;
  474 +}
  475 +
443 476 .row1 {
444 477 display: flex;
445 478 justify-content: space-between;
... ...
... ... @@ -5,14 +5,14 @@
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 7 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8   - }}</text></view>
  8 + }}</text></view>
9 9 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
10   - }}</text></view>
  10 + }}</text></view>
11 11 <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
12 12 </view>
13 13 <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
14 14 <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'
15   - }}</text></view>
  15 + }}</text></view>
16 16 </view>
17 17
18 18 <view class="section1">
... ... @@ -23,14 +23,15 @@
23 23 <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
24 24 detail.totalAmountCapital || '-' }}</text></view>
25 25 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
26   - '-' }}</text></view>
  26 + '-' }}</text></view>
27 27 <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
28   - || '-' }}</text></view>
  28 + || '-' }}</text></view>
29 29 <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||
30   - '-' }}</text></view>
  30 + '-' }}</text></view>
31 31 <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'
32   - }}</text></view>
33   - <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  32 + }}</text></view>
  33 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel ||
  34 + '-'
34 35 }}</text></view>
35 36 <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
36 37 detail.includesPackagingFeeName || '-' }}</text></view>
... ... @@ -40,40 +41,44 @@
40 41 detail.designatedConsignee || '-' }}</text></view>
41 42
42 43 <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
43   - '-' }}</text></view>
  44 + '-' }}</text></view>
44 45 <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
45   - || '-' }}</text></view>
  46 + || '-' }}</text></view>
46 47 <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
47 48 class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
48 49 <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
49   - || '-' }}</text></view>
  50 + || '-' }}</text></view>
50 51 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
51   - }}</text></view>
  52 + }}</text></view>
52 53 </view>
53 54
54 55 <view class="section" v-if="status === 'STANDARD'">
55   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-' }}</text></view>
56   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否' }}</text></view>
  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">{{
  59 + detail.standardStandardized ? '是' : '否' }}</text></view>
57 60 </view>
58 61 <view class="section" v-if="status === 'FORMAL'">
59   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.formalFileName || '-' }}</text></view>
60   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized ? '是' : '否' }}</text></view>
  62 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  63 + detail.formalFileName || '-' }}</text></view>
  64 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized
  65 + ? '是' : '否' }}</text></view>
61 66 </view>
62 67
63 68 <view class="section">
64 69 <text class="row customer">具体质量要求</text>
65 70 <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
66   - '-' }}</text></view>
  71 + '-' }}</text></view>
67 72 <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
68   - }}</text></view>
  73 + }}</text></view>
69 74 <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
70   - }}</text></view>
  75 + }}</text></view>
71 76 <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
72   - }}</text></view>
  77 + }}</text></view>
73 78 <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
74   - }}</text></view>
  79 + }}</text></view>
75 80 <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
76   - }}</text></view>
  81 + }}</text></view>
77 82 </view>
78 83 </view>
79 84 </scroll-view>
... ... @@ -82,7 +87,8 @@
82 87 <view class="upload-dialog">
83 88 <view class="upload-header">
84 89 <text class="title">上传规范性合同</text>
85   - <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" @click="$refs.uploadPopup.close()" />
  90 + <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22"
  91 + @click="$refs.uploadPopup.close()" />
86 92 </view>
87 93 <view class="upload-body">
88 94 <text class="section-title">附件上传:</text>
... ... @@ -92,8 +98,8 @@
92 98 <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view>
93 99 <view class="row1" @click="openStandardizedSheet">
94 100 <view class="label1">合同是否规范</view>
95   - <uni-icons type="right" size="18" v-if="!standardStandardizedName" ></uni-icons>
96   - <view class="value" v-else >{{standardStandardizedName}}</view>
  101 + <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons>
  102 + <view class="value" v-else>{{ standardStandardizedName }}</view>
97 103 </view>
98 104 </view>
99 105 <view class="upload-footer">
... ... @@ -101,7 +107,8 @@
101 107 </view>
102 108 </view>
103 109 </uni-popup>
104   - <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onSheetConfirm" />
  110 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  111 + v-model="sheet.value" @confirm="onSheetConfirm" />
105 112 </view>
106 113 </template>
107 114
... ... @@ -162,76 +169,109 @@ export default {
162 169 packaging: ''
163 170 },
164 171 productList: [],
165   - buttons: [{
166   - text: '编辑',
167   - visible: true,
168   - variant: 'outline',
169   - event: 'edit',
170   - },
171   - {
172   - text: '删除',
173   - visible: true,
174   - variant: 'outline',
175   - event: 'delete',
176   - style: {
177   - color: '#D54941',
178   - border: '1px solid #D54941'
179   - }
180   - },
181   - {
182   - text: '锁价',
183   - visible: true,
184   - variant: 'outline',
185   - event: 'lock'
186   - },
187   - {
188   - text: '上传正式合同附件',
189   - visible: true,
190   - variant: 'outline',
191   - event: 'upload'
192   - },
193   - {
194   - text: '上传正式合同附件',
195   - visible: true,
196   - variant: 'outline',
197   - event: 'uploadParent'
198   - },
199   - {
200   - text: '上传标准合同附件',
201   - visible: true,
202   - variant: 'outline',
203   - event: 'uploadStandard'
204   - },
205   - {
206   - text: '审核',
207   - visible: true,
208   - variant: 'primary',
209   - event: 'audit'
210   - },
211   - {
212   - text: '审核详情',
213   - visible: true,
214   - variant: 'primary',
215   - event: 'auditDetail'
216   - },
217   - ],
  172 + buttons: [{
  173 + text: '编辑',
  174 + visible: true,
  175 + variant: 'outline',
  176 + event: 'edit',
  177 + },
  178 + {
  179 + text: '删除',
  180 + visible: true,
  181 + variant: 'outline',
  182 + event: 'delete',
  183 + style: {
  184 + color: '#D54941',
  185 + border: '1px solid #D54941'
  186 + }
  187 + },
  188 + {
  189 + text: '锁价',
  190 + visible: true,
  191 + variant: 'outline',
  192 + event: 'lock'
  193 + },
  194 + {
  195 + text: '上传正式合同附件',
  196 + visible: true,
  197 + variant: 'outline',
  198 + event: 'upload'
  199 + },
  200 + {
  201 + text: '上传正式合同附件',
  202 + visible: true,
  203 + variant: 'outline',
  204 + event: 'uploadParent'
  205 + },
  206 + {
  207 + text: '上传标准合同附件',
  208 + visible: true,
  209 + variant: 'outline',
  210 + event: 'uploadStandard'
  211 + },
  212 + {
  213 + text: '审核正式合同',
  214 + visible: true,
  215 + variant: 'primary',
  216 + event: 'audit1'
  217 + },
  218 + {
  219 + text: '审核正式合同',
  220 + visible: true,
  221 + variant: 'primary',
  222 + event: 'audit2'
  223 + },
  224 + {
  225 + text: '审核标准合同',
  226 + visible: true,
  227 + variant: 'primary',
  228 + event: 'audit3'
  229 + },
  230 + {
  231 + text: '正式合同审核详情',
  232 + visible: true,
  233 + variant: 'primary',
  234 + event: 'auditDetail1'
  235 + },
  236 + {
  237 + text: '正式合同审核详情',
  238 + visible: true,
  239 + variant: 'primary',
  240 + event: 'auditDetail2'
  241 + },
  242 + {
  243 + text: '标准合同审核详情',
  244 + visible: true,
  245 + variant: 'primary',
  246 + event: 'auditDetail3'
  247 + },
  248 + ],
218 249 }
219 250 },
220 251 computed: {
221   - displayButtons() {
222   - const s = this.detail && this.detail.status || ''
223   - const t = this.detail.standardApproved || ''
224   - const l = this.detail.priceSpecLocked || ''
225   - return [
226   - { ...this.buttons[0]},
227   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
228   - { ...this.buttons[1], visible: (s === 'DRAFT') },
229   - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
230   - { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
231   - { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
232   - { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
233   - ]
234   - }
  252 + displayButtons() {
  253 + const s = this.detail && this.detail.status || false
  254 + const t = this.detail.formalApproved || false
  255 + const l = this.detail.priceSpecLocked || false
  256 + const a = this.detail.standardApproved || false
  257 + const e = this.detail.showExamine || false
  258 + const f = this.detail.standardShowExamine || false
  259 + return [
  260 + { ...this.buttons[0], visible: (s === 'DRAFT') },
  261 + { ...this.buttons[1], visible: (s === 'DRAFT') },
  262 + { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
  263 + { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
  264 + { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
  265 + { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
  266 + { ...this.buttons[6], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') },
  267 + { ...this.buttons[7], visible: (s === 'FORMAL' && e && t === 'AUDIT') },
  268 + { ...this.buttons[8], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  269 + { ...this.buttons[9], visible: (s === 'STANDARD' && f && a === 'AUDIT') },
  270 + { ...this.buttons[10], visible: (s === 'FORMAL' && t) },
  271 + { ...this.buttons[11], visible: (s === 'STANDARD' && t) },
  272 + { ...this.buttons[12], visible: (s === 'STANDARD' && a) },
  273 + ]
  274 + }
235 275 },
236 276 onLoad(options) {
237 277 const id = options && options.id ? options.id : ''
... ... @@ -272,7 +312,7 @@ export default {
272 312 url: '/pages/contract_foreign_stock/modify' + query
273 313 })
274 314 },
275   - uploadContract(id, type = 'formal'){
  315 + uploadContract(id, type = 'formal') {
276 316 if (!id) return
277 317 this.uploadId = id
278 318 this.uploadType = type
... ... @@ -310,7 +350,7 @@ export default {
310 350 content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?',
311 351 success: (res) => {
312 352 if (res.confirm) {
313   - api({...this.detail, ...data}).then(() => {
  353 + api({ ...this.detail, ...data }).then(() => {
314 354 uni.showToast({
315 355 title: this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功',
316 356 icon: 'success'
... ... @@ -356,8 +396,26 @@ export default {
356 396 if (e === 'upload') return this.uploadContract(this.detail.id || '')
357 397 if (e === 'uploadParent') return this.uploadContract(this.detail.parentId || '')
358 398 if (e === 'uploadStandard') return this.uploadContract(this.detail.id || '', 'standard')
359   - // if (e === 'audit') return this.onAudit(btn && btn.params)
360   - // if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  399 + if (e === 'audit1') return this.onAudit(this.detail.id || '', 'FORMAL_CONTRACT')
  400 + if (e === 'audit2') return this.onAudit(this.detail.parentId || '', 'FORMAL_CONTRACT')
  401 + if (e === 'audit3') return this.onAudit(this.detail.id || '', 'STANDARD_CONTRACT')
  402 + if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT')
  403 + if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT')
  404 + if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT')
  405 + },
  406 + onAudit(id, type) {
  407 + const CACHE_KEY = 'sourceBusinessId'
  408 + const TYPE = 'contractType'
  409 + uni.setStorageSync(TYPE, type)
  410 + uni.setStorageSync(CACHE_KEY, id)
  411 + uni.navigateTo({ url: '/pages/flow/audit' })
  412 + },
  413 + onAuditDetail(id, type) {
  414 + const CACHE_KEY = 'sourceBusinessId'
  415 + const TYPE = 'contractType'
  416 + uni.setStorageSync(TYPE, type)
  417 + uni.setStorageSync(CACHE_KEY, id)
  418 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
361 419 },
362 420 async loadDetail() {
363 421 if (!this.id) return
... ... @@ -366,9 +424,9 @@ export default {
366 424 const data = res && res.data ? res.data : {}
367 425 const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
368 426 const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
369   - this.detail = {
370   - ...this.detail,
371   - ...data,
  427 + this.detail = {
  428 + ...this.detail,
  429 + ...data,
372 430 includesPackagingFeeName, includesTransportFeeName,
373 431 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
374 432 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
... ... @@ -405,6 +463,7 @@ export default {
405 463 background: #fff;
406 464 margin-bottom: 20rpx;
407 465 }
  466 +
408 467 .section1 {
409 468 background: #fff;
410 469 margin-bottom: 20rpx;
... ... @@ -439,11 +498,13 @@ export default {
439 498 color: rgba(0, 0, 0, 0.9);
440 499 padding-bottom: 12rpx;
441 500 }
  501 +
442 502 .upload-dialog {
443 503 background: #fff;
444 504 border-top-left-radius: 16rpx;
445 505 border-top-right-radius: 16rpx;
446 506 }
  507 +
447 508 .upload-header {
448 509 display: flex;
449 510 position: relative;
... ... @@ -451,23 +512,34 @@ export default {
451 512 justify-content: center;
452 513 padding: 32rpx 32rpx;
453 514 }
  515 +
454 516 .upload-header .title {
455 517 font-size: 36rpx;
456 518 color: rgba(0, 0, 0, 0.9);
457 519 font-weight: 600;
458 520 }
459   -.upload-body {
460   - padding: 16rpx 32rpx;
  521 +
  522 +.upload-body {
  523 + padding: 16rpx 32rpx;
461 524 border-bottom: 1rpx solid #E7E7E7;
462 525 }
  526 +
463 527 .upload-body .section-title {
464 528 font-size: 32rpx;
465 529 color: rgba(0, 0, 0, 0.9);
466 530 font-weight: 600;
467 531 line-height: 48rpx;
468 532 }
469   -.upload-footer { padding: 24rpx 32rpx 48rpx; }
470   -.upload-footer .submit { background: $theme-primary; color: #fff; }
  533 +
  534 +.upload-footer {
  535 + padding: 24rpx 32rpx 48rpx;
  536 +}
  537 +
  538 +.upload-footer .submit {
  539 + background: $theme-primary;
  540 + color: #fff;
  541 +}
  542 +
471 543 .row1 {
472 544 display: flex;
473 545 justify-content: space-between;
... ...
... ... @@ -5,14 +5,14 @@
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 7 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8   - }}</text></view>
  8 + }}</text></view>
9 9 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
10   - }}</text></view>
  10 + }}</text></view>
11 11 <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
12 12 </view>
13 13 <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
14 14 <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'
15   - }}</text></view>
  15 + }}</text></view>
16 16 </view>
17 17
18 18 <view class="section1">
... ... @@ -23,14 +23,15 @@
23 23 <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
24 24 detail.totalAmountCapital || '-' }}</text></view>
25 25 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
26   - '-' }}</text></view>
  26 + '-' }}</text></view>
27 27 <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
28   - || '-' }}</text></view>
  28 + || '-' }}</text></view>
29 29 <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||
30   - '-' }}</text></view>
  30 + '-' }}</text></view>
31 31 <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'
32   - }}</text></view>
33   - <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  32 + }}</text></view>
  33 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel ||
  34 + '-'
34 35 }}</text></view>
35 36 <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
36 37 detail.includesPackagingFeeName || '-' }}</text></view>
... ... @@ -40,41 +41,45 @@
40 41 detail.designatedConsignee || '-' }}</text></view>
41 42
42 43 <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
43   - '-' }}</text></view>
  44 + '-' }}</text></view>
44 45 <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
45   - || '-' }}</text></view>
  46 + || '-' }}</text></view>
46 47 <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
47 48 class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
48 49 <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
49   - || '-' }}</text></view>
  50 + || '-' }}</text></view>
50 51 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
51   - }}</text></view>
  52 + }}</text></view>
52 53 </view>
53 54
54 55 <view class="section">
55   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-'
  56 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  57 + detail.standardFileName || '-'
56 58 }}</text></view>
57   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否'
  59 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{
  60 + detail.standardStandardized ? '是' : '否'
58 61 }}</text></view>
59 62 </view>
60 63 <view class="section" v-if="status === 'FORMAL'">
61   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.formalFileName || '-' }}</text></view>
62   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized ? '是' : '否' }}</text></view>
  64 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  65 + detail.formalFileName || '-' }}</text></view>
  66 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized
  67 + ? '是' : '否' }}</text></view>
63 68 </view>
64 69 <view class="section">
65 70 <text class="row customer">具体质量要求</text>
66 71 <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
67   - '-' }}</text></view>
  72 + '-' }}</text></view>
68 73 <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
69   - }}</text></view>
  74 + }}</text></view>
70 75 <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
71   - }}</text></view>
  76 + }}</text></view>
72 77 <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
73   - }}</text></view>
  78 + }}</text></view>
74 79 <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
75   - }}</text></view>
  80 + }}</text></view>
76 81 <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
77   - }}</text></view>
  82 + }}</text></view>
78 83 </view>
79 84 </view>
80 85 </scroll-view>
... ... @@ -83,7 +88,8 @@
83 88 <view class="upload-dialog">
84 89 <view class="upload-header">
85 90 <text class="title">上传规范性合同</text>
86   - <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" @click="$refs.uploadPopup.close()" />
  91 + <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22"
  92 + @click="$refs.uploadPopup.close()" />
87 93 </view>
88 94 <view class="upload-body">
89 95 <text class="section-title">附件上传:</text>
... ... @@ -93,8 +99,8 @@
93 99 <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view>
94 100 <view class="row1" @click="openStandardizedSheet">
95 101 <view class="label1">合同是否规范</view>
96   - <uni-icons type="right" size="18" v-if="!standardStandardizedName" ></uni-icons>
97   - <view class="value" v-else >{{standardStandardizedName}}</view>
  102 + <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons>
  103 + <view class="value" v-else>{{ standardStandardizedName }}</view>
98 104 </view>
99 105 </view>
100 106 <view class="upload-footer">
... ... @@ -102,7 +108,8 @@
102 108 </view>
103 109 </view>
104 110 </uni-popup>
105   - <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onSheetConfirm" />
  111 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  112 + v-model="sheet.value" @confirm="onSheetConfirm" />
106 113 </view>
107 114 </template>
108 115
... ... @@ -163,91 +170,112 @@ export default {
163 170 packaging: ''
164 171 },
165 172 productList: [],
166   - buttons: [{
167   - text: '编辑',
168   - visible: true,
169   - variant: 'outline',
170   - event: 'edit',
171   - },
172   - {
173   - text: '删除',
174   - visible: true,
175   - variant: 'outline',
176   - event: 'delete',
177   - style: {
178   - color: '#D54941',
179   - border: '1px solid #D54941'
180   - }
181   - },
182   - {
183   - text: '锁规',
184   - visible: true,
185   - variant: 'outline',
186   - event: 'lock',
187   - },
188   - {
189   - text: '锁规延期申请',
190   - visible: true,
191   - variant: 'outline',
192   - event: 'lockApply',
193   - },
194   - {
195   - text: '上传正式合同附件',
196   - visible: true,
197   - variant: 'outline',
198   - event: 'upload'
199   - },
200   - {
201   - text: '上传正式合同附件',
202   - visible: true,
203   - variant: 'outline',
204   - event: 'uploadParent'
205   - },
206   - {
207   - text: '上传标准合同附件',
208   - visible: true,
209   - variant: 'outline',
210   - event: 'uploadStandard'
211   - },
212   - // {
213   - // text: '上传合同附件',
214   - // visible: true,
215   - // variant: 'outline',
216   - // event: 'upload'
217   - // },
218   - // {
219   - // text: '审核',
220   - // visible: true,
221   - // variant: 'primary',
222   - // event: 'audit'
223   - // },
224   - // {
225   - // text: '审核详情',
226   - // visible: true,
227   - // variant: 'primary',
228   - // event: 'auditDetail'
229   - // },
230   - ],
  173 + buttons: [{
  174 + text: '编辑',
  175 + visible: true,
  176 + variant: 'outline',
  177 + event: 'edit',
  178 + },
  179 + {
  180 + text: '删除',
  181 + visible: true,
  182 + variant: 'outline',
  183 + event: 'delete',
  184 + style: {
  185 + color: '#D54941',
  186 + border: '1px solid #D54941'
  187 + }
  188 + },
  189 + {
  190 + text: '锁规',
  191 + visible: true,
  192 + variant: 'outline',
  193 + event: 'lock',
  194 + },
  195 + {
  196 + text: '锁规延期申请',
  197 + visible: true,
  198 + variant: 'outline',
  199 + event: 'lockApply',
  200 + },
  201 + {
  202 + text: '上传正式合同附件',
  203 + visible: true,
  204 + variant: 'outline',
  205 + event: 'upload'
  206 + },
  207 + {
  208 + text: '上传正式合同附件',
  209 + visible: true,
  210 + variant: 'outline',
  211 + event: 'uploadParent'
  212 + },
  213 + {
  214 + text: '上传标准合同附件',
  215 + visible: true,
  216 + variant: 'outline',
  217 + event: 'uploadStandard'
  218 + },
  219 + {
  220 + text: '审核正式合同',
  221 + visible: true,
  222 + variant: 'primary',
  223 + event: 'audit1'
  224 + },
  225 + {
  226 + text: '审核正式合同',
  227 + visible: true,
  228 + variant: 'primary',
  229 + event: 'audit2'
  230 + },
  231 + {
  232 + text: '审核标准合同',
  233 + visible: true,
  234 + variant: 'primary',
  235 + event: 'audit3'
  236 + },
  237 + {
  238 + text: '正式合同审核详情',
  239 + visible: true,
  240 + variant: 'primary',
  241 + event: 'auditDetail1'
  242 + },
  243 + {
  244 + text: '正式合同审核详情',
  245 + visible: true,
  246 + variant: 'primary',
  247 + event: 'auditDetail2'
  248 + },
  249 + {
  250 + text: '标准合同审核详情',
  251 + visible: true,
  252 + variant: 'primary',
  253 + event: 'auditDetail3'
  254 + },
  255 + ],
231 256 }
232 257 },
233 258 computed: {
234   - displayButtons() {
235   - const s = this.detail && this.detail.status || ''
236   - const t = this.detail.standardApproved || ''
237   - const l = this.detail.priceSpecLocked || ''
238   - return [
239   - { ...this.buttons[0]},
240   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
241   - { ...this.buttons[1], visible: (s === 'DRAFT') },
242   - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
243   - { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
244   - { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
245   - { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
246   - { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
247   - // { ...this.buttons[3], visible: (s === 'STANDARD' && t === 'AUDIT') },
248   - // { ...this.buttons[4], visible: (s === 'STANDARD') }
249   - ]
250   - }
  259 + displayButtons() {
  260 + const s = this.detail && this.detail.status || ''
  261 + const t = this.detail.standardApproved || ''
  262 + const l = this.detail.priceSpecLocked || ''
  263 + return [
  264 + { ...this.buttons[0], visible: (s === 'DRAFT') },
  265 + { ...this.buttons[1], visible: (s === 'DRAFT') },
  266 + { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
  267 + { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
  268 + { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
  269 + { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
  270 + { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
  271 + { ...this.buttons[7], visible: (s === 'FORMAL' && e && t === 'AUDIT') },
  272 + { ...this.buttons[8], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  273 + { ...this.buttons[9], visible: (s === 'STANDARD' && f && a === 'AUDIT') },
  274 + { ...this.buttons[10], visible: (s === 'FORMAL' && t) },
  275 + { ...this.buttons[11], visible: (s === 'STANDARD' && t) },
  276 + { ...this.buttons[12], visible: (s === 'STANDARD' && a) },
  277 + ]
  278 + }
251 279 },
252 280 onLoad(options) {
253 281 const id = options && options.id ? options.id : ''
... ... @@ -298,7 +326,7 @@ export default {
298 326 url: '/pages/contract_foreign_unplan/modify' + query
299 327 })
300 328 },
301   - uploadContract(id, type = 'formal'){
  329 + uploadContract(id, type = 'formal') {
302 330 if (!id) return
303 331 this.uploadId = id
304 332 this.uploadType = type
... ... @@ -336,7 +364,7 @@ export default {
336 364 content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?',
337 365 success: (res) => {
338 366 if (res.confirm) {
339   - api({...this.detail, ...data}).then(() => {
  367 + api({ ...this.detail, ...data }).then(() => {
340 368 uni.showToast({
341 369 title: this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功',
342 370 icon: 'success'
... ... @@ -378,6 +406,26 @@ export default {
378 406 if (e === 'upload') return this.uploadContract(this.detail.id || '')
379 407 if (e === 'uploadParent') return this.uploadContract(this.detail.parentId || '')
380 408 if (e === 'uploadStandard') return this.uploadContract(this.detail.id || '', 'standard')
  409 + if (e === 'audit1') return this.onAudit(this.detail.id || '', 'FORMAL_CONTRACT')
  410 + if (e === 'audit2') return this.onAudit(this.detail.parentId || '', 'FORMAL_CONTRACT')
  411 + if (e === 'audit3') return this.onAudit(this.detail.id || '', 'STANDARD_CONTRACT')
  412 + if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT')
  413 + if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT')
  414 + if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT')
  415 + },
  416 + onAudit(id, type) {
  417 + const CACHE_KEY = 'sourceBusinessId'
  418 + const TYPE = 'contractType'
  419 + uni.setStorageSync(TYPE, type)
  420 + uni.setStorageSync(CACHE_KEY, id)
  421 + uni.navigateTo({ url: '/pages/flow/audit' })
  422 + },
  423 + onAuditDetail(id, type) {
  424 + const CACHE_KEY = 'sourceBusinessId'
  425 + const TYPE = 'contractType'
  426 + uni.setStorageSync(TYPE, type)
  427 + uni.setStorageSync(CACHE_KEY, id)
  428 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
381 429 },
382 430 async loadDetail() {
383 431 if (!this.id) return
... ... @@ -386,9 +434,9 @@ export default {
386 434 const data = res && res.data ? res.data : {}
387 435 const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
388 436 const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
389   - this.detail = {
390   - ...this.detail,
391   - ...data,
  437 + this.detail = {
  438 + ...this.detail,
  439 + ...data,
392 440 includesPackagingFeeName, includesTransportFeeName,
393 441 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
394 442 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
... ... @@ -425,6 +473,7 @@ export default {
425 473 background: #fff;
426 474 margin-bottom: 20rpx;
427 475 }
  476 +
428 477 .section1 {
429 478 background: #fff;
430 479 margin-bottom: 20rpx;
... ... @@ -459,11 +508,13 @@ export default {
459 508 color: rgba(0, 0, 0, 0.9);
460 509 padding-bottom: 12rpx;
461 510 }
  511 +
462 512 .upload-dialog {
463 513 background: #fff;
464 514 border-top-left-radius: 16rpx;
465 515 border-top-right-radius: 16rpx;
466 516 }
  517 +
467 518 .upload-header {
468 519 display: flex;
469 520 position: relative;
... ... @@ -471,23 +522,34 @@ export default {
471 522 justify-content: center;
472 523 padding: 32rpx 32rpx;
473 524 }
  525 +
474 526 .upload-header .title {
475 527 font-size: 36rpx;
476 528 color: rgba(0, 0, 0, 0.9);
477 529 font-weight: 600;
478 530 }
479   -.upload-body {
480   - padding: 16rpx 32rpx;
  531 +
  532 +.upload-body {
  533 + padding: 16rpx 32rpx;
481 534 border-bottom: 1rpx solid #E7E7E7;
482 535 }
  536 +
483 537 .upload-body .section-title {
484 538 font-size: 32rpx;
485 539 color: rgba(0, 0, 0, 0.9);
486 540 font-weight: 600;
487 541 line-height: 48rpx;
488 542 }
489   -.upload-footer { padding: 24rpx 32rpx 48rpx; }
490   -.upload-footer .submit { background: $theme-primary; color: #fff; }
  543 +
  544 +.upload-footer {
  545 + padding: 24rpx 32rpx 48rpx;
  546 +}
  547 +
  548 +.upload-footer .submit {
  549 + background: $theme-primary;
  550 + color: #fff;
  551 +}
  552 +
491 553 .row1 {
492 554 display: flex;
493 555 justify-content: space-between;
... ...
... ... @@ -199,14 +199,14 @@ export default {
199 199 },
200 200 computed: {
201 201 displayButtons() {
202   - const s = this.detail && this.detail.status || ''
203   - const t = this.detail.standardApproved || ''
  202 + const s = this.detail && this.detail.status || false
  203 + const t = this.detail.standardApproved || false
  204 + const e = this.detail.standardShowExamine || false
204 205 return [
205   - { ...this.buttons[0]},
206   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
  206 + { ...this.buttons[0], visible: (s === 'DRAFT') },
207 207 { ...this.buttons[1], visible: (s === 'DRAFT') },
208 208 { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') },
209   - { ...this.buttons[3], visible: (s === 'STANDARD' && t === 'AUDIT') },
  209 + { ...this.buttons[3], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
210 210 { ...this.buttons[4], visible: (s === 'STANDARD') }
211 211 ]
212 212 }
... ... @@ -319,8 +319,22 @@ export default {
319 319 if (e === 'edit') return this.onEdit(btn && btn.params)
320 320 if (e === 'delete') return this.onDelete(btn && btn.params)
321 321 if (e === 'upload') return this.uploadContract(this.detail.id || '')
322   - // if (e === 'audit') return this.onAudit(btn && btn.params)
323   - // if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  322 + if (e === 'audit') return this.onAudit(this.detail.id || '', 'PROCESS_STD_AGMT')
  323 + if (e === 'auditDetail') return this.onAuditDetail(this.detail.id || '', 'PROCESS_STD_AGMT')
  324 + },
  325 + onAudit(id, type) {
  326 + const CACHE_KEY = 'sourceBusinessId'
  327 + const TYPE = 'contractType'
  328 + uni.setStorageSync(TYPE, type)
  329 + uni.setStorageSync(CACHE_KEY, id)
  330 + uni.navigateTo({ url: '/pages/flow/audit' })
  331 + },
  332 + onAuditDetail(id, type) {
  333 + const CACHE_KEY = 'sourceBusinessId'
  334 + const TYPE = 'contractType'
  335 + uni.setStorageSync(TYPE, type)
  336 + uni.setStorageSync(CACHE_KEY, id)
  337 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
324 338 },
325 339 async loadDetail() {
326 340 if (!this.id) return
... ... @@ -336,7 +350,7 @@ export default {
336 350 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
337 351 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
338 352 }
339   - const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
  353 + const lines = Array.isArray(data.contractStdProcessingLineList) ? data.contractStdProcessingLineList : []
340 354 this.productList = lines
341 355 } catch (e) {
342 356 this.detail = { ...this.detail }
... ...
  1 +<template>
  2 + <view class="page">
  3 + <view class="detail-page">
  4 + <view class="section">
  5 + <text class="row customer">{{ detail.code }}</text>
  6 + <view class="row"><text class="label">承揽方</text><text class="value">{{ detail.supplierName || '-'
  7 + }}</text></view>
  8 + <view class="row"><text class="label">定作方</text><text class="value">{{ detail.buyerName || '-'
  9 + }}</text></view>
  10 + <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
  11 + </view>
  12 + <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
  13 + <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'
  14 + }}</text></view>
  15 + </view>
  16 +
  17 + <view class="section1">
  18 + <ProductRel mode="view" :list="productList" />
  19 + </view>
  20 +
  21 + <view class="section">
  22 + <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
  23 + detail.totalAmountCapital || '-' }}</text></view>
  24 + <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
  25 + '-' }}</text></view>
  26 + <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
  27 + || '-' }}</text></view>
  28 + <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||
  29 + '-' }}</text></view>
  30 + <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'
  31 + }}</text></view>
  32 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  33 + }}</text></view>
  34 + <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
  35 + detail.includesPackagingFeeName || '-' }}</text></view>
  36 + <view class="row"><text class="label">单价中是否已包含运费</text><text class="value">{{
  37 + detail.includesTransportFeeName || '-' }}</text></view>
  38 + <view class="row"><text class="label">需方指定收货人</text><text class="value">{{
  39 + detail.designatedConsignee || '-' }}</text></view>
  40 +
  41 + <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
  42 + '-' }}</text></view>
  43 + <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
  44 + || '-' }}</text></view>
  45 + <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
  46 + class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
  47 + <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
  48 + || '-' }}</text></view>
  49 + <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
  50 + }}</text></view>
  51 + </view>
  52 +
  53 + <view class="section">
  54 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  55 + detail.standardFileName || '-'
  56 + }}</text></view>
  57 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ?
  58 + '是' : '否'
  59 + }}</text></view>
  60 + </view>
  61 +
  62 + <view class="section">
  63 + <text class="row customer">具体质量要求</text>
  64 + <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
  65 + '-' }}</text></view>
  66 + <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
  67 + }}</text></view>
  68 + <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
  69 + }}</text></view>
  70 + <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
  71 + }}</text></view>
  72 + <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
  73 + }}</text></view>
  74 + <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
  75 + }}</text></view>
  76 + </view>
  77 + </view>
  78 + </view>
  79 +</template>
  80 +
  81 +<script>
  82 +import { getContractApi } from '@/api/contract'
  83 +import ProductRel from './productRel.vue'
  84 +
  85 +export default {
  86 + name: 'ProcessStdAgmtViewer',
  87 + components: { ProductRel },
  88 + props: { id: { type: [String, Number], default: '' } },
  89 + data() {
  90 + return {
  91 + id: '',
  92 + uploadId: '',
  93 + fileInfo: { id: '', name: '' },
  94 + yesNoList: [{ label: '是', value: true }, { label: '否', value: false }],
  95 + standardStandardized: '',
  96 + standardStandardizedName: '',
  97 + sheet: { visible: false, title: '请选择', options: [], value: '' },
  98 + detail: {
  99 + code: '',
  100 + supplier: '',
  101 + supplierName: '',
  102 + buyer: '',
  103 + buyerName: '',
  104 + orderDate: '',
  105 + unit: '',
  106 + workshopId: '',
  107 + workshopName: '',
  108 + designatedConsignee: '',
  109 + specialTerms: '',
  110 + specialTermsName: '',
  111 + executionStandard: '',
  112 + executionStandardName: '',
  113 + executionStandardRemarks: '',
  114 + includesPackagingFee: false,
  115 + includesPackagingFeeName: '',
  116 + includesTransportFee: false,
  117 + includesTransportFeeName: '',
  118 + totalAmountCapital: '',
  119 + depositInfo: '',
  120 + packagingRequirements: '',
  121 + paymentTerms: '',
  122 + transportMode: '',
  123 + destinationId: '',
  124 + destinationLabel: '',
  125 + specialInstructions: '',
  126 + remarks: '',
  127 + pieceWeightHead: '',
  128 + surface: '',
  129 + tolerance: '',
  130 + performance: '',
  131 + component: '',
  132 + packaging: ''
  133 + },
  134 + productList: [],
  135 + }
  136 + },
  137 + watch: {
  138 + id: {
  139 + immediate: true,
  140 + handler(val) {
  141 + const v = (val !== undefined && val !== null) ? String(val) : ''
  142 + if (v) this.loadDetail(v)
  143 + }
  144 + }
  145 + },
  146 + methods: {
  147 + async loadDetail() {
  148 + if (!this.id) return
  149 + try {
  150 + const res = await getContractApi(this.id)
  151 + const data = res && res.data ? res.data : {}
  152 + const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
  153 + const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
  154 + this.detail = {
  155 + ...this.detail,
  156 + ...data,
  157 + includesPackagingFeeName, includesTransportFeeName,
  158 + destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
  159 + destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
  160 + }
  161 + const lines = Array.isArray(data.contractStdProcessingLineList) ? data.contractStdProcessingLineList : []
  162 + this.productList = lines
  163 + } catch (e) {
  164 + this.detail = { ...this.detail }
  165 + this.productList = []
  166 + }
  167 + }
  168 + }
  169 +}
  170 +</script>
  171 +
  172 +<style lang="scss" scoped>
  173 +.page {
  174 + display: flex;
  175 + flex-direction: column;
  176 + height: 100%;
  177 +}
  178 +
  179 +.scroll {
  180 + flex: 1;
  181 + padding: 8rpx 0 144rpx;
  182 +}
  183 +
  184 +.detail-page {
  185 + background: #f3f3f3;
  186 +}
  187 +
  188 +.section {
  189 + padding: 32rpx;
  190 + background: #fff;
  191 + margin-bottom: 20rpx;
  192 +}
  193 +
  194 +.section1 {
  195 + background: #fff;
  196 + margin-bottom: 20rpx;
  197 +}
  198 +
  199 +.row {
  200 + display: flex;
  201 + margin-bottom: 20rpx;
  202 + align-items: center;
  203 +}
  204 +
  205 +.row:last-child {
  206 + margin-bottom: 0;
  207 +}
  208 +
  209 +.label {
  210 + width: 280rpx;
  211 + color: rgba(0, 0, 0, 0.6);
  212 + font-size: 28rpx;
  213 +}
  214 +
  215 +.value {
  216 + flex: 1;
  217 + text-align: right;
  218 + color: rgba(0, 0, 0, 0.9);
  219 + font-size: 28rpx;
  220 +}
  221 +
  222 +.customer {
  223 + font-weight: 600;
  224 + font-size: 36rpx;
  225 + color: rgba(0, 0, 0, 0.9);
  226 + padding-bottom: 12rpx;
  227 +}
  228 +
  229 +.upload-dialog {
  230 + background: #fff;
  231 + border-top-left-radius: 16rpx;
  232 + border-top-right-radius: 16rpx;
  233 +}
  234 +
  235 +.upload-header {
  236 + display: flex;
  237 + position: relative;
  238 + align-items: center;
  239 + justify-content: center;
  240 + padding: 32rpx 32rpx;
  241 +}
  242 +
  243 +.upload-header .title {
  244 + font-size: 36rpx;
  245 + color: rgba(0, 0, 0, 0.9);
  246 + font-weight: 600;
  247 +}
  248 +
  249 +.upload-body {
  250 + padding: 16rpx 32rpx;
  251 + border-bottom: 1rpx solid #E7E7E7;
  252 +}
  253 +
  254 +.upload-body .section-title {
  255 + font-size: 32rpx;
  256 + color: rgba(0, 0, 0, 0.9);
  257 + font-weight: 600;
  258 + line-height: 48rpx;
  259 +}
  260 +
  261 +.upload-footer {
  262 + padding: 24rpx 32rpx 48rpx;
  263 +}
  264 +
  265 +.upload-footer .submit {
  266 + background: $theme-primary;
  267 + color: #fff;
  268 +}
  269 +
  270 +.row1 {
  271 + display: flex;
  272 + justify-content: space-between;
  273 + align-items: center;
  274 + color: rgba(0, 0, 0, 0.9);
  275 + margin: 32rpx 0;
  276 +}
  277 +
  278 +.label1 {
  279 + width: 280rpx;
  280 + color: rgba(0, 0, 0, 0.6);
  281 + font-size: 32rpx;
  282 +}
  283 +</style>
\ No newline at end of file
... ...
... ... @@ -4,13 +4,17 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7   - <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核状态</text><text class="value">{{ detail.standardApprovedName || '-'}}</text></view>
8   - <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'}}</text></view>
9   - <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'}}</text></view>
  7 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核状态</text><text
  8 + class="value">{{ detail.standardApprovedName || '-' }}</text></view>
  9 + <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
  10 + '-'}}</text></view>
  11 + <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName ||
  12 + '-'}}</text></view>
10 13 <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
11 14 </view>
12 15 <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
13   - <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'}}</text></view>
  16 + <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName ||
  17 + '-'}}</text></view>
14 18 </view>
15 19
16 20 <view class="section1">
... ... @@ -18,12 +22,18 @@
18 22 </view>
19 23
20 24 <view class="section">
21   - <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{detail.totalAmountCapital || '-' }}</text></view>
22   - <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||'-' }}</text></view>
23   - <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements || '-' }}</text></view>
24   - <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||'-' }}</text></view>
25   - <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'}}</text></view>
26   - <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  25 + <view class="row"><text class="label">合计人民币金额(大写)</text><text
  26 + class="value">{{ detail.totalAmountCapital || '-' }}</text></view>
  27 + <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo
  28 + ||'-' }}</text></view>
  29 + <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
  30 + || '-' }}</text></view>
  31 + <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms
  32 + ||'-' }}</text></view>
  33 + <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode ||
  34 + '-'}}</text></view>
  35 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel ||
  36 + '-'
27 37 }}</text></view>
28 38 <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
29 39 detail.includesPackagingFeeName || '-' }}</text></view>
... ... @@ -33,36 +43,38 @@
33 43 detail.designatedConsignee || '-' }}</text></view>
34 44
35 45 <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
36   - '-' }}</text></view>
  46 + '-' }}</text></view>
37 47 <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
38   - || '-' }}</text></view>
  48 + || '-' }}</text></view>
39 49 <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
40 50 class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
41 51 <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
42   - || '-' }}</text></view>
  52 + || '-' }}</text></view>
43 53 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
44   - }}</text></view>
  54 + }}</text></view>
45 55 </view>
46 56
47 57 <view class="section" v-if="status === 'STANDARD'">
48   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-' }}</text></view>
49   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否' }}</text></view>
  58 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  59 + detail.standardFileName || '-' }}</text></view>
  60 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{
  61 + detail.standardStandardized ? '是' : '否' }}</text></view>
50 62 </view>
51 63
52 64 <view class="section">
53 65 <text class="row customer">具体质量要求</text>
54 66 <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
55   - '-' }}</text></view>
  67 + '-' }}</text></view>
56 68 <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
57   - }}</text></view>
  69 + }}</text></view>
58 70 <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
59   - }}</text></view>
  71 + }}</text></view>
60 72 <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
61   - }}</text></view>
  73 + }}</text></view>
62 74 <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
63   - }}</text></view>
  75 + }}</text></view>
64 76 <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
65   - }}</text></view>
  77 + }}</text></view>
66 78 </view>
67 79 </view>
68 80 </scroll-view>
... ... @@ -71,7 +83,8 @@
71 83 <view class="upload-dialog">
72 84 <view class="upload-header">
73 85 <text class="title">上传规范性合同</text>
74   - <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" @click="$refs.uploadPopup.close()" />
  86 + <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22"
  87 + @click="$refs.uploadPopup.close()" />
75 88 </view>
76 89 <view class="upload-body">
77 90 <text class="section-title">附件上传:</text>
... ... @@ -81,8 +94,8 @@
81 94 <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view>
82 95 <view class="row1" @click="openStandardizedSheet">
83 96 <view class="label1">合同是否规范</view>
84   - <uni-icons type="right" size="18" v-if="!standardStandardizedName" ></uni-icons>
85   - <view class="value" v-else >{{standardStandardizedName}}</view>
  97 + <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons>
  98 + <view class="value" v-else>{{ standardStandardizedName }}</view>
86 99 </view>
87 100 </view>
88 101 <view class="upload-footer">
... ... @@ -90,7 +103,8 @@
90 103 </view>
91 104 </view>
92 105 </uni-popup>
93   - <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onSheetConfirm" />
  106 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  107 + v-model="sheet.value" @confirm="onSheetConfirm" />
94 108
95 109 </view>
96 110 </template>
... ... @@ -150,56 +164,56 @@ export default {
150 164 standardStandardized: '',
151 165 standardStandardizedName: '',
152 166 sheet: { visible: false, title: '请选择', options: [], value: '' },
153   - buttons: [{
154   - text: '编辑',
155   - visible: true,
156   - variant: 'outline',
157   - event: 'edit',
158   - },
159   - {
160   - text: '删除',
161   - visible: true,
162   - variant: 'outline',
163   - event: 'delete',
164   - style: {
165   - color: '#D54941',
166   - border: '1px solid #D54941'
167   - }
168   - },
169   - {
170   - text: '上传合同附件',
171   - visible: true,
172   - variant: 'outline',
173   - event: 'upload'
174   - },
175   - {
176   - text: '审核',
177   - visible: true,
178   - variant: 'primary',
179   - event: 'audit'
180   - },
181   - {
182   - text: '审核详情',
183   - visible: true,
184   - variant: 'primary',
185   - event: 'auditDetail'
186   - },
187   - ],
  167 + buttons: [{
  168 + text: '编辑',
  169 + visible: true,
  170 + variant: 'outline',
  171 + event: 'edit',
  172 + },
  173 + {
  174 + text: '删除',
  175 + visible: true,
  176 + variant: 'outline',
  177 + event: 'delete',
  178 + style: {
  179 + color: '#D54941',
  180 + border: '1px solid #D54941'
  181 + }
  182 + },
  183 + {
  184 + text: '上传合同附件',
  185 + visible: true,
  186 + variant: 'outline',
  187 + event: 'upload'
  188 + },
  189 + {
  190 + text: '审核',
  191 + visible: true,
  192 + variant: 'primary',
  193 + event: 'audit'
  194 + },
  195 + {
  196 + text: '审核详情',
  197 + visible: true,
  198 + variant: 'primary',
  199 + event: 'auditDetail'
  200 + },
  201 + ],
188 202 }
189 203 },
190 204 computed: {
191   - displayButtons() {
192   - const s = this.detail && this.detail.status || ''
193   - const t = this.detail.standardApproved || ''
194   - return [
195   - { ...this.buttons[0]},
196   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
197   - { ...this.buttons[1], visible: (s === 'DRAFT') },
198   - { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') },
199   - { ...this.buttons[3], visible: (s === 'STANDARD' && t === 'AUDIT') },
200   - { ...this.buttons[4], visible: (s === 'STANDARD') }
201   - ]
202   - }
  205 + displayButtons() {
  206 + const s = this.detail && this.detail.status || ''
  207 + const t = this.detail.standardApproved || ''
  208 + const e = this.detail.standardShowExamine || false
  209 + return [
  210 + { ...this.buttons[0], visible: (s === 'DRAFT') },
  211 + { ...this.buttons[1], visible: (s === 'DRAFT') },
  212 + { ...this.buttons[2], visible: (s !== 'DELETED' && t !== 'AUDIT' && t !== 'PASS') },
  213 + { ...this.buttons[3], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  214 + { ...this.buttons[4], visible: (s === 'STANDARD') }
  215 + ]
  216 + }
203 217 },
204 218 onLoad(options) {
205 219 const id = options && options.id ? options.id : ''
... ... @@ -235,7 +249,7 @@ export default {
235 249 content: '确定提交标准合同吗?',
236 250 success: (res) => {
237 251 if (res.confirm) {
238   - uploadStandardContract({...this.detail, ...data}).then(() => {
  252 + uploadStandardContract({ ...this.detail, ...data }).then(() => {
239 253 uni.showToast({
240 254 title: '上传标准合同成功',
241 255 icon: 'success'
... ... @@ -309,8 +323,21 @@ export default {
309 323 if (e === 'edit') return this.onEdit(btn && btn.params)
310 324 if (e === 'delete') return this.onDelete(btn && btn.params)
311 325 if (e === 'upload') return this.onUpload(btn && btn.params)
312   - // if (e === 'audit') return this.onAudit(btn && btn.params)
313   - // if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  326 + if (e === 'audit') return this.onAudit(btn && btn.params)
  327 + if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
  328 + },
  329 + getBusinessId() {
  330 + return (this.detail && (this.detail.id || this.detail.code)) || ''
  331 + },
  332 + onAudit() {
  333 + const CACHE_KEY = 'sourceBusinessId'
  334 + uni.setStorageSync(CACHE_KEY, this.getBusinessId())
  335 + uni.navigateTo({ url: '/pages/flow/audit' })
  336 + },
  337 + onAuditDetail() {
  338 + const CACHE_KEY = 'sourceBusinessId'
  339 + uni.setStorageSync(CACHE_KEY, this.getBusinessId())
  340 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
314 341 },
315 342 async loadDetail() {
316 343 if (!this.id) return
... ... @@ -319,9 +346,9 @@ export default {
319 346 const data = res && res.data ? res.data : {}
320 347 const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
321 348 const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
322   - this.detail = {
323   - ...this.detail,
324   - ...data,
  349 + this.detail = {
  350 + ...this.detail,
  351 + ...data,
325 352 includesPackagingFeeName, includesTransportFeeName,
326 353 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
327 354 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
... ... @@ -358,10 +385,12 @@ export default {
358 385 background: #fff;
359 386 margin-bottom: 20rpx;
360 387 }
  388 +
361 389 .section1 {
362 390 background: #fff;
363 391 margin-bottom: 20rpx;
364 392 }
  393 +
365 394 .row {
366 395 display: flex;
367 396 margin-bottom: 20rpx;
... ... @@ -405,11 +434,13 @@ export default {
405 434 color: rgba(0, 0, 0, 0.9);
406 435 padding-bottom: 12rpx;
407 436 }
  437 +
408 438 .upload-dialog {
409 439 background: #fff;
410 440 border-top-left-radius: 16rpx;
411 441 border-top-right-radius: 16rpx;
412 442 }
  443 +
413 444 .upload-header {
414 445 display: flex;
415 446 position: relative;
... ... @@ -417,21 +448,31 @@ export default {
417 448 justify-content: center;
418 449 padding: 32rpx 32rpx;
419 450 }
  451 +
420 452 .upload-header .title {
421 453 font-size: 36rpx;
422 454 color: rgba(0, 0, 0, 0.9);
423 455 font-weight: 600;
424 456 }
425   -.upload-body {
426   - padding: 16rpx 32rpx;
  457 +
  458 +.upload-body {
  459 + padding: 16rpx 32rpx;
427 460 border-bottom: 1rpx solid #E7E7E7;
428 461 }
  462 +
429 463 .upload-body .section-title {
430 464 font-size: 32rpx;
431 465 color: rgba(0, 0, 0, 0.9);
432 466 font-weight: 600;
433 467 line-height: 48rpx;
434 468 }
435   -.upload-footer { padding: 24rpx 32rpx 48rpx; }
436   -.upload-footer .submit { background: $theme-primary; color: #fff; }
  469 +
  470 +.upload-footer {
  471 + padding: 24rpx 32rpx 48rpx;
  472 +}
  473 +
  474 +.upload-footer .submit {
  475 + background: $theme-primary;
  476 + color: #fff;
  477 +}
437 478 </style>
... ...
... ... @@ -201,18 +201,42 @@ export default {
201 201 variant: 'outline',
202 202 event: 'uploadStandard'
203 203 },
204   - // {
205   - // text: '审核',
206   - // visible: true,
207   - // variant: 'primary',
208   - // event: 'audit'
209   - // },
210   - // {
211   - // text: '审核详情',
212   - // visible: true,
213   - // variant: 'primary',
214   - // event: 'auditDetail'
215   - // },
  204 + {
  205 + text: '审核正式合同',
  206 + visible: true,
  207 + variant: 'primary',
  208 + event: 'audit1'
  209 + },
  210 + {
  211 + text: '审核正式合同',
  212 + visible: true,
  213 + variant: 'primary',
  214 + event: 'audit2'
  215 + },
  216 + {
  217 + text: '审核标准合同',
  218 + visible: true,
  219 + variant: 'primary',
  220 + event: 'audit3'
  221 + },
  222 + {
  223 + text: '正式合同审核详情',
  224 + visible: true,
  225 + variant: 'primary',
  226 + event: 'auditDetail1'
  227 + },
  228 + {
  229 + text: '正式合同审核详情',
  230 + visible: true,
  231 + variant: 'primary',
  232 + event: 'auditDetail2'
  233 + },
  234 + {
  235 + text: '标准合同审核详情',
  236 + visible: true,
  237 + variant: 'primary',
  238 + event: 'auditDetail3'
  239 + },
216 240 ],
217 241 uploadId: '',
218 242 uploadType: 'formal',
... ... @@ -220,19 +244,25 @@ export default {
220 244 },
221 245 computed: {
222 246 displayButtons() {
223   - const s = this.detail && this.detail.status || ''
224   - const t = this.detail.formalApproved || ''
225   - const l = this.detail.priceSpecLocked || ''
  247 + const s = this.detail && this.detail.status || false
  248 + const t = this.detail.formalApproved || false
  249 + const l = this.detail.priceSpecLocked || false
  250 + const a = this.detail.standardApproved || false
  251 + const e = this.detail.showExamine || false
  252 + const f = this.detail.standardShowExamine || false
226 253 return [
227   - { ...this.buttons[0]},
228   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
  254 + { ...this.buttons[0], visible: (s === 'DRAFT') },
229 255 { ...this.buttons[1], visible: (s === 'DRAFT') },
230 256 { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
231 257 { ...this.buttons[3], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
232 258 { ...this.buttons[4], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
233   - { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
234   - // { ...this.buttons[3], visible: (s === 'STANDARD' && t === 'AUDIT') },
235   - // { ...this.buttons[4], visible: (s === 'STANDARD') }
  259 + { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') },
  260 + { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT') },
  261 + { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  262 + { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT') },
  263 + { ...this.buttons[9], visible: (s === 'FORMAL' && t) },
  264 + { ...this.buttons[10], visible: (s === 'STANDARD' && t ) },
  265 + { ...this.buttons[11], visible: (s === 'STANDARD' && a ) },
236 266 ]
237 267 }
238 268 },
... ... @@ -359,6 +389,26 @@ export default {
359 389 if (e === 'upload') return this.uploadContract(this.detail.id || '')
360 390 if (e === 'uploadParent') return this.uploadContract(this.detail.parentId || '')
361 391 if (e === 'uploadStandard') return this.uploadContract(this.detail.id || '', 'standard')
  392 + if (e === 'audit1') return this.onAudit(this.detail.id || '', 'FORMAL_CONTRACT')
  393 + if (e === 'audit2') return this.onAudit(this.detail.parentId || '', 'FORMAL_CONTRACT')
  394 + if (e === 'audit3') return this.onAudit(this.detail.id || '', 'STANDARD_CONTRACT')
  395 + if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT')
  396 + if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT')
  397 + if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT')
  398 + },
  399 + onAudit(id, type) {
  400 + const CACHE_KEY = 'sourceBusinessId'
  401 + const TYPE = 'contractType'
  402 + uni.setStorageSync(TYPE, type)
  403 + uni.setStorageSync(CACHE_KEY, id)
  404 + uni.navigateTo({ url: '/pages/flow/audit' })
  405 + },
  406 + onAuditDetail(id, type) {
  407 + const CACHE_KEY = 'sourceBusinessId'
  408 + const TYPE = 'contractType'
  409 + uni.setStorageSync(TYPE, type)
  410 + uni.setStorageSync(CACHE_KEY, id)
  411 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
362 412 },
363 413 async loadDetail() {
364 414 if (!this.id) return
... ...
... ... @@ -5,14 +5,14 @@
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 7 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8   - }}</text></view>
  8 + }}</text></view>
9 9 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
10   - }}</text></view>
  10 + }}</text></view>
11 11 <view class="row"><text class="label">订货日期</text><text class="value">{{ detail.orderDate }}</text>
12 12 </view>
13 13 <view class="row"><text class="label">单位</text><text class="value">{{ detail.unit }}</text></view>
14 14 <view class="row"><text class="label">生产厂</text><text class="value">{{ detail.workshopName || '-'
15   - }}</text></view>
  15 + }}</text></view>
16 16 </view>
17 17
18 18 <view class="section1">
... ... @@ -23,14 +23,15 @@
23 23 <view class="row"><text class="label">合计人民币金额(大写)</text><text class="value">{{
24 24 detail.totalAmountCapital || '-' }}</text></view>
25 25 <view class="row"><text class="label">交付定金、数额、时间</text><text class="value">{{ detail.depositInfo ||
26   - '-' }}</text></view>
  26 + '-' }}</text></view>
27 27 <view class="row"><text class="label">包装要求</text><text class="value">{{ detail.packagingRequirements
28   - || '-' }}</text></view>
  28 + || '-' }}</text></view>
29 29 <view class="row"><text class="label">付款方式、付款期限</text><text class="value">{{ detail.paymentTerms ||
30   - '-' }}</text></view>
  30 + '-' }}</text></view>
31 31 <view class="row"><text class="label">运输方式</text><text class="value">{{ detail.transportMode || '-'
32   - }}</text></view>
33   - <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel || '-'
  32 + }}</text></view>
  33 + <view class="row"><text class="label">目的地</text><text class="value">{{ detail.destinationLabel ||
  34 + '-'
34 35 }}</text></view>
35 36 <view class="row"><text class="label">单价中是否已包含包装费</text><text class="value">{{
36 37 detail.includesPackagingFeeName || '-' }}</text></view>
... ... @@ -40,41 +41,45 @@
40 41 detail.designatedConsignee || '-' }}</text></view>
41 42
42 43 <view class="row"><text class="label">特别条款要求</text><text class="value">{{ detail.specialTermsName ||
43   - '-' }}</text></view>
  44 + '-' }}</text></view>
44 45 <view class="row"><text class="label">执行标准</text><text class="value">{{ detail.executionStandardName
45   - || '-' }}</text></view>
  46 + || '-' }}</text></view>
46 47 <view class="row" v-if="detail.executionStandard === 'OTHER'"><text class="label">其他</text><text
47 48 class="value">{{ detail.executionStandardRemarks || '-' }}</text></view>
48 49 <view class="row"><text class="label">特别说明</text><text class="value">{{ detail.specialInstructions
49   - || '-' }}</text></view>
  50 + || '-' }}</text></view>
50 51 <view class="row"><text class="label">备注</text><text class="value">{{ detail.remarks || '-'
51   - }}</text></view>
  52 + }}</text></view>
52 53 </view>
53 54
54 55 <view class="section">
55   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.standardFileName || '-'
  56 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  57 + detail.standardFileName || '-'
56 58 }}</text></view>
57   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.standardStandardized ? '是' : '否'
  59 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{
  60 + detail.standardStandardized ? '是' : '否'
58 61 }}</text></view>
59 62 </view>
60 63 <view class="section" v-if="status === 'FORMAL'">
61   - <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{ detail.formalFileName || '-' }}</text></view>
62   - <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized ? '是' : '否' }}</text></view>
  64 + <view class="row"><text class="label">规范性合同</text><text class="value" style="color: #3D48A3;">{{
  65 + detail.formalFileName || '-' }}</text></view>
  66 + <view class="row"><text class="label">合同是否规范</text><text class="value">{{ detail.formalStandardized
  67 + ? '是' : '否' }}</text></view>
63 68 </view>
64 69 <view class="section">
65 70 <text class="row customer">具体质量要求</text>
66 71 <view class="row"><text class="label">件重条头</text><text class="value">{{ detail.pieceWeightHead ||
67   - '-' }}</text></view>
  72 + '-' }}</text></view>
68 73 <view class="row"><text class="label">表面</text><text class="value">{{ detail.surface || '-'
69   - }}</text></view>
  74 + }}</text></view>
70 75 <view class="row"><text class="label">公差</text><text class="value">{{ detail.tolerance || '-'
71   - }}</text></view>
  76 + }}</text></view>
72 77 <view class="row"><text class="label">性能</text><text class="value">{{ detail.performance || '-'
73   - }}</text></view>
  78 + }}</text></view>
74 79 <view class="row"><text class="label">成分</text><text class="value">{{ detail.component || '-'
75   - }}</text></view>
  80 + }}</text></view>
76 81 <view class="row"><text class="label">包装</text><text class="value">{{ detail.packaging || '-'
77   - }}</text></view>
  82 + }}</text></view>
78 83 </view>
79 84 </view>
80 85 </scroll-view>
... ... @@ -83,7 +88,8 @@
83 88 <view class="upload-dialog">
84 89 <view class="upload-header">
85 90 <text class="title">上传规范性合同</text>
86   - <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22" @click="$refs.uploadPopup.close()" />
  91 + <uni-icons type="closeempty" style="position: absolute; right: 16px;" size="22"
  92 + @click="$refs.uploadPopup.close()" />
87 93 </view>
88 94 <view class="upload-body">
89 95 <text class="section-title">附件上传:</text>
... ... @@ -93,8 +99,8 @@
93 99 <view v-if="fileInfo && fileInfo.name" class="upload-show">{{ fileInfo.name }}</view>
94 100 <view class="row1" @click="openStandardizedSheet">
95 101 <view class="label1">合同是否规范</view>
96   - <uni-icons type="right" size="18" v-if="!standardStandardizedName" ></uni-icons>
97   - <view class="value" v-else >{{standardStandardizedName}}</view>
  102 + <uni-icons type="right" size="18" v-if="!standardStandardizedName"></uni-icons>
  103 + <view class="value" v-else>{{ standardStandardizedName }}</view>
98 104 </view>
99 105 </view>
100 106 <view class="upload-footer">
... ... @@ -102,12 +108,13 @@
102 108 </view>
103 109 </view>
104 110 </uni-popup>
105   - <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options" v-model="sheet.value" @confirm="onSheetConfirm" />
  111 + <SingleSelectSheet :visible.sync="sheet.visible" :title="sheet.title" :options="sheet.options"
  112 + v-model="sheet.value" @confirm="onSheetConfirm" />
106 113 </view>
107 114 </template>
108 115
109 116 <script>
110   -import { getContractApi, deleteContractApi,uploadFormalContract } from '@/api/contract'
  117 +import { getContractApi, deleteContractApi, uploadFormalContract } from '@/api/contract'
111 118 import ProductRel from './productRel.vue'
112 119 import DetailButtons from '@/components/detail-buttons/index.vue'
113 120 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -163,91 +170,115 @@ export default {
163 170 packaging: ''
164 171 },
165 172 productList: [],
166   - buttons: [{
167   - text: '编辑',
168   - visible: true,
169   - variant: 'outline',
170   - event: 'edit',
171   - },
172   - {
173   - text: '删除',
174   - visible: true,
175   - variant: 'outline',
176   - event: 'delete',
177   - style: {
178   - color: '#D54941',
179   - border: '1px solid #D54941'
180   - }
181   - },
182   - {
183   - text: '锁规',
184   - visible: true,
185   - variant: 'outline',
186   - event: 'lock',
187   - },
188   - {
189   - text: '锁规延期申请',
190   - visible: true,
191   - variant: 'outline',
192   - event: 'lockApply'
193   - },
194   - {
195   - text: '上传合同附件',
196   - visible: true,
197   - variant: 'outline',
198   - event: 'upload'
199   - },
200   - {
201   - text: '上传正式合同附件',
202   - visible: true,
203   - variant: 'outline',
204   - event: 'upload'
205   - },
206   - {
207   - text: '上传正式合同附件',
208   - visible: true,
209   - variant: 'outline',
210   - event: 'uploadParent'
211   - },
212   - {
213   - text: '上传标准合同附件',
214   - visible: true,
215   - variant: 'outline',
216   - event: 'uploadStandard'
217   - },
218   - // {
219   - // text: '审核',
220   - // visible: true,
221   - // variant: 'primary',
222   - // event: 'audit'
223   - // },
224   - // {
225   - // text: '审核详情',
226   - // visible: true,
227   - // variant: 'primary',
228   - // event: 'auditDetail'
229   - // },
230   - ],
  173 + buttons: [{
  174 + text: '编辑',
  175 + visible: true,
  176 + variant: 'outline',
  177 + event: 'edit',
  178 + },
  179 + {
  180 + text: '删除',
  181 + visible: true,
  182 + variant: 'outline',
  183 + event: 'delete',
  184 + style: {
  185 + color: '#D54941',
  186 + border: '1px solid #D54941'
  187 + }
  188 + },
  189 + {
  190 + text: '锁规',
  191 + visible: true,
  192 + variant: 'outline',
  193 + event: 'lock',
  194 + },
  195 + {
  196 + text: '锁规延期申请',
  197 + visible: true,
  198 + variant: 'outline',
  199 + event: 'lockApply'
  200 + },
  201 + {
  202 + text: '上传正式合同附件',
  203 + visible: true,
  204 + variant: 'outline',
  205 + event: 'upload'
  206 + },
  207 + {
  208 + text: '上传正式合同附件',
  209 + visible: true,
  210 + variant: 'outline',
  211 + event: 'uploadParent'
  212 + },
  213 + {
  214 + text: '上传标准合同附件',
  215 + visible: true,
  216 + variant: 'outline',
  217 + event: 'uploadStandard'
  218 + },
  219 + {
  220 + text: '审核正式合同',
  221 + visible: true,
  222 + variant: 'primary',
  223 + event: 'audit1'
  224 + },
  225 + {
  226 + text: '审核正式合同',
  227 + visible: true,
  228 + variant: 'primary',
  229 + event: 'audit2'
  230 + },
  231 + {
  232 + text: '审核标准合同',
  233 + visible: true,
  234 + variant: 'primary',
  235 + event: 'audit3'
  236 + },
  237 + {
  238 + text: '正式合同审核详情',
  239 + visible: true,
  240 + variant: 'primary',
  241 + event: 'auditDetail1'
  242 + },
  243 + {
  244 + text: '正式合同审核详情',
  245 + visible: true,
  246 + variant: 'primary',
  247 + event: 'auditDetail2'
  248 + },
  249 + {
  250 + text: '标准合同审核详情',
  251 + visible: true,
  252 + variant: 'primary',
  253 + event: 'auditDetail3'
  254 + },
  255 + ],
231 256 }
232 257 },
233 258 computed: {
234   - displayButtons() {
235   - const s = this.detail && this.detail.status || ''
236   - const t = this.detail.standardApproved || ''
237   - const l = this.detail.priceSpecLocked || ''
238   - return [
239   - { ...this.buttons[0]},
240   - // { ...this.buttons[0], visible: (s === 'DRAFT') },
241   - { ...this.buttons[1], visible: (s === 'DRAFT') },
242   - { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
243   - { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
244   - { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
245   - { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
246   - { ...this.buttons[6], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
247   - // { ...this.buttons[3], visible: (s === 'STANDARD' && t === 'AUDIT') },
248   - // { ...this.buttons[4], visible: (s === 'STANDARD') }
249   - ]
250   - }
  259 + displayButtons() {
  260 + const s = this.detail && this.detail.status || false
  261 + const t = this.detail.formalApproved || false
  262 + const l = this.detail.priceSpecLocked || false
  263 + const a = this.detail.standardApproved || false
  264 + const e = this.detail.showExamine || false
  265 + const f = this.detail.standardShowExamine || false
  266 + return [
  267 + { ...this.buttons[0], visible: (s === 'DRAFT') },
  268 + { ...this.buttons[1], visible: (s === 'DRAFT') },
  269 + { ...this.buttons[2], visible: (s === 'FORMAL' && !l) },
  270 + { ...this.buttons[3], visible: (s === 'FORMAL' && !l) },
  271 + { ...this.buttons[4], visible: ((s === 'DRAFT' || s === 'FORMAL') && t !== 'AUDIT' && t !== 'PASS') },
  272 + { ...this.buttons[5], visible: (s === 'STANDARD' && t !== 'AUDIT' && t !== 'PASS') },
  273 + { ...this.buttons[6], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS') },
  274 + { ...this.buttons[7], visible: (s === 'FORMAL' && e && t === 'AUDIT') },
  275 + { ...this.buttons[8], visible: (s === 'STANDARD' && e && t === 'AUDIT') },
  276 + { ...this.buttons[9], visible: (s === 'STANDARD' && f && a === 'AUDIT') },
  277 + { ...this.buttons[10], visible: (s === 'FORMAL' && t) },
  278 + { ...this.buttons[11], visible: (s === 'STANDARD' && t) },
  279 + { ...this.buttons[12], visible: (s === 'STANDARD' && a) },
  280 + ]
  281 + }
251 282 },
252 283 onLoad(options) {
253 284 const id = options && options.id ? options.id : ''
... ... @@ -293,7 +324,7 @@ export default {
293 324 url: '/pages/contract_unplan/lock_apply?id=' + this.detail.id || ''
294 325 })
295 326 },
296   - uploadContract(id, type = 'formal'){
  327 + uploadContract(id, type = 'formal') {
297 328 if (!id) return
298 329 this.uploadId = id
299 330 this.uploadType = type
... ... @@ -331,7 +362,7 @@ export default {
331 362 content: this.uploadType === 'formal' ? '确定提交正式合同吗?' : '确定提交标准合同吗?',
332 363 success: (res) => {
333 364 if (res.confirm) {
334   - api({...this.detail, ...data}).then(() => {
  365 + api({ ...this.detail, ...data }).then(() => {
335 366 uni.showToast({
336 367 title: this.uploadType === 'formal' ? '上传正式合同成功' : '上传标准合同成功',
337 368 icon: 'success'
... ... @@ -378,6 +409,26 @@ export default {
378 409 if (e === 'upload') return this.uploadContract(this.detail.id || '')
379 410 if (e === 'uploadParent') return this.uploadContract(this.detail.parentId || '')
380 411 if (e === 'uploadStandard') return this.uploadContract(this.detail.id || '', 'standard')
  412 + if (e === 'audit1') return this.onAudit(this.detail.id || '', 'FORMAL_CONTRACT')
  413 + if (e === 'audit2') return this.onAudit(this.detail.parentId || '', 'FORMAL_CONTRACT')
  414 + if (e === 'audit3') return this.onAudit(this.detail.id || '', 'STANDARD_CONTRACT')
  415 + if (e === 'auditDetail1') return this.onAuditDetail(this.detail.id || '', 'FORMAL_CONTRACT')
  416 + if (e === 'auditDetail2') return this.onAuditDetail(this.detail.parentId || '', 'FORMAL_CONTRACT')
  417 + if (e === 'auditDetail3') return this.onAuditDetail(this.detail.id || '', 'STANDARD_CONTRACT')
  418 + },
  419 + onAudit(id, type) {
  420 + const CACHE_KEY = 'sourceBusinessId'
  421 + const TYPE = 'contractType'
  422 + uni.setStorageSync(TYPE, type)
  423 + uni.setStorageSync(CACHE_KEY, id)
  424 + uni.navigateTo({ url: '/pages/flow/audit' })
  425 + },
  426 + onAuditDetail(id, type) {
  427 + const CACHE_KEY = 'sourceBusinessId'
  428 + const TYPE = 'contractType'
  429 + uni.setStorageSync(TYPE, type)
  430 + uni.setStorageSync(CACHE_KEY, id)
  431 + uni.navigateTo({ url: '/pages/flow/audit_detail' })
381 432 },
382 433 async loadDetail() {
383 434 if (!this.id) return
... ... @@ -386,9 +437,9 @@ export default {
386 437 const data = res && res.data ? res.data : {}
387 438 const includesPackagingFeeName = data.includesPackagingFeeName || (data.includesPackagingFee ? '是' : '否')
388 439 const includesTransportFeeName = data.includesTransportFeeName || (data.includesTransportFee ? '是' : '否')
389   - this.detail = {
390   - ...this.detail,
391   - ...data,
  440 + this.detail = {
  441 + ...this.detail,
  442 + ...data,
392 443 includesPackagingFeeName, includesTransportFeeName,
393 444 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
394 445 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
... ... @@ -425,6 +476,7 @@ export default {
425 476 background: #fff;
426 477 margin-bottom: 20rpx;
427 478 }
  479 +
428 480 .section1 {
429 481 background: #fff;
430 482 margin-bottom: 20rpx;
... ... @@ -459,11 +511,13 @@ export default {
459 511 color: rgba(0, 0, 0, 0.9);
460 512 padding-bottom: 12rpx;
461 513 }
  514 +
462 515 .upload-dialog {
463 516 background: #fff;
464 517 border-top-left-radius: 16rpx;
465 518 border-top-right-radius: 16rpx;
466 519 }
  520 +
467 521 .upload-header {
468 522 display: flex;
469 523 position: relative;
... ... @@ -471,23 +525,34 @@ export default {
471 525 justify-content: center;
472 526 padding: 32rpx 32rpx;
473 527 }
  528 +
474 529 .upload-header .title {
475 530 font-size: 36rpx;
476 531 color: rgba(0, 0, 0, 0.9);
477 532 font-weight: 600;
478 533 }
479   -.upload-body {
480   - padding: 16rpx 32rpx;
  534 +
  535 +.upload-body {
  536 + padding: 16rpx 32rpx;
481 537 border-bottom: 1rpx solid #E7E7E7;
482 538 }
  539 +
483 540 .upload-body .section-title {
484 541 font-size: 32rpx;
485 542 color: rgba(0, 0, 0, 0.9);
486 543 font-weight: 600;
487 544 line-height: 48rpx;
488 545 }
489   -.upload-footer { padding: 24rpx 32rpx 48rpx; }
490   -.upload-footer .submit { background: $theme-primary; color: #fff; }
  546 +
  547 +.upload-footer {
  548 + padding: 24rpx 32rpx 48rpx;
  549 +}
  550 +
  551 +.upload-footer .submit {
  552 + background: $theme-primary;
  553 + color: #fff;
  554 +}
  555 +
491 556 .row1 {
492 557 display: flex;
493 558 justify-content: space-between;
... ...
... ... @@ -148,7 +148,14 @@ export default {
148 148 computed: {
149 149 componentName() {
150 150 // sourceBusinessType 业务类型 todo 待处理--主要是合同那边使用
151   - const name = getSysFlowComponentPath(this.auditCtx.bizFlag || '')
  151 + const _contractType = uni.getStorageSync('contractType') || '';
  152 + let Name = ''
  153 + if (_contractType === 'PROCESS_STD_AGMT') {
  154 + Name = 'PROCESS_STD_AGMT'
  155 + }else{
  156 + Name = this.auditCtx.bizFlag || ''
  157 + }
  158 + const name = getSysFlowComponentPath(Name || '')
152 159 return name || ''
153 160 },
154 161 roleCodes() {
... ... @@ -180,7 +187,7 @@ export default {
180 187 // 是审核时
181 188 operateType: 'AUDIT', // 原有的第二个参数
182 189 };
183   - if (_contractType) {
  190 + if (_contractType && _contractType !== 'PROCESS_STD_AGMT') {
184 191 params.mode = _contractType;
185 192 }
186 193 getInstanceByBusinessIdApi(params).then(res => {
... ...
... ... @@ -40,7 +40,14 @@ export default {
40 40 computed: {
41 41 componentName() {
42 42 // sourceBusinessType 业务类型 todo 待处理--主要是合同那边使用
43   - const name = getSysFlowComponentPath(this.auditCtx.bizFlag || '')
  43 + const _contractType = uni.getStorageSync('contractType') || '';
  44 + let Name = ''
  45 + if (_contractType === 'PROCESS_STD_AGMT') {
  46 + Name = 'PROCESS_STD_AGMT'
  47 + }else{
  48 + Name = this.auditCtx.bizFlag || ''
  49 + }
  50 + const name = getSysFlowComponentPath(Name || '')
44 51 return name || ''
45 52 }
46 53 },
... ... @@ -56,7 +63,7 @@ export default {
56 63 // 是审核时
57 64 operateType: 'VIEW', // 原有的第二个参数
58 65 };
59   - if (_contractType) {
  66 + if (_contractType && _contractType !== 'PROCESS_STD_AGMT') {
60 67 params.mode = _contractType;
61 68 }
62 69 getInstanceByBusinessIdApi(params).then(res => {
... ...
1 1 import CustomerDevelopViewer from '@/pages/dev_manage/viewer.vue'
2 2 import CustomerCreditViewer from '@/pages/credit_manage/viewer.vue'
  3 +import StandardContractViewer from '@/components/contract-view/standardContractViewer.vue'
  4 +import FormalContractViewer from '@/components/contract-view/formalContractViewer.vue'
  5 +import ProcessStdAgmtViewer from '@/pages/contract_process/processStdAgmtViewer.vue'
3 6
4 7 export default function registerComponents(Vue) {
5 8 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
6 9 Vue.component('CustomerCreditViewer', CustomerCreditViewer)
  10 + Vue.component('StandardContractViewer', StandardContractViewer)
  11 + Vue.component('FormalContractViewer', FormalContractViewer)
  12 + Vue.component('ProcessStdAgmtViewer', ProcessStdAgmtViewer)
7 13 }
\ No newline at end of file
... ...
... ... @@ -18,19 +18,19 @@ export const getSysFlowComponentPath = (bizFlag) => {
18 18 componentPath = 'StandardContractViewer'; // 标准合同-审批详情
19 19 break;
20 20 case 'STANDARD_CONTRACT_EDIT': // 标准合同
21   - componentPath = 'StandardContractApprove'; // 标准合同-审批
  21 + componentPath = 'StandardContractViewer'; // 标准合同-审批
22 22 break;
23 23 case 'FORMAL_CONTRACT': // 正式合同
24 24 componentPath = 'FormalContractViewer'; // 正式合同-审批详情
25 25 break;
26 26 case 'FORMAL_CONTRACT_EDIT': // 正式合同
27   - componentPath = 'FormalContractApprove'; // 正式合同-审批
  27 + componentPath = 'FormalContractViewer'; // 正式合同-审批
28 28 break;
29 29 case 'PROCESS_STD_AGMT': // 处理标准合同
30 30 componentPath = 'ProcessStdAgmtViewer'; // 处理标准合同-审批
31 31 break;
32 32 case 'PROCESS_STD_AGMT_EDIT': // 处理标准合同
33   - componentPath = 'ProcessStdAgmtApprove'; // 处理标准合同-审批
  33 + componentPath = 'ProcessStdAgmtViewer'; // 处理标准合同-审批
34 34 break;
35 35 case 'SPEC_LOCK_DELAY': // 特殊锁单延迟
36 36 componentPath = 'SpecLockDelayViewer'; // 特殊锁单延迟-审批详情
... ...