Commit 4b017388975070a32e7d2cde508a014754aac220

Authored by gesilong
2 parents 0d09d791 314f4d0f

Merge branch 'cjerp-2.0-plan' into test_cjerp

@@ -165,25 +165,22 @@ export function procurementPlanChangeSubmitApi(id) { @@ -165,25 +165,22 @@ export function procurementPlanChangeSubmitApi(id) {
165 165
166 export function procurementPlanReplenishSubmitApi(id) { 166 export function procurementPlanReplenishSubmitApi(id) {
167 return request({ 167 return request({
168 - url: '/procurement/plan/replenish/submit', 168 + url: '/procurement/plan/replenish/submit?id=' + id,
169 method: 'post', 169 method: 'post',
170 - params: { id: id }  
171 }) 170 })
172 } 171 }
173 172
174 export function procurementPlanChangeCancelApi(id) { 173 export function procurementPlanChangeCancelApi(id) {
175 return request({ 174 return request({
176 - url: '/procurement/plan/change/cancel', 175 + url: '/procurement/plan/change/cancel?id=' + id,
177 method: 'post', 176 method: 'post',
178 - params: { id: id }  
179 }) 177 })
180 } 178 }
181 179
182 180
183 export function procurementPlanReplenishCancelApi(id) { 181 export function procurementPlanReplenishCancelApi(id) {
184 return request({ 182 return request({
185 - url: '/procurement/plan/replenish/cancel', 183 + url: '/procurement/plan/replenish/cancel?id=' + id,
186 method: 'post', 184 method: 'post',
187 - params: { id: id }  
188 }) 185 })
189 } 186 }
@@ -183,7 +183,7 @@ export default { @@ -183,7 +183,7 @@ export default {
183 }, 183 },
184 displayButtons() { 184 displayButtons() {
185 const status = this.form ? this.form.approvalStatus : ''; 185 const status = this.form ? this.form.approvalStatus : '';
186 - const isDraft = status === 'DRAFT'; 186 + const isDraft = !status;
187 const isAudit = status === 'AUDIT'; 187 const isAudit = status === 'AUDIT';
188 const isPass = status === 'PASS'; 188 const isPass = status === 'PASS';
189 const isRefuse = status === 'REFUSE'; 189 const isRefuse = status === 'REFUSE';
@@ -50,15 +50,9 @@ @@ -50,15 +50,9 @@
50 </template> 50 </template>
51 </uni-list-item> 51 </uni-list-item>
52 52
53 - <uni-list-item>  
54 - <template v-slot:body>  
55 - <view class="item-title">  
56 - <text class="required" v-if="canEdit">*</text><text>日期</text>  
57 - </view>  
58 - </template> 53 + <uni-list-item title="日期">
59 <template v-slot:footer> 54 <template v-slot:footer>
60 - <uni-datetime-picker v-if="canEdit" type="date" v-model="form.date" return-type="string" />  
61 - <uni-easyinput v-else :value="formatDateOnly(form.date)" :inputBorder="false" disabled placeholder="-" /> 55 + <uni-easyinput :value="formatDateOnly(form.date)" :inputBorder="false" disabled placeholder="-" />
62 </template> 56 </template>
63 </uni-list-item> 57 </uni-list-item>
64 58
@@ -191,9 +185,20 @@ @@ -191,9 +185,20 @@
191 </template> 185 </template>
192 </uni-list-item> 186 </uni-list-item>
193 187
194 - <uni-list-item title="开票品名"> 188 + <uni-list-item>
  189 + <template v-slot:body>
  190 + <view class="item-title">
  191 + <text class="required" v-if="canEdit">*</text><text>开票品名</text>
  192 + </view>
  193 + </template>
195 <template v-slot:footer> 194 <template v-slot:footer>
196 - <uni-easyinput :value="form.invoiceProductName" :inputBorder="false" disabled placeholder="-" /> 195 + <uni-easyinput
  196 + v-if="canEdit"
  197 + v-model="form.invoiceProductName"
  198 + :inputBorder="false"
  199 + placeholder="请输入开票品名"
  200 + />
  201 + <uni-easyinput v-else :value="form.invoiceProductName" :inputBorder="false" disabled placeholder="-" />
197 </template> 202 </template>
198 </uni-list-item> 203 </uni-list-item>
199 204
@@ -215,20 +220,8 @@ @@ -215,20 +220,8 @@
215 </template> 220 </template>
216 </uni-list-item> 221 </uni-list-item>
217 222
218 - <uni-list-item  
219 - class="select-item"  
220 - :class="(form.priceTableId || form.priceTableCode) ? 'is-filled' : 'is-empty'"  
221 - :clickable="canEdit"  
222 - :rightText="canEdit ? (priceTableCodeLabel || '请选择价格表编号') : ''"  
223 - :showArrow="canEdit"  
224 - @click="canEdit ? openPriceTableSheet() : undefined"  
225 - >  
226 - <template v-slot:body>  
227 - <view class="item-title">  
228 - <text class="required" v-if="canEdit">*</text><text>价格表编号</text>  
229 - </view>  
230 - </template>  
231 - <template v-if="!canEdit" v-slot:footer> 223 + <uni-list-item title="价格表编号">
  224 + <template v-slot:footer>
232 <uni-easyinput :value="priceTableDisplay === '-' ? '' : priceTableDisplay" :inputBorder="false" disabled placeholder="-" /> 225 <uni-easyinput :value="priceTableDisplay === '-' ? '' : priceTableDisplay" :inputBorder="false" disabled placeholder="-" />
233 </template> 226 </template>
234 </uni-list-item> 227 </uni-list-item>
@@ -298,16 +291,7 @@ @@ -298,16 +291,7 @@
298 </uni-list-item> 291 </uni-list-item>
299 <uni-list-item title="价格表价格"> 292 <uni-list-item title="价格表价格">
300 <template v-slot:footer> 293 <template v-slot:footer>
301 - <uni-easyinput  
302 - v-if="canEdit"  
303 - v-model="line.priceListPrices"  
304 - type="digit"  
305 - :inputBorder="false"  
306 - placeholder="请输入价格表价格"  
307 - @input="onLinePriceInput(idx, $event)"  
308 - @blur="onLinePriceBlur(idx)"  
309 - />  
310 - <uni-easyinput v-else :value="lineNumberDisplay(line.priceListPrices)" :inputBorder="false" disabled placeholder="-" /> 294 + <uni-easyinput :value="lineNumberDisplay(line.priceListPrices)" :inputBorder="false" disabled placeholder="-" />
311 </template> 295 </template>
312 </uni-list-item> 296 </uni-list-item>
313 <uni-list-item title="协调幅度"> 297 <uni-list-item title="协调幅度">
@@ -1341,18 +1325,16 @@ export default { @@ -1341,18 +1325,16 @@ export default {
1341 return v === true ? 'true' : 'false' 1325 return v === true ? 'true' : 'false'
1342 }, 1326 },
1343 checkForm() { 1327 checkForm() {
1344 - if (!this.canEdit) return true  
1345 - if (!this.form.companyId) {  
1346 - uni.showToast({ title: '请选择公司名称', icon: 'none' })  
1347 - return false  
1348 - }  
1349 - if (!this.form.date) {  
1350 - uni.showToast({ title: '请选择日期', icon: 'none' })  
1351 - return false  
1352 - }  
1353 - if (!this.form.priceTableId) {  
1354 - uni.showToast({ title: '请选择价格表编号', icon: 'none' })  
1355 - return false 1328 + if (!this.canEdit && !this.canEditWorkshop) return true
  1329 + if (this.canEdit) {
  1330 + if (!this.form.companyId && !this.form.companyShortId) {
  1331 + uni.showToast({ title: '请选择公司名称', icon: 'none' })
  1332 + return false
  1333 + }
  1334 + if (!this.form.invoiceProductName) {
  1335 + uni.showToast({ title: '请输入开票品名', icon: 'none' })
  1336 + return false
  1337 + }
1356 } 1338 }
1357 if (this.canEditWorkshop) { 1339 if (this.canEditWorkshop) {
1358 var list = Array.isArray(this.lineList) ? this.lineList : [] 1340 var list = Array.isArray(this.lineList) ? this.lineList : []
@@ -1450,9 +1432,15 @@ export default { @@ -1450,9 +1432,15 @@ export default {
1450 .edit-list, 1432 .edit-list,
1451 .edit-line-list { 1433 .edit-line-list {
1452 margin-bottom: 20rpx; 1434 margin-bottom: 20rpx;
  1435 + background: #fff;
1453 } 1436 }
1454 .edit-line-block { 1437 .edit-line-block {
1455 margin-bottom: 20rpx; 1438 margin-bottom: 20rpx;
  1439 + background: #fff;
  1440 + padding-bottom: 4rpx;
  1441 + .line-title {
  1442 + padding: 20rpx 32rpx 0;
  1443 + }
1456 &:last-child { 1444 &:last-child {
1457 margin-bottom: 0; 1445 margin-bottom: 0;
1458 } 1446 }
@@ -1462,6 +1450,7 @@ export default { @@ -1462,6 +1450,7 @@ export default {
1462 align-items: center; 1450 align-items: center;
1463 padding: 24rpx 32rpx 12rpx; 1451 padding: 24rpx 32rpx 12rpx;
1464 background-color: #ffffff; 1452 background-color: #ffffff;
  1453 + margin-top: 20rpx;
1465 .title-header_icon { 1454 .title-header_icon {
1466 width: 36rpx; 1455 width: 36rpx;
1467 height: 36rpx; 1456 height: 36rpx;
@@ -1626,51 +1615,87 @@ export default { @@ -1626,51 +1615,87 @@ export default {
1626 } 1615 }
1627 ::v-deep .edit-list, 1616 ::v-deep .edit-list,
1628 ::v-deep .edit-line-block .uni-list { 1617 ::v-deep .edit-line-block .uni-list {
1629 - background: transparent;  
1630 - .uni-list-item__container {  
1631 - padding: 32rpx; 1618 + background: #fff;
  1619 + .uni-list-item {
  1620 + min-height: 104rpx;
  1621 + &:last-child {
  1622 + .uni-list-item__container::after { display: none; }
  1623 + }
  1624 + .uni-list-item__container {
  1625 + padding: 0 32rpx;
  1626 + min-height: 104rpx;
  1627 + position: relative;
  1628 + &::after {
  1629 + content: '';
  1630 + position: absolute;
  1631 + left: 32rpx;
  1632 + right: 0;
  1633 + bottom: 0;
  1634 + height: 1rpx;
  1635 + background: #f0f0f0;
  1636 + transform: scaleY(0.5);
  1637 + }
  1638 + }
1632 } 1639 }
1633 } 1640 }
1634 ::v-deep .uni-list { 1641 ::v-deep .uni-list {
  1642 + background: #fff;
1635 .uni-easyinput { 1643 .uni-easyinput {
1636 display: flex; 1644 display: flex;
1637 - .uni-input-input {  
1638 - color: rgba(0, 0, 0, 0.9); 1645 + min-height: 72rpx;
  1646 + background: transparent;
  1647 + &.is-disabled {
  1648 + opacity: 0.6;
  1649 + }
  1650 + .uni-easyinput__content {
  1651 + border: none !important;
  1652 + background: transparent !important;
  1653 + padding: 0 !important;
  1654 + min-height: 72rpx;
  1655 + .uni-easyinput__content-input {
  1656 + padding-left: 0 !important;
  1657 + padding-right: 0 !important;
  1658 + height: 72rpx;
  1659 + line-height: 72rpx;
  1660 + font-size: 28rpx;
  1661 + color: rgba(0, 0, 0, 0.9);
  1662 + }
  1663 + .uni-easyinput__placeholder-class {
  1664 + font-size: 28rpx;
  1665 + color: rgba(0, 0, 0, 0.4);
  1666 + }
  1667 + .content-clear-icon {
  1668 + font-size: 36rpx !important;
  1669 + }
1639 } 1670 }
1640 } 1671 }
1641 .uni-input-placeholder { 1672 .uni-input-placeholder {
1642 z-index: 1; 1673 z-index: 1;
  1674 + font-size: 28rpx;
1643 } 1675 }
1644 .uni-input-input { 1676 .uni-input-input {
1645 - background-color: #ffffff; 1677 + background-color: transparent;
  1678 + font-size: 28rpx;
1646 } 1679 }
1647 - background: transparent;  
1648 &-item { 1680 &-item {
  1681 + background: #fff;
1649 &__extra-text { 1682 &__extra-text {
1650 - font-size: 32rpx; 1683 + font-size: 28rpx;
  1684 + max-width: 380rpx;
1651 } 1685 }
1652 &__content-title { 1686 &__content-title {
1653 - font-size: 32rpx;  
1654 - color: rgba(0, 0, 0, 0.9); 1687 + font-size: 28rpx;
  1688 + color: rgba(0, 0, 0, 0.6);
1655 } 1689 }
1656 &__container { 1690 &__container {
1657 - .uni-easyinput {  
1658 - &__placeholder-class {  
1659 - font-size: 32rpx;  
1660 - color: rgba(0, 0, 0, 0.4);  
1661 - }  
1662 - &__content { 1691 + .uni-datetime-picker {
  1692 + font-size: 28rpx;
  1693 + .uni-datetime-picker__btn {
  1694 + padding: 0;
1663 border: none; 1695 border: none;
1664 - background-color: #ffffff !important;  
1665 - &-input {  
1666 - padding-left: 0 !important;  
1667 - height: 48rpx;  
1668 - line-height: 48rpx;  
1669 - font-size: 32rpx;  
1670 - }  
1671 - .content-clear-icon {  
1672 - font-size: 44rpx !important;  
1673 - } 1696 + background: transparent;
  1697 + font-size: 28rpx;
  1698 + color: rgba(0, 0, 0, 0.9);
1674 } 1699 }
1675 } 1700 }
1676 .item-title, 1701 .item-title,
@@ -1678,17 +1703,18 @@ export default { @@ -1678,17 +1703,18 @@ export default {
1678 flex: none; 1703 flex: none;
1679 min-height: 48rpx; 1704 min-height: 48rpx;
1680 line-height: 48rpx; 1705 line-height: 48rpx;
1681 - font-size: 32rpx; 1706 + font-size: 28rpx;
1682 position: relative; 1707 position: relative;
1683 - width: 240rpx;  
1684 - margin-right: 32rpx;  
1685 - color: rgba(0, 0, 0, 0.9); 1708 + width: 220rpx;
  1709 + margin-right: 24rpx;
  1710 + color: rgba(0, 0, 0, 0.6);
1686 .required { 1711 .required {
1687 - color: red; 1712 + color: #D54941;
1688 position: absolute; 1713 position: absolute;
1689 top: 50%; 1714 top: 50%;
1690 transform: translateY(-50%); 1715 transform: translateY(-50%);
1691 left: -16rpx; 1716 left: -16rpx;
  1717 + font-size: 28rpx;
1692 } 1718 }
1693 } 1719 }
1694 } 1720 }
@@ -1696,23 +1722,26 @@ export default { @@ -1696,23 +1722,26 @@ export default {
1696 &.is-empty { 1722 &.is-empty {
1697 .uni-list-item__extra-text { 1723 .uni-list-item__extra-text {
1698 color: rgba(0, 0, 0, 0.4) !important; 1724 color: rgba(0, 0, 0, 0.4) !important;
  1725 + font-size: 28rpx;
1699 } 1726 }
1700 } 1727 }
1701 &.is-filled { 1728 &.is-filled {
1702 .uni-list-item__extra-text { 1729 .uni-list-item__extra-text {
1703 color: rgba(0, 0, 0, 0.9) !important; 1730 color: rgba(0, 0, 0, 0.9) !important;
  1731 + font-size: 28rpx;
1704 } 1732 }
1705 } 1733 }
1706 .serial-number-row { 1734 .serial-number-row {
1707 display: flex; 1735 display: flex;
1708 align-items: center; 1736 align-items: center;
  1737 + font-size: 28rpx;
1709 } 1738 }
1710 } 1739 }
1711 } 1740 }
1712 } 1741 }
1713 .readonly-text { 1742 .readonly-text {
1714 color: rgba(0, 0, 0, 0.9); 1743 color: rgba(0, 0, 0, 0.9);
1715 - font-size: 32rpx; 1744 + font-size: 28rpx;
1716 line-height: 48rpx; 1745 line-height: 48rpx;
1717 text-align: right; 1746 text-align: right;
1718 white-space: pre-wrap; 1747 white-space: pre-wrap;
@@ -1721,6 +1750,9 @@ export default { @@ -1721,6 +1750,9 @@ export default {
1721 .value-code { 1750 .value-code {
1722 width: 260rpx; 1751 width: 260rpx;
1723 text-align: left; 1752 text-align: left;
  1753 + color: $theme-primary;
  1754 + font-weight: 600;
  1755 + font-size: 30rpx;
1724 } 1756 }
1725 .material-condition-section, 1757 .material-condition-section,
1726 .remark-section { 1758 .remark-section {
@@ -1759,11 +1791,11 @@ export default { @@ -1759,11 +1791,11 @@ export default {
1759 margin-bottom: 0; 1791 margin-bottom: 0;
1760 } 1792 }
1761 .form-label { 1793 .form-label {
1762 - font-size: 32rpx;  
1763 - color: rgba(0, 0, 0, 0.9); 1794 + font-size: 28rpx;
  1795 + color: rgba(0, 0, 0, 0.6);
1764 } 1796 }
1765 .form-value { 1797 .form-value {
1766 - font-size: 32rpx; 1798 + font-size: 28rpx;
1767 color: rgba(0, 0, 0, 0.9); 1799 color: rgba(0, 0, 0, 0.9);
1768 text-align: right; 1800 text-align: right;
1769 } 1801 }
@@ -141,7 +141,7 @@ @@ -141,7 +141,7 @@
141 141
142 <uni-list-item title="另付运费"> 142 <uni-list-item title="另付运费">
143 <template v-slot:footer> 143 <template v-slot:footer>
144 - <uni-easyinput v-model="shippingCostDisplay" :inputBorder="false" disabled placeholder="-" /> 144 + <uni-easyinput v-model="detail.shippingCost" :inputBorder="false" disabled placeholder="-" />
145 </template> 145 </template>
146 </uni-list-item> 146 </uni-list-item>
147 147
@@ -938,7 +938,7 @@ export default { @@ -938,7 +938,7 @@ export default {
938 } catch (e) {} 938 } catch (e) {}
939 var self = this 939 var self = this
940 setTimeout(function () { 940 setTimeout(function () {
941 - uni.navigateTo({ url: '/pages/schedule-plan/index' }) 941 + uni.navigateTo({ url: '/pages/supple-plan/index' })
942 }, 400) 942 }, 400)
943 } catch (e) { 943 } catch (e) {
944 uni.showToast({ title: (e && (e.msg || e.message)) ? (e.msg || e.message) : '保存失败', icon: 'none' }) 944 uni.showToast({ title: (e && (e.msg || e.message)) ? (e.msg || e.message) : '保存失败', icon: 'none' })
@@ -184,17 +184,17 @@ export default { @@ -184,17 +184,17 @@ export default {
184 }, 184 },
185 displayButtons() { 185 displayButtons() {
186 const status = this.form ? this.form.approvalStatus : ''; 186 const status = this.form ? this.form.approvalStatus : '';
187 - const isDraft = status === 'DRAFT'; 187 + const isDraft = !status;
188 const isAudit = status === 'AUDIT'; 188 const isAudit = status === 'AUDIT';
189 const isPass = status === 'PASS'; 189 const isPass = status === 'PASS';
190 const isRefuse = status === 'REFUSE'; 190 const isRefuse = status === 'REFUSE';
191 const canExamine = isAudit && this.form && this.form.showExamine === true; 191 const canExamine = isAudit && this.form && this.form.showExamine === true;
192 return [ 192 return [
193 - { ...this.buttons[0], visible: ((isDraft || isRefuse) && this.investigatorId === this.form.initiatorId && this.$auth.hasPermi('plan-manage:supple-plan:modify')) },  
194 - { ...this.buttons[1], visible: ((isDraft || isRefuse) && this.investigatorId === this.form.initiatorId && this.$auth.hasPermi('plan-manage:supple-plan:initiate')) }, 193 + { ...this.buttons[0], visible: ((isDraft || isRefuse) && this.investigatorId === this.form.createById && this.$auth.hasPermi('plan-manage:supple-plan:modify')) },
  194 + { ...this.buttons[1], visible: ((isDraft || isRefuse) && this.investigatorId === this.form.createById && this.$auth.hasPermi('plan-manage:supple-plan:initiate')) },
195 { ...this.buttons[2], visible: (isRefuse && this.$auth.hasPermi('plan-manage:supple-plan:cancel')) }, 195 { ...this.buttons[2], visible: (isRefuse && this.$auth.hasPermi('plan-manage:supple-plan:cancel')) },
196 { ...this.buttons[3], visible: (canExamine && this.$auth.hasPermi('plan-manage:supple-plan:approve')) }, 196 { ...this.buttons[3], visible: (canExamine && this.$auth.hasPermi('plan-manage:supple-plan:approve')) },
197 - { ...this.buttons[4], visible: ((isAudit || isPass) && this.form.showExamine && this.$auth.hasPermi('plan-manage:supple-plan:view')) }, 197 + { ...this.buttons[4], visible: ((isAudit || isPass) && this.form.showExamineDetail && this.$auth.hasPermi('plan-manage:supple-plan:view')) },
198 ] 198 ]
199 } 199 }
200 }, 200 },
@@ -349,7 +349,7 @@ export default { @@ -349,7 +349,7 @@ export default {
349 } 349 }
350 }) 350 })
351 this.form = d 351 this.form = d
352 - var lines = d.lines || d.procurementPlanLineList || d.lineList || [] 352 + var lines = d.procurementPlanReplenishLineList || []
353 this.lineList = Array.isArray(lines) ? lines : [] 353 this.lineList = Array.isArray(lines) ? lines : []
354 this.buildAttachmentList() 354 this.buildAttachmentList()
355 } catch (e) { 355 } catch (e) {
@@ -429,7 +429,7 @@ export default { @@ -429,7 +429,7 @@ export default {
429 if (!id) return 429 if (!id) return
430 const CACHE_KEY = 'sourceBusinessId' 430 const CACHE_KEY = 'sourceBusinessId'
431 const TYPE = 'contractType' 431 const TYPE = 'contractType'
432 - uni.setStorageSync(TYPE, 'PLAN_CHANGE') 432 + uni.setStorageSync(TYPE, 'PLAN_REPLENISH')
433 uni.setStorageSync(CACHE_KEY, id) 433 uni.setStorageSync(CACHE_KEY, id)
434 uni.navigateTo({ url: '/pages/flow/audit' }) 434 uni.navigateTo({ url: '/pages/flow/audit' })
435 }, 435 },
@@ -438,7 +438,7 @@ export default { @@ -438,7 +438,7 @@ export default {
438 if (!id) return 438 if (!id) return
439 const CACHE_KEY = 'sourceBusinessId' 439 const CACHE_KEY = 'sourceBusinessId'
440 const TYPE = 'contractType' 440 const TYPE = 'contractType'
441 - uni.setStorageSync(TYPE, 'PLAN_CHANGE') 441 + uni.setStorageSync(TYPE, 'PLAN_REPLENISH')
442 uni.setStorageSync(CACHE_KEY, id) 442 uni.setStorageSync(CACHE_KEY, id)
443 uni.navigateTo({ url: '/pages/flow/audit_detail' }) 443 uni.navigateTo({ url: '/pages/flow/audit_detail' })
444 }, 444 },
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 143
144 <uni-list-item title="另付运费"> 144 <uni-list-item title="另付运费">
145 <template v-slot:footer> 145 <template v-slot:footer>
146 - <uni-easyinput v-model="shippingCostDisplay" :inputBorder="false" disabled placeholder="-" /> 146 + <uni-easyinput v-model="detail.shippingCost" :inputBorder="false" placeholder="-" />
147 </template> 147 </template>
148 </uni-list-item> 148 </uni-list-item>
149 149
@@ -504,7 +504,7 @@ export default { @@ -504,7 +504,7 @@ export default {
504 this.detail = d 504 this.detail = d
505 this.form.planId = d.procurementPlanId != null ? d.procurementPlanId : (d.planId != null ? d.planId : (d.id || '')) 505 this.form.planId = d.procurementPlanId != null ? d.procurementPlanId : (d.planId != null ? d.planId : (d.id || ''))
506 this.form.planCode = d.procurementPlanCode != null ? d.procurementPlanCode : (d.planCode != null ? d.planCode : d.code) 506 this.form.planCode = d.procurementPlanCode != null ? d.procurementPlanCode : (d.planCode != null ? d.planCode : d.code)
507 - var lines = d.lines || d.procurementPlanLineList || d.lineList || [] 507 + var lines = d.procurementPlanReplenishLineList || []
508 this.lineList = Array.isArray(lines) ? lines.slice() : [] 508 this.lineList = Array.isArray(lines) ? lines.slice() : []
509 this.buildAttachmentList() 509 this.buildAttachmentList()
510 this.fillLineNames() 510 this.fillLineNames()
@@ -588,7 +588,7 @@ export default { @@ -588,7 +588,7 @@ export default {
588 extractPriceLines(priceDetail) { 588 extractPriceLines(priceDetail) {
589 if (!priceDetail || typeof priceDetail !== 'object') return [] 589 if (!priceDetail || typeof priceDetail !== 'object') return []
590 var candidates = [ 590 var candidates = [
591 - priceDetail.procurementPriceLineList, 591 + priceDetail.procurementPlanReplenishLineList,
592 priceDetail.priceSubTableList, 592 priceDetail.priceSubTableList,
593 priceDetail.priceLineList, 593 priceDetail.priceLineList,
594 priceDetail.priceList, 594 priceDetail.priceList,
@@ -869,7 +869,7 @@ export default { @@ -869,7 +869,7 @@ export default {
869 totalQuantity: d.totalQuantity != null ? String(d.totalQuantity) : '', 869 totalQuantity: d.totalQuantity != null ? String(d.totalQuantity) : '',
870 remark: d.remark != null ? String(d.remark) : '', 870 remark: d.remark != null ? String(d.remark) : '',
871 materialConditionEnabled: this.boolToStr(d.materialConditionEnabled), 871 materialConditionEnabled: this.boolToStr(d.materialConditionEnabled),
872 - lines: lineList 872 + procurementPlanReplenishLineList: lineList
873 } 873 }
874 this.materialConditionConfigs.forEach(function (mc) { 874 this.materialConditionConfigs.forEach(function (mc) {
875 body[mc.field] = self.joinStr(d[mc.field]) 875 body[mc.field] = self.joinStr(d[mc.field])
@@ -887,7 +887,7 @@ export default { @@ -887,7 +887,7 @@ export default {
887 } catch (e) {} 887 } catch (e) {}
888 var self = this 888 var self = this
889 setTimeout(function () { 889 setTimeout(function () {
890 - uni.navigateTo({ url: '/pages/schedule-plan/index' }) 890 + uni.navigateTo({ url: '/pages/supple-plan/index' })
891 }, 400) 891 }, 400)
892 } catch (e) { 892 } catch (e) {
893 uni.showToast({ title: (e && (e.msg || e.message)) ? (e.msg || e.message) : '保存失败', icon: 'none' }) 893 uni.showToast({ title: (e && (e.msg || e.message)) ? (e.msg || e.message) : '保存失败', icon: 'none' })
@@ -12,6 +12,18 @@ @@ -12,6 +12,18 @@
12 <view v-for="(item, idx) in items" :key="item._key || idx" class="block"> 12 <view v-for="(item, idx) in items" :key="item._key || idx" class="block">
13 <uni-list v-show="!item.collapsed"> 13 <uni-list v-show="!item.collapsed">
14 <uni-list-item 14 <uni-list-item
  15 + v-if="mode === 'view'"
  16 + :class="['select-item', item.productName ? 'is-filled' : 'is-empty']"
  17 + :rightText="item.productName || '-'"
  18 + >
  19 + <template v-slot:body>
  20 + <view class="item-title">
  21 + <text class="required">*</text><text>品种</text>
  22 + </view>
  23 + </template>
  24 + </uni-list-item>
  25 + <uni-list-item
  26 + v-else
15 class="select-item" 27 class="select-item"
16 :class="item.productName ? 'is-filled' : 'is-empty'" 28 :class="item.productName ? 'is-filled' : 'is-empty'"
17 clickable 29 clickable
@@ -31,7 +43,8 @@ @@ -31,7 +43,8 @@
31 <view class="item-title"><text>料型</text></view> 43 <view class="item-title"><text>料型</text></view>
32 </template> 44 </template>
33 <template v-slot:footer> 45 <template v-slot:footer>
34 - <uni-easyinput v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" /> 46 + <text v-if="mode === 'view'" class="lock-value">{{ safeText(item.materialType) }}</text>
  47 + <uni-easyinput v-else v-model="item.materialType" :inputBorder="false" placeholder="请输入料型" />
35 </template> 48 </template>
36 </uni-list-item> 49 </uni-list-item>
37 50
@@ -42,7 +55,9 @@ @@ -42,7 +55,9 @@
42 </view> 55 </view>
43 </template> 56 </template>
44 <template v-slot:footer> 57 <template v-slot:footer>
  58 + <text v-if="mode === 'view'" class="lock-value">{{ formatTextNumber(item.quantity) }}</text>
45 <uni-easyinput 59 <uni-easyinput
  60 + v-else
46 v-model="item.quantity" 61 v-model="item.quantity"
47 type="digit" 62 type="digit"
48 :inputBorder="false" 63 :inputBorder="false"
@@ -61,7 +76,9 @@ @@ -61,7 +76,9 @@
61 </view> 76 </view>
62 </template> 77 </template>
63 <template v-slot:footer> 78 <template v-slot:footer>
  79 + <text v-if="mode === 'view'" class="lock-value">{{ formatTextNumber(item.actualPurchasePrice) }}</text>
64 <uni-easyinput 80 <uni-easyinput
  81 + v-else
65 v-model="item.actualPurchasePrice" 82 v-model="item.actualPurchasePrice"
66 type="digit" 83 type="digit"
67 :inputBorder="false" 84 :inputBorder="false"
@@ -96,7 +113,9 @@ @@ -96,7 +113,9 @@
96 <view class="item-title"><text>申请损耗(%)</text></view> 113 <view class="item-title"><text>申请损耗(%)</text></view>
97 </template> 114 </template>
98 <template v-slot:footer> 115 <template v-slot:footer>
  116 + <text v-if="mode === 'view'" class="lock-value">{{ formatTextNumber(item.applicationAttrition) }}</text>
99 <uni-easyinput 117 <uni-easyinput
  118 + v-else
100 v-model="item.applicationAttrition" 119 v-model="item.applicationAttrition"
101 type="digit" 120 type="digit"
102 :inputBorder="false" 121 :inputBorder="false"
@@ -113,7 +132,9 @@ @@ -113,7 +132,9 @@
113 <view class="item-title"><text>漆损率(%)</text></view> 132 <view class="item-title"><text>漆损率(%)</text></view>
114 </template> 133 </template>
115 <template v-slot:footer> 134 <template v-slot:footer>
  135 + <text v-if="mode === 'view'" class="lock-value">{{ formatTextNumber(item.paintDamageRatio) }}</text>
116 <uni-easyinput 136 <uni-easyinput
  137 + v-else
117 v-model="item.paintDamageRatio" 138 v-model="item.paintDamageRatio"
118 type="digit" 139 type="digit"
119 :inputBorder="false" 140 :inputBorder="false"
@@ -131,6 +152,16 @@ @@ -131,6 +152,16 @@
131 </uni-list-item> 152 </uni-list-item>
132 153
133 <uni-list-item 154 <uni-list-item
  155 + v-if="mode === 'view'"
  156 + :class="['select-item', item.workshopName ? 'is-filled' : 'is-empty']"
  157 + :rightText="item.workshopName || '-'"
  158 + >
  159 + <template v-slot:body>
  160 + <view class="item-title"><text>分厂</text></view>
  161 + </template>
  162 + </uni-list-item>
  163 + <uni-list-item
  164 + v-else
134 class="select-item" 165 class="select-item"
135 :class="item.workshopName ? 'is-filled' : 'is-empty'" 166 :class="item.workshopName ? 'is-filled' : 'is-empty'"
136 clickable 167 clickable
@@ -144,7 +175,7 @@ @@ -144,7 +175,7 @@
144 </uni-list-item> 175 </uni-list-item>
145 </uni-list> 176 </uni-list>
146 177
147 - <uni-list v-show="item.collapsed"> 178 + <uni-list v-show="item.collapsed && mode !== 'view'">
148 <uni-list-item 179 <uni-list-item
149 class="select-item" 180 class="select-item"
150 :class="item.productName ? 'is-filled' : 'is-empty'" 181 :class="item.productName ? 'is-filled' : 'is-empty'"
@@ -161,7 +192,7 @@ @@ -161,7 +192,7 @@
161 </uni-list-item> 192 </uni-list-item>
162 </uni-list> 193 </uni-list>
163 194
164 - <view class="block-ops"> 195 + <view v-if="mode !== 'view'" class="block-ops">
165 <div class="del" @click="onRemove(idx)"> 196 <div class="del" @click="onRemove(idx)">
166 <image src="/static/images/delete.png" class="icon" /> 197 <image src="/static/images/delete.png" class="icon" />
167 删除 198 删除
@@ -258,6 +289,12 @@ export default { @@ -258,6 +289,12 @@ export default {
258 }) 289 })
259 }, 290 },
260 immediate: false 291 immediate: false
  292 + },
  293 + shippingCost: {
  294 + handler() {
  295 + this.recalcAllItems()
  296 + },
  297 + immediate: false
261 } 298 }
262 }, 299 },
263 created() { 300 created() {
@@ -610,7 +647,7 @@ export default { @@ -610,7 +647,7 @@ export default {
610 if (v == null || v === '') return '-' 647 if (v == null || v === '') return '-'
611 var n = Number(v) 648 var n = Number(v)
612 if (isNaN(n)) return String(v) 649 if (isNaN(n)) return String(v)
613 - return n.toLocaleString('zh-CN', { maximumFractionDigits: 4 }) 650 + return n
614 }, 651 },
615 validate() { 652 validate() {
616 var items = this.items || [] 653 var items = this.items || []
  1 +<template>
  2 + <view class="detail-page">
  3 + <scroll-view class="scroll" scroll-y>
  4 + <template v-if="isEditLayout">
  5 + <uni-list class="edit-list">
  6 + <uni-list-item class="select-item is-filled">
  7 + <template v-slot:body>
  8 + <view class="item-title"><text>编号</text></view>
  9 + </template>
  10 + <template v-slot:footer>
  11 + <view class="serial-number-row">
  12 + <text class="readonly-text value-code">{{ safeText(form.code) }}</text>
  13 + </view>
  14 + </template>
  15 + </uni-list-item>
  16 +
  17 + <uni-list-item
  18 + class="select-item"
  19 + :class="(form.companyShortName || form.companyName) ? 'is-filled' : 'is-empty'"
  20 + :clickable="canEdit"
  21 + :rightText="canEdit ? (form.companyShortName || form.companyName || '请选择公司名称') : ''"
  22 + :showArrow="canEdit"
  23 + @click="canEdit ? openCompanySheet() : undefined"
  24 + >
  25 + <template v-slot:body>
  26 + <view class="item-title">
  27 + <text class="required" v-if="canEdit">*</text><text>公司名称</text>
  28 + </view>
  29 + </template>
  30 + <template v-if="!canEdit" v-slot:footer>
  31 + <uni-easyinput :value="form.companyShortName || form.companyName" :inputBorder="false" disabled placeholder="-" />
  32 + </template>
  33 + </uni-list-item>
  34 +
  35 + <uni-list-item title="供应商名称">
  36 + <template v-slot:footer>
  37 + <uni-easyinput :value="form.supplierName" :inputBorder="false" disabled placeholder="-" />
  38 + </template>
  39 + </uni-list-item>
  40 +
  41 + <uni-list-item title="采购处">
  42 + <template v-slot:footer>
  43 + <uni-easyinput :value="purchaseDepartmentDisplay" :inputBorder="false" disabled placeholder="-" />
  44 + </template>
  45 + </uni-list-item>
  46 +
  47 + <uni-list-item title="区域">
  48 + <template v-slot:footer>
  49 + <uni-easyinput :value="regionDisplay" :inputBorder="false" disabled placeholder="-" />
  50 + </template>
  51 + </uni-list-item>
  52 +
  53 + <uni-list-item title="日期">
  54 + <template v-slot:footer>
  55 + <uni-easyinput :value="formatDateOnly(form.date)" :inputBorder="false" disabled placeholder="-" />
  56 + </template>
  57 + </uni-list-item>
  58 +
  59 + <uni-list-item title="报价时效">
  60 + <template v-slot:footer>
  61 + <uni-easyinput :value="form.validityPeriod" :inputBorder="false" disabled placeholder="-" />
  62 + </template>
  63 + </uni-list-item>
  64 +
  65 + <uni-list-item title="报价人">
  66 + <template v-slot:footer>
  67 + <uni-easyinput :value="form.quoterName" :inputBorder="false" disabled placeholder="-" />
  68 + </template>
  69 + </uni-list-item>
  70 +
  71 + <uni-list-item class="select-item" :class="typeof form.longTermOperation === 'boolean' ? 'is-filled' : 'is-empty'">
  72 + <template v-slot:body>
  73 + <view class="item-title"><text>是否长单操作</text></view>
  74 + </template>
  75 + <template v-slot:footer>
  76 + <text class="readonly-text">{{ boolText(form.longTermOperation) }}</text>
  77 + </template>
  78 + </uni-list-item>
  79 +
  80 + <uni-list-item class="select-item" :class="typeof form.terminalCustomer === 'boolean' ? 'is-filled' : 'is-empty'">
  81 + <template v-slot:body>
  82 + <view class="item-title"><text>是否终端客户</text></view>
  83 + </template>
  84 + <template v-slot:footer>
  85 + <text class="readonly-text">{{ boolText(form.terminalCustomer) }}</text>
  86 + </template>
  87 + </uni-list-item>
  88 +
  89 + <uni-list-item class="select-item" :class="typeof form.priced === 'boolean' ? 'is-filled' : 'is-empty'">
  90 + <template v-slot:body>
  91 + <view class="item-title"><text>是否未点价</text></view>
  92 + </template>
  93 + <template v-slot:footer>
  94 + <text class="readonly-text">{{ boolText(form.priced) }}</text>
  95 + </template>
  96 + </uni-list-item>
  97 +
  98 + <uni-list-item v-if="form.priced === true" title="点价截止日期">
  99 + <template v-slot:footer>
  100 + <uni-easyinput :value="pricingDeadlineDisplay" :inputBorder="false" disabled placeholder="-" />
  101 + </template>
  102 + </uni-list-item>
  103 +
  104 + <uni-list-item v-if="form.priced === true" class="select-item" :class="typeof form.temporaryPrice === 'boolean' ? 'is-filled' : 'is-empty'">
  105 + <template v-slot:body>
  106 + <view class="item-title"><text>是否暂定价</text></view>
  107 + </template>
  108 + <template v-slot:footer>
  109 + <text class="readonly-text">{{ boolText(form.temporaryPrice) }}</text>
  110 + </template>
  111 + </uni-list-item>
  112 +
  113 + <uni-list-item class="select-item" :class="typeof form.otherExpenseSettlement === 'boolean' ? 'is-filled' : 'is-empty'">
  114 + <template v-slot:body>
  115 + <view class="item-title"><text>其他费用凭票到厂另行结算</text></view>
  116 + </template>
  117 + <template v-slot:footer>
  118 + <text class="readonly-text">{{ boolText(form.otherExpenseSettlement) }}</text>
  119 + </template>
  120 + </uni-list-item>
  121 +
  122 + <uni-list-item class="select-item" :class="form.deliveryMode ? 'is-filled' : 'is-empty'">
  123 + <template v-slot:body>
  124 + <view class="item-title"><text>交提货方式</text></view>
  125 + </template>
  126 + <template v-slot:footer>
  127 + <text class="readonly-text">{{ getDeliveryMethodLabel() }}</text>
  128 + </template>
  129 + </uni-list-item>
  130 +
  131 + <uni-list-item class="select-item" :class="typeof form.commodityBuyout === 'boolean' ? 'is-filled' : 'is-empty'">
  132 + <template v-slot:body>
  133 + <view class="item-title"><text>是否通货买断</text></view>
  134 + </template>
  135 + <template v-slot:footer>
  136 + <text class="readonly-text">{{ boolText(form.commodityBuyout) }}</text>
  137 + </template>
  138 + </uni-list-item>
  139 +
  140 + <uni-list-item class="select-item" :class="typeof form.qualityBuyout === 'boolean' ? 'is-filled' : 'is-empty'">
  141 + <template v-slot:body>
  142 + <view class="item-title"><text>是否质量买断</text></view>
  143 + </template>
  144 + <template v-slot:footer>
  145 + <text class="readonly-text">{{ boolText(form.qualityBuyout) }}</text>
  146 + </template>
  147 + </uni-list-item>
  148 +
  149 + <uni-list-item class="select-item" :class="typeof form.quantityBuyout === 'boolean' ? 'is-filled' : 'is-empty'">
  150 + <template v-slot:body>
  151 + <view class="item-title"><text>是否数量买断</text></view>
  152 + </template>
  153 + <template v-slot:footer>
  154 + <text class="readonly-text">{{ boolText(form.quantityBuyout) }}</text>
  155 + </template>
  156 + </uni-list-item>
  157 +
  158 + <uni-list-item class="select-item" :class="typeof form.doorDelivery === 'boolean' ? 'is-filled' : 'is-empty'">
  159 + <template v-slot:body>
  160 + <view class="item-title"><text>是否送货上门</text></view>
  161 + </template>
  162 + <template v-slot:footer>
  163 + <text class="readonly-text">{{ boolText(form.doorDelivery) }}</text>
  164 + </template>
  165 + </uni-list-item>
  166 +
  167 + <uni-list-item title="另付运费">
  168 + <template v-slot:footer>
  169 + <uni-easyinput
  170 + v-if="canEdit"
  171 + v-model="form.shippingCost"
  172 + type="digit"
  173 + :inputBorder="false"
  174 + placeholder="请输入另付运费"
  175 + @input="onShippingCostInput"
  176 + @blur="onShippingCostBlur"
  177 + />
  178 + <uni-easyinput v-else :value="shippingCostDisplay" :inputBorder="false" disabled placeholder="-" />
  179 + </template>
  180 + </uni-list-item>
  181 +
  182 + <uni-list-item title="装车费">
  183 + <template v-slot:footer>
  184 + <uni-easyinput :value="loadingFeeDisplay" :inputBorder="false" disabled placeholder="-" />
  185 + </template>
  186 + </uni-list-item>
  187 +
  188 + <uni-list-item>
  189 + <template v-slot:body>
  190 + <view class="item-title">
  191 + <text class="required" v-if="canEdit">*</text><text>开票品名</text>
  192 + </view>
  193 + </template>
  194 + <template v-slot:footer>
  195 + <uni-easyinput
  196 + v-if="canEdit"
  197 + v-model="form.invoiceProductName"
  198 + :inputBorder="false"
  199 + placeholder="请输入开票品名"
  200 + />
  201 + <uni-easyinput v-else :value="form.invoiceProductName" :inputBorder="false" disabled placeholder="-" />
  202 + </template>
  203 + </uni-list-item>
  204 +
  205 + <uni-list-item title="交货日期">
  206 + <template v-slot:footer>
  207 + <uni-easyinput :value="deliveryDateDisplay" :inputBorder="false" disabled placeholder="-" />
  208 + </template>
  209 + </uni-list-item>
  210 +
  211 + <uni-list-item title="结算方式">
  212 + <template v-slot:footer>
  213 + <uni-easyinput :value="form.settlementMethod" :inputBorder="false" disabled placeholder="-" />
  214 + </template>
  215 + </uni-list-item>
  216 +
  217 + <uni-list-item title="结算比例(%)">
  218 + <template v-slot:footer>
  219 + <uni-easyinput :value="settlementRatioDisplay" :inputBorder="false" disabled placeholder="-" />
  220 + </template>
  221 + </uni-list-item>
  222 +
  223 + <uni-list-item title="价格表编号">
  224 + <template v-slot:footer>
  225 + <uni-easyinput :value="priceTableDisplay === '-' ? '' : priceTableDisplay" :inputBorder="false" disabled placeholder="-" />
  226 + </template>
  227 + </uni-list-item>
  228 +
  229 + <uni-list-item title="协调事由">
  230 + <template v-slot:footer>
  231 + <uni-easyinput :value="form.coordinationReason" :inputBorder="false" disabled placeholder="-" />
  232 + </template>
  233 + </uni-list-item>
  234 +
  235 + <uni-list-item title="票类状况">
  236 + <template v-slot:footer>
  237 + <uni-easyinput :value="form.invoiceTypeStatus" :inputBorder="false" disabled placeholder="-" />
  238 + </template>
  239 + </uni-list-item>
  240 +
  241 + <uni-list-item title="数量合计">
  242 + <template v-slot:footer>
  243 + <uni-easyinput :value="totalQuantityDisplay" :inputBorder="false" disabled placeholder="-" />
  244 + </template>
  245 + </uni-list-item>
  246 +
  247 + <uni-list-item v-if="attachmentList.length" title="附件">
  248 + <template v-slot:footer>
  249 + <view class="attach-list">
  250 + <view v-for="(at, idx) in attachmentList" :key="idx" class="attach-item">
  251 + <text class="attach-name">{{ at.name }}</text>
  252 + <text class="attach-view" @click.stop="onPreviewAttachment(at)">查看</text>
  253 + </view>
  254 + </view>
  255 + </template>
  256 + </uni-list-item>
  257 + </uni-list>
  258 +
  259 + <view class="title-header">
  260 + <image class="title-header_icon" src="/static/images/title.png" />
  261 + <span>明细信息</span>
  262 + </view>
  263 + <view v-if="lineListWithName.length" class="edit-line-list">
  264 + <view v-for="(line, idx) in lineListWithName" :key="line.itemId || line.id || idx" class="edit-line-block">
  265 + <view class="line-title">明细{{ idx + 1 }}</view>
  266 + <uni-list>
  267 + <uni-list-item title="品种">
  268 + <template v-slot:footer>
  269 + <uni-easyinput :value="line.productName" :inputBorder="false" disabled placeholder="-" />
  270 + </template>
  271 + </uni-list-item>
  272 + <uni-list-item title="料型">
  273 + <template v-slot:footer>
  274 + <uni-easyinput :value="line.materialType" :inputBorder="false" disabled placeholder="-" />
  275 + </template>
  276 + </uni-list-item>
  277 + <uni-list-item title="数量(吨)">
  278 + <template v-slot:footer>
  279 + <uni-easyinput :value="lineNumberDisplay(line.quantity)" :inputBorder="false" disabled placeholder="-" />
  280 + </template>
  281 + </uni-list-item>
  282 + <uni-list-item title="实际采购价">
  283 + <template v-slot:footer>
  284 + <uni-easyinput :value="lineNumberDisplay(line.actualPurchasePrice)" :inputBorder="false" disabled placeholder="-" />
  285 + </template>
  286 + </uni-list-item>
  287 + <uni-list-item title="含运到厂价">
  288 + <template v-slot:footer>
  289 + <uni-easyinput :value="lineNumberDisplay(line.includingShippingPrice)" :inputBorder="false" disabled placeholder="-" />
  290 + </template>
  291 + </uni-list-item>
  292 + <uni-list-item title="价格表价格">
  293 + <template v-slot:footer>
  294 + <uni-easyinput :value="lineNumberDisplay(line.priceListPrices)" :inputBorder="false" disabled placeholder="-" />
  295 + </template>
  296 + </uni-list-item>
  297 + <uni-list-item title="协调幅度">
  298 + <template v-slot:footer>
  299 + <uni-easyinput :value="lineNumberDisplay(line.coordinationRange)" :inputBorder="false" disabled placeholder="-" />
  300 + </template>
  301 + </uni-list-item>
  302 + <uni-list-item title="买断料预计损耗">
  303 + <template v-slot:footer>
  304 + <uni-easyinput :value="lineNumberDisplay(line.estimatedLoss)" :inputBorder="false" disabled placeholder="-" />
  305 + </template>
  306 + </uni-list-item>
  307 + <uni-list-item title="申请损耗(%)">
  308 + <template v-slot:footer>
  309 + <uni-easyinput :value="lineNumberDisplay(line.applicationAttrition)" :inputBorder="false" disabled placeholder="-" />
  310 + </template>
  311 + </uni-list-item>
  312 + <uni-list-item
  313 + class="select-item"
  314 + :class="line.workshopName ? 'is-filled' : 'is-empty'"
  315 + :clickable="canEditWorkshop"
  316 + :rightText="canEditWorkshop ? (line.workshopName || '请选择分厂') : ''"
  317 + :showArrow="canEditWorkshop"
  318 + @click="canEditWorkshop ? openWorkshopSheet(idx) : undefined"
  319 + >
  320 + <template v-slot:body>
  321 + <view class="item-title">
  322 + <text class="required" v-if="canEditWorkshop">*</text><text>选择分厂</text>
  323 + </view>
  324 + </template>
  325 + <template v-if="!canEditWorkshop" v-slot:footer>
  326 + <uni-easyinput :value="line.workshopName" :inputBorder="false" disabled placeholder="-" />
  327 + </template>
  328 + </uni-list-item>
  329 + </uni-list>
  330 + </view>
  331 + </view>
  332 + <view v-else class="section empty-tip">暂无明细</view>
  333 +
  334 + <view class="material-condition-section">
  335 + <view class="section-header">
  336 + <image class="opCollapse" src="/static/images/title.png" />
  337 + <text class="section-title">料质状况</text>
  338 + </view>
  339 + <view class="section-content">
  340 + <view class="form-row">
  341 + <text class="form-label">是否启用料质状况</text>
  342 + <text class="form-value">{{ boolText(form.materialConditionEnabled) }}</text>
  343 + </view>
  344 + <template v-if="form.materialConditionEnabled">
  345 + <view v-for="mc in materialConditionConfigs" :key="mc.field" class="material-group">
  346 + <text class="material-label">{{ mc.label }}</text>
  347 + <view class="tag-list">
  348 + <view v-for="opt in getDictOptions(mc.dictCode)" :key="opt.code" class="tag-btn" :class="{ active: isTagSelected(mc.field, opt.code) }">{{ opt.name }}</view>
  349 + </view>
  350 + </view>
  351 + </template>
  352 + </view>
  353 + </view>
  354 +
  355 + <view class="remark-section">
  356 + <view class="section-header">
  357 + <image class="opCollapse" src="/static/images/title.png" />
  358 + <text class="section-title">备注</text>
  359 + </view>
  360 + <view class="section-content">
  361 + <text class="remark-text">{{ safeText(form.remark) }}</text>
  362 + </view>
  363 + </view>
  364 +
  365 + <view class="remark-section">
  366 + <view class="section-header">
  367 + <image class="opCollapse" src="/static/images/title.png" />
  368 + <text class="section-title">变更事由</text>
  369 + </view>
  370 + <view class="section-content">
  371 + <text class="remark-text">{{ safeText(form.changeReason) }}</text>
  372 + </view>
  373 + </view>
  374 + </template>
  375 +
  376 + <template v-else>
  377 + <view class="section">
  378 + <text class="row company">{{ safeText(form.code) }}</text>
  379 + <view class="row"><text class="label">公司简称</text><text class="value">{{ safeText(form.companyShortName || form.companyName) }}</text></view>
  380 + <view class="row"><text class="label">供应商名称</text><text class="value">{{ safeText(form.supplierName) }}</text></view>
  381 + <view class="row"><text class="label">采购处</text><text class="value">{{ safeText(form.purchaseDepartmentName || form.purchaseDepartment) }}</text></view>
  382 + <view class="row"><text class="label">区域</text><text class="value">{{ safeText(form.regionName || form.region) }}</text></view>
  383 + <view class="row"><text class="label">日期</text><text class="value">{{ formatDateOnly(form.date) }}</text></view>
  384 + <view class="row"><text class="label">报价时效</text><text class="value">{{ safeText(form.validityPeriod) }}</text></view>
  385 + <view class="row"><text class="label">报价人</text><text class="value">{{ safeText(form.quoterName) }}</text></view>
  386 + <view class="row"><text class="label">是否长单操作</text><text class="value">{{ boolText(form.longTermOperation) }}</text></view>
  387 + <view class="row"><text class="label">是否终端客户</text><text class="value">{{ boolText(form.terminalCustomer) }}</text></view>
  388 + <view class="row"><text class="label">是否未点价</text><text class="value">{{ boolText(form.priced) }}</text></view>
  389 + <view v-if="form.priced === true" class="row"><text class="label">点价截止日期</text><text class="value">{{ formatDateOnly(form.pricingDeadline) }}</text></view>
  390 + <view v-if="form.priced === true" class="row"><text class="label">是否暂定价</text><text class="value">{{ boolText(form.temporaryPrice) }}</text></view>
  391 + <view class="row"><text class="label">其他费用凭票到厂另行结算</text><text class="value">{{ boolText(form.otherExpenseSettlement) }}</text></view>
  392 + <view class="row"><text class="label">交提货方式</text><text class="value">{{ getDeliveryMethodLabel() }}</text></view>
  393 + <view class="row"><text class="label">是否通货买断</text><text class="value">{{ boolText(form.commodityBuyout) }}</text></view>
  394 + <view class="row"><text class="label">是否质量买断</text><text class="value">{{ boolText(form.qualityBuyout) }}</text></view>
  395 + <view class="row"><text class="label">是否数量买断</text><text class="value">{{ boolText(form.quantityBuyout) }}</text></view>
  396 + <view class="row"><text class="label">是否送货上门</text><text class="value">{{ boolText(form.doorDelivery) }}</text></view>
  397 + <view class="row"><text class="label">另付运费</text><text class="value">{{ formatNumber(form.shippingCost) }}</text></view>
  398 + <view class="row"><text class="label">装车费</text><text class="value">{{ formatNumber(form.loadingFee) }}</text></view>
  399 + <view class="row"><text class="label">开票品名</text><text class="value">{{ safeText(form.invoiceProductName) }}</text></view>
  400 + <view class="row"><text class="label">交货日期</text><text class="value">{{ formatDateOnly(form.deliveryDate) }}</text></view>
  401 + <view class="row"><text class="label">结算方式</text><text class="value">{{ safeText(form.settlementMethod) }}</text></view>
  402 + <view class="row"><text class="label">结算比例(%)</text><text class="value">{{ formatNumber(form.settlementRatio) }}</text></view>
  403 + <view class="row"><text class="label">价格表编号</text><text class="value">{{ priceTableDisplay }}</text></view>
  404 + <view class="row"><text class="label">协调事由</text><text class="value">{{ safeText(form.coordinationReason) }}</text></view>
  405 + <view class="row"><text class="label">票类状况</text><text class="value">{{ safeText(form.invoiceTypeStatus) }}</text></view>
  406 + <view class="row"><text class="label">数量合计</text><text class="value">{{ formatNumber(form.totalQuantity) }}</text></view>
  407 + <view class="row" v-if="attachmentList.length">
  408 + <text class="label">附件</text>
  409 + <view class="attach-list">
  410 + <view v-for="(at, idx) in attachmentList" :key="idx" class="attach-item">
  411 + <text class="attach-name">{{ at.name }}</text>
  412 + <text class="attach-view" @click.stop="onPreviewAttachment(at)">查看</text>
  413 + </view>
  414 + </view>
  415 + </view>
  416 + </view>
  417 +
  418 + <ProductRel
  419 + mode="view"
  420 + :list="lineListWithName"
  421 + :product-options="productOptions"
  422 + :workshop-options="workshopOptions"
  423 + :shipping-cost="form.shippingCost"
  424 + :price-map="priceMap"
  425 + />
  426 +
  427 + <view class="title-header">
  428 + <image class="title-header_icon" src="/static/images/title.png" />
  429 + <span>料质状况</span>
  430 + </view>
  431 + <view class="section">
  432 + <view class="row"><text class="label">是否启用料质状况</text><text class="value">{{ boolText(form.materialConditionEnabled) }}</text></view>
  433 + <template v-if="form.materialConditionEnabled">
  434 + <view v-for="mc in materialConditionConfigs" :key="mc.field" class="material-group">
  435 + <text class="material-label">{{ mc.label }}</text>
  436 + <view class="tag-list">
  437 + <view v-for="opt in getDictOptions(mc.dictCode)" :key="opt.code" class="tag-btn" :class="{ active: isTagSelected(mc.field, opt.code) }">{{ opt.name }}</view>
  438 + </view>
  439 + </view>
  440 + </template>
  441 + </view>
  442 +
  443 + <view class="title-header">
  444 + <image class="title-header_icon" src="/static/images/title.png" />
  445 + <span>备注</span>
  446 + </view>
  447 + <view class="section">
  448 + <text class="remark-text">{{ safeText(form.remark) }}</text>
  449 + </view>
  450 +
  451 + <view class="title-header">
  452 + <image class="title-header_icon" src="/static/images/title.png" />
  453 + <span>变更事由</span>
  454 + </view>
  455 + <view class="section">
  456 + <text class="remark-text">{{ safeText(form.changeReason) }}</text>
  457 + </view>
  458 + </template>
  459 + </scroll-view>
  460 +
  461 + <RelateSelectSheet
  462 + v-if="companySheetVisible"
  463 + :visible.sync="companySheetVisible"
  464 + title="选择公司"
  465 + :fetch-fn="fetchCompanyList"
  466 + :display-fields="companyDisplayFields"
  467 + :page-size="20"
  468 + :multiple="false"
  469 + row-key="id"
  470 + @confirm="onCompanyConfirm"
  471 + />
  472 + <RelateSelectSheet
  473 + v-if="priceSheetVisible"
  474 + :visible.sync="priceSheetVisible"
  475 + title="选择价格表"
  476 + :fetch-fn="fetchPriceTableList"
  477 + :display-fields="priceTableDisplayFields"
  478 + :page-size="20"
  479 + :multiple="false"
  480 + row-key="id"
  481 + @confirm="onPriceTableConfirm"
  482 + />
  483 + <SingleSelectSheet
  484 + :visible.sync="workshopSheet.visible"
  485 + title="请选择分厂"
  486 + :options="workshopSheet.options"
  487 + v-model="workshopSheet.value"
  488 + @confirm="onWorkshopConfirm"
  489 + />
  490 + </view>
  491 +</template>
  492 +
  493 +<script>
  494 +import ProductRel from './productRel.vue'
  495 +import { procurementPlanReplenishFindByIdApi } from '@/api/procure-manage/procurementPlan.js'
  496 +import { getDicByCodes, getDicName } from '@/utils/dic.js'
  497 +import { priceTableQueryApi, breedRelationshipQueryApi, workshopQueryApi, companyShortQueryApi } from '@/api/devManage.js'
  498 +import { getInfo } from '@/api/login.js'
  499 +import RelateSelectSheet from '@/components/relate-select/index.vue'
  500 +import SingleSelectSheet from '@/components/single-select/index.vue'
  501 +
  502 +export default {
  503 + name: 'SupplePlanViewer',
  504 + components: { ProductRel, RelateSelectSheet, SingleSelectSheet },
  505 + props: {
  506 + id: { type: [String, Number], default: '' },
  507 + roleCodes: { type: Array, default: function () { return [] } }
  508 + },
  509 + data() {
  510 + return {
  511 + form: {},
  512 + lineList: [],
  513 + attachmentList: [],
  514 + _roleCodesFromApi: [],
  515 + materialConditionConfigs: [
  516 + { field: 'materialConditionCopperRice', label: '铜米', dictCode: 'COPPER_RICE' },
  517 + { field: 'materialConditionBrightCopper', label: '光亮铜', dictCode: 'BRIGHT_COPPER' },
  518 + { field: 'materialConditionFirstClass', label: '一特', dictCode: 'FIRST_CLASS' },
  519 + { field: 'materialConditionSecondClass', label: '二特', dictCode: 'SECOND_CLASS' },
  520 + { field: 'materialConditionTinCoated', label: '镀锡紫', dictCode: 'TIN_COATED' },
  521 + { field: 'materialConditionScrap', label: '角料', dictCode: 'SCRAP' },
  522 + { field: 'materialConditionWhiteYellow', label: '镀白黄', dictCode: 'WHITE_YELLOW' },
  523 + { field: 'materialConditionPhosphorCopper', label: '磷铜', dictCode: 'PHOSPHOR_COPPER' }
  524 + ],
  525 + dicOptions: {
  526 + AUDIT_STATUS: [],
  527 + PROCESS_STATUS: [],
  528 + DELIVERY_METHOD: []
  529 + },
  530 + dictData: {},
  531 + priceTableList: [],
  532 + priceMap: {},
  533 + productOptions: [],
  534 + workshopOptions: [],
  535 + isGyglkzg: false,
  536 + isGyglkzlglg: false,
  537 + isGyglkjhgly: false,
  538 + companySheetVisible: false,
  539 + priceSheetVisible: false,
  540 + priceTableCodeLabel: '',
  541 + workshopSheet: { visible: false, title: '请选择分厂', options: [], value: '', idx: -1 },
  542 + companyDisplayFields: [
  543 + { label: '公司简称', field: 'shortName' },
  544 + { label: '公司名称', field: 'companyName' },
  545 + { label: '办事处', field: 'deptName' }
  546 + ],
  547 + priceTableDisplayFields: [
  548 + { label: '价格表编号', field: 'priceTableCode' },
  549 + { label: '名称', field: 'priceTableName' },
  550 + { label: '日期', field: 'effectiveDate' }
  551 + ]
  552 + }
  553 + },
  554 + computed: {
  555 + isEditLayout() {
  556 + return this.canEdit || this.canEditWorkshop
  557 + },
  558 + parentRoleCodes() {
  559 + try {
  560 + var codes = null
  561 + var p = this.$parent
  562 + for (var i = 0; i < 5 && p; i++) {
  563 + if (p.roleCodes != null && Array.isArray(p.roleCodes)) {
  564 + codes = p.roleCodes
  565 + break
  566 + }
  567 + if (p.$store && p.$store.getters && Array.isArray(p.$store.getters.roleCodes)) {
  568 + codes = p.$store.getters.roleCodes
  569 + break
  570 + }
  571 + p = p.$parent
  572 + }
  573 + if (!codes && this.$store && this.$store.getters && Array.isArray(this.$store.getters.roleCodes)) {
  574 + codes = this.$store.getters.roleCodes
  575 + }
  576 + return Array.isArray(codes) ? codes : []
  577 + } catch (e) {
  578 + return []
  579 + }
  580 + },
  581 + mergedRoleCodes() {
  582 + var r1 = Array.isArray(this.roleCodes) ? this.roleCodes : []
  583 + var r2 = Array.isArray(this.parentRoleCodes) ? this.parentRoleCodes : []
  584 + if (!r1.length && !r2.length) return []
  585 + var map = {}
  586 + ;[].concat(r1).concat(r2).forEach(function (c) {
  587 + if (c != null && c !== '') map[String(c)] = true
  588 + })
  589 + return Object.keys(map)
  590 + },
  591 + isAuditPage() {
  592 + try {
  593 + if (Array.isArray(this.parentRoleCodes) && this.parentRoleCodes.length) {
  594 + return true
  595 + }
  596 + var pages = getCurrentPages()
  597 + var cur = pages[pages.length - 1]
  598 + var route = cur && cur.route ? String(cur.route) : ''
  599 + var options = cur && cur.options ? cur.options : {}
  600 + var path = (cur && cur.$page && cur.$page.fullPath) ? String(cur.$page.fullPath) : ''
  601 + var url = (cur && cur.url) ? String(cur.url) : ''
  602 + if (
  603 + route.indexOf('pages/flow/audit') !== -1 ||
  604 + route === 'pages/flow/audit' ||
  605 + path.indexOf('pages/flow/audit') !== -1 ||
  606 + url.indexOf('pages/flow/audit') !== -1 ||
  607 + (options && options.taskId) ||
  608 + (options && options.instanceId)
  609 + ) {
  610 + return true
  611 + }
  612 + var p2 = this.$parent
  613 + for (var j = 0; j < 5 && p2; j++) {
  614 + var n = p2.$options && p2.$options.name ? String(p2.$options.name) : ''
  615 + var r = p2.$options && p2.$options.__file ? String(p2.$options.__file) : ''
  616 + if (
  617 + n.indexOf('Audit') !== -1 ||
  618 + n === 'FlowAudit' ||
  619 + r.indexOf('flow/audit') !== -1 ||
  620 + (p2.auditCtx && typeof p2.auditCtx === 'object')
  621 + ) {
  622 + return true
  623 + }
  624 + p2 = p2.$parent
  625 + }
  626 + return false
  627 + } catch (e) {
  628 + return false
  629 + }
  630 + },
  631 + canEdit() {
  632 + var codes = this.mergedRoleCodes.length ? this.mergedRoleCodes : (Array.isArray(this._roleCodesFromApi) ? this._roleCodesFromApi : [])
  633 + return (codes.includes('gyglkjhgly')) && this.isAuditPage
  634 + },
  635 + canEditWorkshop() {
  636 + var codes = this.mergedRoleCodes.length ? this.mergedRoleCodes : (Array.isArray(this._roleCodesFromApi) ? this._roleCodesFromApi : [])
  637 + return codes.includes('gyglkzlglg') && this.isAuditPage
  638 + },
  639 + productMap() {
  640 + var list = Array.isArray(this.productOptions) ? this.productOptions : []
  641 + var m = {}
  642 + list.forEach(function (o) {
  643 + var key = String(o.productId || o.id || o.value || '')
  644 + if (key) m[key] = o
  645 + })
  646 + return m
  647 + },
  648 + workshopMap() {
  649 + var list = Array.isArray(this.workshopOptions) ? this.workshopOptions : []
  650 + var m = {}
  651 + list.forEach(function (o) {
  652 + var key = String(o.workshopId || o.id || o.value || '')
  653 + if (key) m[key] = o
  654 + })
  655 + return m
  656 + },
  657 + lineListWithName() {
  658 + var self = this
  659 + var list = Array.isArray(this.lineList) ? this.lineList : []
  660 + return list.map(function (row) {
  661 + if (!row.productName) {
  662 + var pid = String(row.productId || '')
  663 + var p = pid ? self.productMap[pid] : null
  664 + if (p) row.productName = p.productName || p.name || p.label || ''
  665 + }
  666 + if (!row.workshopName) {
  667 + var wid = String(row.workshopId || '')
  668 + var w = wid ? self.workshopMap[wid] : null
  669 + if (w) row.workshopName = w.workshopName || w.name || w.label || ''
  670 + }
  671 + return row
  672 + })
  673 + },
  674 + priceTableDisplay() {
  675 + var d = this.form || {}
  676 + var code = d.priceTableCode != null ? String(d.priceTableCode).trim() : (d.priceId != null ? String(d.priceId).trim() : (d.priceTableId != null ? String(d.priceTableId).trim() : ''))
  677 + var name = d.priceTableName || d.tableName || d.name || ''
  678 + if (name || code) {
  679 + return (name ? name + (code ? ' (' + code + ')' : '') : String(code))
  680 + }
  681 + return '-'
  682 + },
  683 + purchaseDepartmentDisplay() {
  684 + var d = this.form || {}
  685 + return d.purchaseDepartmentName != null ? d.purchaseDepartmentName : (d.purchaseDepartment != null ? d.purchaseDepartment : '')
  686 + },
  687 + regionDisplay() {
  688 + var d = this.form || {}
  689 + return d.regionName != null ? d.regionName : (d.region != null ? d.region : '')
  690 + },
  691 + pricingDeadlineDisplay() {
  692 + var d = this.form || {}
  693 + var s = d.pricingDeadline == null ? '' : String(d.pricingDeadline).trim()
  694 + if (!s) return ''
  695 + if (s.length >= 10) return s.slice(0, 10)
  696 + return s
  697 + },
  698 + deliveryDateDisplay() {
  699 + var d = this.form || {}
  700 + var s = d.deliveryDate == null ? '' : String(d.deliveryDate).trim()
  701 + if (!s) return ''
  702 + if (s.length >= 10) return s.slice(0, 10)
  703 + return s
  704 + },
  705 + shippingCostDisplay() {
  706 + var v = (this.form || {}).shippingCost
  707 + if (v == null || v === '') return ''
  708 + var n = Number(v)
  709 + if (isNaN(n)) return String(v)
  710 + return n
  711 + },
  712 + loadingFeeDisplay() {
  713 + var v = (this.form || {}).loadingFee
  714 + if (v == null || v === '') return ''
  715 + var n = Number(v)
  716 + if (isNaN(n)) return String(v)
  717 + return n
  718 + },
  719 + settlementRatioDisplay() {
  720 + var v = (this.form || {}).settlementRatio
  721 + if (v == null || v === '') return ''
  722 + var n = Number(v)
  723 + if (isNaN(n)) return String(v)
  724 + return n
  725 + },
  726 + totalQuantityDisplay() {
  727 + var v = (this.form || {}).totalQuantity
  728 + if (v == null || v === '') return ''
  729 + var n = Number(v)
  730 + if (isNaN(n)) return String(v)
  731 + return n
  732 + }
  733 + },
  734 + created() {
  735 + this.getUserInfo()
  736 + this.loadDictData()
  737 + this.loadRefData()
  738 + },
  739 + watch: {
  740 + id: {
  741 + immediate: true,
  742 + handler(val) {
  743 + const v = (val !== undefined && val !== null) ? String(val) : ''
  744 + if (v) this.loadDetail(v)
  745 + }
  746 + }
  747 + },
  748 + methods: {
  749 + getUserInfo() {
  750 + var self = this
  751 + getInfo()
  752 + .then((res) => {
  753 + var codes = Array.isArray(res?.roleCodes) ? res.roleCodes : []
  754 + self._roleCodesFromApi = codes
  755 + self.isGyglkzlglg = !!(codes.includes('gyglkzlglg') && codes.includes('001'))
  756 + self.isGyglkjhgly = codes.includes('gyglkjhgly')
  757 + })
  758 + .catch((err) => {
  759 + console.error('获取用户信息失败:', err)
  760 + })
  761 + },
  762 + toNumber(v) {
  763 + if (v == null || v === '') return 0
  764 + var n = Number(v)
  765 + return isNaN(n) ? 0 : n
  766 + },
  767 + lineNumberDisplay(v) {
  768 + if (v == null || v === '') return ''
  769 + var n = Number(v)
  770 + if (isNaN(n)) return String(v)
  771 + return n
  772 + },
  773 + getInputValue(e) {
  774 + if (e && e.detail && e.detail.value !== undefined) return e.detail.value
  775 + return e
  776 + },
  777 + async loadDictData() {
  778 + var self = this
  779 + var codes = [].concat(
  780 + this.materialConditionConfigs.map(function (mc) { return mc.dictCode }),
  781 + ['DELIVERY_METHOD', 'AUDIT_STATUS', 'PROCESS_STATUS']
  782 + )
  783 + try {
  784 + var results = await getDicByCodes(codes)
  785 + var d = results || {}
  786 + this.dictData = d
  787 + this.dicOptions.AUDIT_STATUS = (d.AUDIT_STATUS && d.AUDIT_STATUS.data) || []
  788 + this.dicOptions.PROCESS_STATUS = (d.PROCESS_STATUS && d.PROCESS_STATUS.data) || []
  789 + this.dicOptions.DELIVERY_METHOD = (d.DELIVERY_METHOD && d.DELIVERY_METHOD.data) || []
  790 + } catch (e) {
  791 + this.dictData = {}
  792 + }
  793 + },
  794 + getDictOptions(dictCode) {
  795 + var data = this.dictData[dictCode]
  796 + return (data && data.data) ? data.data : []
  797 + },
  798 + isTagSelected(field, code) {
  799 + var selected = this.form ? this.form[field] : undefined
  800 + if (Array.isArray(selected)) return selected.indexOf(code) >= 0
  801 + if (typeof selected === 'string' && selected) {
  802 + return selected.split(',').indexOf(code) >= 0
  803 + }
  804 + return false
  805 + },
  806 + getAuditStatusText(status) {
  807 + var v = status == null ? '' : String(status)
  808 + if (!v) return '-'
  809 + return getDicName('AUDIT_STATUS', v, this.dicOptions.AUDIT_STATUS) || v
  810 + },
  811 + getProcessStatusText(status) {
  812 + var v = status == null ? '' : String(status)
  813 + if (!v) return '-'
  814 + return getDicName('PROCESS_STATUS', v, this.dicOptions.PROCESS_STATUS) || v
  815 + },
  816 + getDeliveryMethodLabel() {
  817 + var opts = this.getDictOptions('DELIVERY_METHOD') || []
  818 + var v = String(this.form.deliveryMode != null ? this.form.deliveryMode : '')
  819 + if (!v) return '-'
  820 + for (var i = 0; i < opts.length; i++) {
  821 + var o = opts[i]
  822 + var code = o.code != null ? String(o.code) : (o.value != null ? String(o.value) : '')
  823 + if (code === v) return o.name || o.label || '-'
  824 + }
  825 + return v
  826 + },
  827 + buildPriceMap() {
  828 + var list = Array.isArray(this.priceTableList) ? this.priceTableList : []
  829 + var map = {}
  830 + list.forEach(function (item) {
  831 + var id = item && item.id != null ? String(item.id) : ''
  832 + var code = item && item.priceTableCode != null ? String(item.priceTableCode) : ''
  833 + if (id) map[id] = item
  834 + if (code) map[code] = item
  835 + })
  836 + this.priceMap = map
  837 + },
  838 + normalizePriceTableRow(item) {
  839 + if (!item) return item
  840 + if (!item.id && item.priceTableId) item.id = item.priceTableId
  841 + if (!item.priceTableId && item.id) item.priceTableId = item.id
  842 + if (!item.priceTableCode && item.code) item.priceTableCode = item.code
  843 + if (!item.priceTableName && item.name) item.priceTableName = item.name
  844 + return item
  845 + },
  846 + fillPriceTableFromDetail(d) {
  847 + var pId = d.priceTableId || d.priceId || ''
  848 + var pCode = d.priceTableCode || ''
  849 + if (!pId && !pCode) return
  850 + var target = null
  851 + var list = this.priceTableList
  852 + for (var i = 0; i < list.length; i++) {
  853 + var it = list[i]
  854 + if (pId && (String(it.id) === String(pId) || String(it.priceTableId) === String(pId))) { target = it; break }
  855 + }
  856 + if (!target && pCode) {
  857 + for (var j = 0; j < list.length; j++) {
  858 + var it2 = list[j]
  859 + if (String(it2.priceTableCode) === String(pCode)) { target = it2; break }
  860 + }
  861 + }
  862 + if (target) {
  863 + this.form.priceTableId = target.id || target.priceTableId || pId
  864 + this.form.priceId = target.id || target.priceId || pId
  865 + this.form.priceTableCode = target.priceTableCode || pCode
  866 + var label = target.priceTableName || ''
  867 + var codeLabel = target.priceTableCode || ''
  868 + if (label || codeLabel) this.priceTableCodeLabel = label ? label + (codeLabel ? ' (' + codeLabel + ')' : '') : codeLabel
  869 + }
  870 + },
  871 + async loadRefData() {
  872 + var self = this
  873 + try {
  874 + var results = await Promise.all([
  875 + this.pCall(priceTableQueryApi, { pageIndex: 1, pageSize: 1000 }),
  876 + this.pCall(breedRelationshipQueryApi, { pageIndex: 1, pageSize: 1000 }),
  877 + this.pCall(workshopQueryApi, { pageIndex: 1, pageSize: 1000 })
  878 + ])
  879 + var r0 = (results[0] && results[0].data) ? results[0].data : {}
  880 + var r1 = (results[1] && results[1].data) ? results[1].data : {}
  881 + var r2 = (results[2] && results[2].data) ? results[2].data : {}
  882 + var rawPriceTableList = (r0.datas && Array.isArray(r0.datas)) ? r0.datas : ((r0.list && Array.isArray(r0.list)) ? r0.list : ((r0.records && Array.isArray(r0.records)) ? r0.records : []))
  883 + self.priceTableList = Array.isArray(rawPriceTableList) ? rawPriceTableList.map(function (item) { return self.normalizePriceTableRow(item) }) : []
  884 + self.productOptions = (r1.datas && Array.isArray(r1.datas)) ? r1.datas : ((r1.list && Array.isArray(r1.list)) ? r1.list : ((r1.records && Array.isArray(r1.records)) ? r1.records : []))
  885 + self.workshopOptions = (r2.datas && Array.isArray(r2.datas)) ? r2.datas : ((r2.list && Array.isArray(r2.list)) ? r2.list : ((r2.records && Array.isArray(r2.records)) ? r2.records : []))
  886 + self.buildPriceMap()
  887 + if (self.isGyglkjhgly && self.isAuditPage && !self.priceTableCodeLabel && (self.form.priceTableId || self.form.priceId || self.form.priceTableCode)) {
  888 + self.fillPriceTableFromDetail(self.form)
  889 + }
  890 + } catch (e) {
  891 + self.priceTableList = []
  892 + self.productOptions = []
  893 + self.workshopOptions = []
  894 + self.priceMap = {}
  895 + }
  896 + },
  897 + pCall(fn, params) {
  898 + try {
  899 + return Promise.resolve(fn(params))
  900 + } catch (e) {
  901 + return Promise.reject(e)
  902 + }
  903 + },
  904 + boolText(v) {
  905 + if (typeof v === 'boolean') return v ? '是' : '否'
  906 + if (v === 'true' || v === '1' || v === 1) return '是'
  907 + if (v === 'false' || v === '0' || v === 0) return '否'
  908 + return '-'
  909 + },
  910 + formatDateOnly(v) {
  911 + var s = v == null ? '' : String(v).trim()
  912 + if (!s) return '-'
  913 + if (s.length >= 10) return s.slice(0, 10)
  914 + return s
  915 + },
  916 + safeText(v) {
  917 + var s = v == null ? '' : String(v)
  918 + return s.trim() ? s : '-'
  919 + },
  920 + formatNumber(v) {
  921 + if (v == null || v === '') return '-'
  922 + var n = Number(v)
  923 + if (isNaN(n)) return String(v)
  924 + return n
  925 + },
  926 + buildAttachmentList() {
  927 + var ids = this.form.attachmentFileIds
  928 + var names = this.form.attachmentFileNames
  929 + var idArr = (typeof ids === 'string' && ids) ? ids.split(',').filter(Boolean) : (Array.isArray(ids) ? ids : [])
  930 + var nameArr = (typeof names === 'string' && names) ? names.split(',').filter(Boolean) : (Array.isArray(names) ? names : [])
  931 + var len = Math.max(idArr.length, nameArr.length)
  932 + var list = []
  933 + for (var i = 0; i < len; i++) {
  934 + list.push({ id: idArr[i] || '', name: nameArr[i] || ('附件' + (i + 1)) })
  935 + }
  936 + this.attachmentList = list
  937 + },
  938 + onShippingCostInput(e) {
  939 + var v = this.getInputValue(e)
  940 + if (v != null && v !== '' && !isNaN(Number(v)) && Number(v) < 0) {
  941 + this.form.shippingCost = 0
  942 + }
  943 + this.recalcIncludingShipping()
  944 + },
  945 + onShippingCostBlur(e) {
  946 + var v = (e && e.detail && e.detail.value != null) ? e.detail.value : this.form.shippingCost
  947 + if (v == null || v === '') return
  948 + var n = Number(v)
  949 + if (isNaN(n)) return
  950 + if (n < 0) { this.form.shippingCost = 0; this.recalcIncludingShipping(); return }
  951 + this.form.shippingCost = n
  952 + this.recalcIncludingShipping()
  953 + },
  954 + recalcIncludingShipping() {
  955 + var self = this
  956 + var sc = this.toNumber(this.form.shippingCost)
  957 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  958 + lines.forEach(function (line) {
  959 + var actual = Number(line.actualPurchasePrice)
  960 + if (!isNaN(actual)) {
  961 + line.includingShippingPrice = actual + sc
  962 + }
  963 + })
  964 + },
  965 + onLinePriceInput(idx, e) {
  966 + var v = this.getInputValue(e)
  967 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  968 + var line = lines[idx]
  969 + if (!line) return
  970 + if (v != null && v !== '' && !isNaN(Number(v)) && Number(v) < 0) {
  971 + line.priceListPrices = 0
  972 + }
  973 + },
  974 + onLinePriceBlur(idx) {
  975 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  976 + var line = lines[idx]
  977 + if (!line) return
  978 + var v = line.priceListPrices
  979 + if (v == null || v === '') return
  980 + var n = Number(v)
  981 + if (isNaN(n)) return
  982 + if (n < 0) { line.priceListPrices = 0; return }
  983 + line.priceListPrices = n
  984 + },
  985 + openCompanySheet() { this.companySheetVisible = true },
  986 + fetchCompanyList(params) {
  987 + try {
  988 + return Promise.resolve(companyShortQueryApi(params))
  989 + } catch (e) { return Promise.reject(e) }
  990 + },
  991 + onCompanyConfirm(rows) {
  992 + var row = Array.isArray(rows) && rows[0] ? rows[0] : null
  993 + if (!row) return
  994 + this.form.companyId = row.id || row.companyId || row.companyShortId || ''
  995 + this.form.companyShortId = row.companyShortId || row.id || row.companyId || ''
  996 + this.form.companyShortName = row.shortName || row.companyShortName || row.companyName || row.name || ''
  997 + this.form.companyName = row.companyName || row.name || row.shortName || ''
  998 + },
  999 + openPriceTableSheet() { this.priceSheetVisible = true },
  1000 + fetchPriceTableList(params) {
  1001 + try { return Promise.resolve(priceTableQueryApi(params)) } catch (e) { return Promise.reject(e) }
  1002 + },
  1003 + onPriceTableConfirm(rows) {
  1004 + var row = Array.isArray(rows) && rows[0] ? rows[0] : null
  1005 + if (!row) return
  1006 + var t = this.normalizePriceTableRow(row)
  1007 + this.form.priceTableId = t.id || t.priceTableId || ''
  1008 + this.form.priceId = t.id || t.priceId || ''
  1009 + this.form.priceTableCode = t.priceTableCode || ''
  1010 + var label = t.priceTableName || ''
  1011 + var codeLabel = t.priceTableCode || ''
  1012 + this.priceTableCodeLabel = label ? label + (codeLabel ? ' (' + codeLabel + ')' : '') : codeLabel
  1013 + this.fillLinePriceListPrices(t)
  1014 + },
  1015 + fillLinePriceListPrices(priceTable) {
  1016 + if (!priceTable) return
  1017 + var self = this
  1018 + var list = Array.isArray(this.lineList) ? this.lineList : []
  1019 + var lines = priceTable.lines || priceTable.priceTableLineList || []
  1020 + if (!Array.isArray(lines) || !lines.length) return
  1021 + list.forEach(function (line) {
  1022 + if (line.priceListPrices != null && line.priceListPrices !== '' && line.priceListPrices !== 0) return
  1023 + var pid = String(line.productId || '')
  1024 + if (!pid) return
  1025 + var target = null
  1026 + for (var i = 0; i < lines.length; i++) {
  1027 + var l = lines[i]
  1028 + var lid = String(l.productId || l.breedId || l.id || '')
  1029 + if (lid === pid) { target = l; break }
  1030 + }
  1031 + if (!target) return
  1032 + var p = target.price != null ? target.price : (target.actualPrice != null ? target.actualPrice : target.priceListPrices)
  1033 + if (p != null && p !== '') {
  1034 + var n = Number(p)
  1035 + if (!isNaN(n)) line.priceListPrices = n
  1036 + }
  1037 + })
  1038 + },
  1039 + openWorkshopSheet(idx) {
  1040 + var opts = Array.isArray(this.workshopOptions) ? this.workshopOptions.map(function (o) {
  1041 + return {
  1042 + label: o.workshopName != null ? o.workshopName : (o.name != null ? o.name : o.label),
  1043 + value: o.workshopId != null ? o.workshopId : (o.id != null ? o.id : o.value)
  1044 + }
  1045 + }) : []
  1046 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  1047 + var line = lines[idx]
  1048 + var val = line ? (line.workshopId != null ? String(line.workshopId) : '') : ''
  1049 + this.workshopSheet = { visible: true, title: '请选择分厂', options: opts, value: val, idx: idx }
  1050 + },
  1051 + onWorkshopConfirm(value, label) {
  1052 + var idx = this.workshopSheet.idx
  1053 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  1054 + var line = lines[idx]
  1055 + if (!line) return
  1056 + line.workshopId = value != null ? value : ''
  1057 + line.workshopName = label != null ? label : ''
  1058 + },
  1059 + getFormValues() {
  1060 + var self = this
  1061 + var form = this.form || {}
  1062 + var result = JSON.parse(JSON.stringify(form))
  1063 + this.materialConditionConfigs.forEach(function (mc) {
  1064 + var arr = form[mc.field]
  1065 + var listField = mc.field + 'List'
  1066 + if (Array.isArray(arr)) {
  1067 + result[mc.field] = arr.join(',')
  1068 + result[listField] = arr.slice()
  1069 + } else if (typeof arr === 'string' && arr) {
  1070 + result[mc.field] = arr
  1071 + result[listField] = arr.split(',').filter(Boolean)
  1072 + } else {
  1073 + result[mc.field] = ''
  1074 + result[listField] = []
  1075 + }
  1076 + })
  1077 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  1078 + result.procurementPlanReplenishLineList = lines.map(function (r) {
  1079 + var line = JSON.parse(JSON.stringify(r))
  1080 + if (r.shippingCost != null && r.shippingCost !== '') {
  1081 + line.shippingCost = Number(r.shippingCost)
  1082 + }
  1083 + if (r.loadingFee != null && r.loadingFee !== '') {
  1084 + line.loadingFee = Number(r.loadingFee)
  1085 + }
  1086 + if (r.actualPurchasePrice != null && r.actualPurchasePrice !== '') {
  1087 + line.actualPurchasePrice = Number(r.actualPurchasePrice)
  1088 + }
  1089 + if (r.includingShippingPrice != null && r.includingShippingPrice !== '') {
  1090 + line.includingShippingPrice = Number(r.includingShippingPrice)
  1091 + }
  1092 + if (r.coordinationRange != null && r.coordinationRange !== '') {
  1093 + line.coordinationRange = Number(r.coordinationRange)
  1094 + }
  1095 + if (r.priceListPrices != null && r.priceListPrices !== '') {
  1096 + line.priceListPrices = Number(r.priceListPrices)
  1097 + }
  1098 + if (r.quantity != null && r.quantity !== '') {
  1099 + line.quantity = Number(r.quantity)
  1100 + }
  1101 + if (r.estimatedLoss != null && r.estimatedLoss !== '') {
  1102 + line.estimatedLoss = Number(r.estimatedLoss)
  1103 + }
  1104 + if (r.applicationAttrition != null && r.applicationAttrition !== '') {
  1105 + line.applicationAttrition = Number(r.applicationAttrition)
  1106 + }
  1107 + return line
  1108 + })
  1109 + return result
  1110 + },
  1111 + checkForm() {
  1112 + if (!this.canEdit && !this.canEditWorkshop) return true
  1113 + if (this.canEdit) {
  1114 + if (!this.form.companyId && !this.form.companyShortId) {
  1115 + uni.showToast({ title: '请选择公司名称', icon: 'none' }); return false
  1116 + }
  1117 + if (!this.form.invoiceProductName) {
  1118 + uni.showToast({ title: '请输入开票品名', icon: 'none' }); return false
  1119 + }
  1120 + }
  1121 + if (this.canEditWorkshop) {
  1122 + var lines = Array.isArray(this.lineList) ? this.lineList : []
  1123 + for (var i = 0; i < lines.length; i++) {
  1124 + var l = lines[i]
  1125 + if (!l.workshopId) {
  1126 + uni.showToast({ title: '请选择第' + (i + 1) + '条明细的分厂', icon: 'none' }); return false
  1127 + }
  1128 + }
  1129 + }
  1130 + return true
  1131 + },
  1132 + async loadDetail(id) {
  1133 + try {
  1134 + var res = await procurementPlanReplenishFindByIdApi({ id: id })
  1135 + var d = (res && res.data) ? res.data : {}
  1136 + var self = this
  1137 + var boolFields = ['longTermOperation', 'terminalCustomer', 'priced', 'temporaryPrice', 'otherExpenseSettlement', 'commodityBuyout', 'qualityBuyout', 'quantityBuyout', 'doorDelivery', 'materialConditionEnabled']
  1138 + boolFields.forEach(function (f) {
  1139 + var v = d[f]
  1140 + if (typeof v === 'string') {
  1141 + d[f] = v === 'true' || v === '1'
  1142 + } else if (typeof v === 'number') {
  1143 + d[f] = v === 1
  1144 + } else {
  1145 + d[f] = !!v
  1146 + }
  1147 + })
  1148 + this.materialConditionConfigs.forEach(function (mc) {
  1149 + var v = d[mc.field]
  1150 + if (typeof v === 'string' && v) {
  1151 + d[mc.field] = v.split(',').filter(Boolean)
  1152 + } else if (!Array.isArray(v)) {
  1153 + d[mc.field] = []
  1154 + }
  1155 + })
  1156 + this.form = d
  1157 + this.lineList = Array.isArray(d.procurementPlanReplenishLineList) ? d.procurementPlanReplenishLineList.slice() : []
  1158 + this.form.companyId = d.companyId || d.companyShortId || ''
  1159 + this.form.companyShortId = d.companyShortId || d.companyId || ''
  1160 + this.form.companyShortName = d.companyShortName || d.shortName || d.companyName || d.name || ''
  1161 + this.form.companyName = d.companyName || d.companyShortName || d.shortName || d.name || ''
  1162 + this.form.priceTableId = d.priceTableId || d.priceId || ''
  1163 + this.form.priceId = d.priceId || d.priceTableId || ''
  1164 + this.buildAttachmentList()
  1165 + if (this.isGyglkjhgly && this.isAuditPage) {
  1166 + this.fillPriceTableFromDetail(d)
  1167 + } else if (this.canEdit) {
  1168 + this.fillPriceTableFromDetail(d)
  1169 + }
  1170 + } catch (e) {
  1171 + this.form = {}
  1172 + this.lineList = []
  1173 + this.attachmentList = []
  1174 + }
  1175 + },
  1176 + onPreviewAttachment(at) {
  1177 + if (!at || !at.id) {
  1178 + uni.showToast({ title: '无法查看', icon: 'none' })
  1179 + return
  1180 + }
  1181 + uni.showToast({ title: '查看附件 ' + at.name, icon: 'none' })
  1182 + }
  1183 + }
  1184 +}
  1185 +</script>
  1186 +
  1187 +<style lang="scss" scoped>
  1188 +.detail-page {
  1189 + background: #f3f3f3;
  1190 +}
  1191 +.scroll {
  1192 + flex: 1;
  1193 + padding: 8rpx 0 144rpx;
  1194 +}
  1195 +.title-header {
  1196 + display: flex;
  1197 + align-items: center;
  1198 + padding: 24rpx 32rpx 12rpx;
  1199 + background-color: #ffffff;
  1200 + margin-top: 20rpx;
  1201 + .title-header_icon {
  1202 + width: 36rpx;
  1203 + height: 36rpx;
  1204 + margin-right: 12rpx;
  1205 + }
  1206 + span {
  1207 + font-size: 34rpx;
  1208 + font-weight: 600;
  1209 + color: rgba(0, 0, 0, 0.9);
  1210 + }
  1211 +}
  1212 +.section {
  1213 + padding: 32rpx;
  1214 + background: #fff;
  1215 + margin-bottom: 20rpx;
  1216 +}
  1217 +.row {
  1218 + display: flex;
  1219 + margin-bottom: 28rpx;
  1220 + &:last-child { margin-bottom: 0; }
  1221 + &.company {
  1222 + font-size: 36rpx;
  1223 + font-weight: 600;
  1224 + color: rgba(0, 0, 0, 0.9);
  1225 + padding-top: 8rpx;
  1226 + line-height: 50rpx;
  1227 + }
  1228 + .label {
  1229 + max-width: 420rpx;
  1230 + margin-right: 20rpx;
  1231 + line-height: 32rpx;
  1232 + font-size: 28rpx;
  1233 + color: rgba(0, 0, 0, 0.6);
  1234 + }
  1235 + .value {
  1236 + flex: 1;
  1237 + line-height: 32rpx;
  1238 + font-size: 28rpx;
  1239 + color: rgba(0, 0, 0, 0.9);
  1240 + text-align: right;
  1241 + word-break: break-all;
  1242 + }
  1243 +}
  1244 +.attach-list {
  1245 + flex: 1;
  1246 + display: flex;
  1247 + flex-direction: column;
  1248 + align-items: flex-end;
  1249 + gap: 8rpx;
  1250 +}
  1251 +.attach-item {
  1252 + display: flex;
  1253 + align-items: center;
  1254 + gap: 16rpx;
  1255 + .attach-name {
  1256 + font-size: 26rpx;
  1257 + color: rgba(0, 0, 0, 0.9);
  1258 + }
  1259 + .attach-view {
  1260 + font-size: 26rpx;
  1261 + color: $theme-primary;
  1262 + }
  1263 +}
  1264 +.material-group {
  1265 + margin-top: 32rpx;
  1266 + &:first-child { margin-top: 0; }
  1267 +}
  1268 +.material-label {
  1269 + display: block;
  1270 + font-size: 28rpx;
  1271 + color: rgba(0, 0, 0, 0.6);
  1272 + margin-bottom: 20rpx;
  1273 +}
  1274 +.tag-list {
  1275 + display: flex;
  1276 + flex-wrap: wrap;
  1277 + gap: 16rpx;
  1278 +}
  1279 +.tag-btn {
  1280 + padding: 12rpx 24rpx;
  1281 + border: 1rpx solid #ddd;
  1282 + border-radius: 8rpx;
  1283 + font-size: 28rpx;
  1284 + color: #999;
  1285 + background: #f5f5f5;
  1286 +}
  1287 +.tag-btn.active {
  1288 + background: $theme-primary;
  1289 + border-color: $theme-primary;
  1290 + color: #fff;
  1291 +}
  1292 +.remark-text {
  1293 + font-size: 28rpx;
  1294 + color: rgba(0, 0, 0, 0.9);
  1295 + line-height: 1.6;
  1296 + white-space: pre-wrap;
  1297 +}
  1298 +
  1299 +.edit-list {
  1300 + background: #ffffff;
  1301 +}
  1302 +.serial-number-row {
  1303 + display: flex;
  1304 + justify-content: flex-end;
  1305 + align-items: center;
  1306 + flex: 1;
  1307 + .readonly-text {
  1308 + font-size: 28rpx;
  1309 + color: rgba(0, 0, 0, 0.9);
  1310 + }
  1311 + .value-code {
  1312 + font-weight: 600;
  1313 + color: $theme-primary;
  1314 + }
  1315 +}
  1316 +.item-title {
  1317 + display: flex;
  1318 + align-items: center;
  1319 + font-size: 28rpx;
  1320 + color: rgba(0, 0, 0, 0.6);
  1321 + line-height: 32rpx;
  1322 + .required {
  1323 + color: #dd524d;
  1324 + margin-right: 6rpx;
  1325 + }
  1326 +}
  1327 +.select-item.is-filled {
  1328 + .uni-list-item__content {
  1329 + color: rgba(0, 0, 0, 0.9) !important;
  1330 + }
  1331 +}
  1332 +.readonly-text {
  1333 + font-size: 28rpx;
  1334 + color: rgba(0, 0, 0, 0.9);
  1335 +}
  1336 +.edit-line-list {
  1337 + padding: 0;
  1338 +}
  1339 +.edit-line-block {
  1340 + background: #ffffff;
  1341 + margin-top: 20rpx;
  1342 + padding-bottom: 20rpx;
  1343 +}
  1344 +.line-title {
  1345 + padding: 20rpx 32rpx 10rpx;
  1346 + font-size: 30rpx;
  1347 + font-weight: 600;
  1348 + color: rgba(0, 0, 0, 0.9);
  1349 +}
  1350 +.empty-tip {
  1351 + padding: 60rpx 32rpx;
  1352 + text-align: center;
  1353 + color: rgba(0, 0, 0, 0.4);
  1354 + font-size: 26rpx;
  1355 +}
  1356 +.material-condition-section,
  1357 +.remark-section {
  1358 + background: #ffffff;
  1359 + margin-top: 20rpx;
  1360 + padding-bottom: 32rpx;
  1361 +}
  1362 +.section-header {
  1363 + display: flex;
  1364 + align-items: center;
  1365 + padding: 24rpx 32rpx 12rpx;
  1366 + .opCollapse {
  1367 + width: 36rpx;
  1368 + height: 36rpx;
  1369 + margin-right: 12rpx;
  1370 + }
  1371 + .section-title {
  1372 + font-size: 34rpx;
  1373 + font-weight: 600;
  1374 + color: rgba(0, 0, 0, 0.9);
  1375 + }
  1376 +}
  1377 +.section-content {
  1378 + padding: 16rpx 32rpx 0;
  1379 +}
  1380 +.form-row {
  1381 + display: flex;
  1382 + justify-content: space-between;
  1383 + align-items: center;
  1384 + padding: 16rpx 0;
  1385 + .form-label {
  1386 + font-size: 28rpx;
  1387 + color: rgba(0, 0, 0, 0.6);
  1388 + }
  1389 + .form-value {
  1390 + font-size: 28rpx;
  1391 + color: rgba(0, 0, 0, 0.9);
  1392 + }
  1393 +}
  1394 +:deep(.uni-list-item) {
  1395 + min-height: 104rpx;
  1396 + padding-left: 32rpx;
  1397 + padding-right: 32rpx;
  1398 + &::after {
  1399 + left: 32rpx;
  1400 + right: 32rpx;
  1401 + }
  1402 + &:last-child::after {
  1403 + display: none;
  1404 + }
  1405 +}
  1406 +:deep(.uni-list) {
  1407 + background-color: #ffffff;
  1408 +}
  1409 +:deep(.uni-easyinput__content-input),
  1410 +:deep(.uni-easyinput__content-textarea) {
  1411 + min-height: 72rpx;
  1412 + font-size: 28rpx;
  1413 + color: rgba(0, 0, 0, 0.9);
  1414 + &.is-disabled {
  1415 + color: rgba(0, 0, 0, 0.6);
  1416 + background: transparent;
  1417 + }
  1418 +}
  1419 +:deep(.uni-datetime-picker) {
  1420 + font-size: 28rpx;
  1421 + color: rgba(0, 0, 0, 0.9);
  1422 +}
  1423 +</style>
@@ -28,6 +28,7 @@ import ConfirmationFormApprove from '@/pages/confirmation_form/approve.vue' @@ -28,6 +28,7 @@ import ConfirmationFormApprove from '@/pages/confirmation_form/approve.vue'
28 import FollowUpFormViewer from '@/pages/follow_up_form/viewer.vue' 28 import FollowUpFormViewer from '@/pages/follow_up_form/viewer.vue'
29 import DomesticPlanViewer from '@/pages/domestic-plan/domesticPlanViewer.vue' 29 import DomesticPlanViewer from '@/pages/domestic-plan/domesticPlanViewer.vue'
30 import DomesticAgreementViewer from '@/pages/domestic-agreement/domesticAgreementViewer.vue' 30 import DomesticAgreementViewer from '@/pages/domestic-agreement/domesticAgreementViewer.vue'
  31 +import SupplePlanViewer from '@/pages/supple-plan/supplePlanViewer.vue'
31 32
32 export default function registerComponents(Vue) { 33 export default function registerComponents(Vue) {
33 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer) 34 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
@@ -60,4 +61,5 @@ export default function registerComponents(Vue) { @@ -60,4 +61,5 @@ export default function registerComponents(Vue) {
60 Vue.component('AgmtViewer', AgmtViewer) 61 Vue.component('AgmtViewer', AgmtViewer)
61 Vue.component('DomesticPlanViewer', DomesticPlanViewer) 62 Vue.component('DomesticPlanViewer', DomesticPlanViewer)
62 Vue.component('DomesticAgreementViewer', DomesticAgreementViewer) 63 Vue.component('DomesticAgreementViewer', DomesticAgreementViewer)
  64 + Vue.component('SupplePlanViewer', SupplePlanViewer)
63 } 65 }
@@ -147,6 +147,11 @@ export const getSysFlowComponentPath = (bizFlag) => { @@ -147,6 +147,11 @@ export const getSysFlowComponentPath = (bizFlag) => {
147 break; 147 break;
148 case 'PROCUREMENT_CONTRACT_EDIT': // 内贸协议 148 case 'PROCUREMENT_CONTRACT_EDIT': // 内贸协议
149 componentPath = 'DomesticAgreementViewer'; // 内贸协议-审批 149 componentPath = 'DomesticAgreementViewer'; // 内贸协议-审批
  150 + case 'PLAN_REPLENISH': // 补库计划
  151 + componentPath = 'SupplePlanViewer'; // 补库计划-审批详情
  152 + break;
  153 + case 'PLAN_REPLENISH_EDIT': // 补库计划
  154 + componentPath = 'SupplePlanViewer'; // 补库计划-审批
150 break; 155 break;
151 } 156 }
152 return componentPath; 157 return componentPath;