U 产品包含0120 在详情页面可以跳转到 0120的详情页面
| | |
| | | :pagination="false" |
| | | :expandRowByClick="true" |
| | | :row-key="(record, index) => record.subCode + '_' + index" |
| | | :rowClassName=" |
| | | (record) => |
| | | record.children && record.children.length |
| | | ? 'is-replace' |
| | | : '' |
| | | " |
| | | :rowClassName="rowClassFn" |
| | | > |
| | | <template slot="dataIndex" slot-scope="text, record, index"> |
| | | {{ index + 1 }} |
| | |
| | | <a>软件列表</a> |
| | | </a-popover> |
| | | </template> |
| | | <template v-if="/^0120/.test(record.subCode)"> |
| | | <a-divider |
| | | v-if=" |
| | | record.softwares && |
| | | record.softwares.length && |
| | | canDownloadSoftware |
| | | " |
| | | type="vertical" |
| | | ></a-divider> |
| | | <a href="javascript:;" @click="toDetails0120(record)" |
| | | >详情</a |
| | | > |
| | | </template> |
| | | </template> |
| | | </a-table> |
| | | </a-spin> |
| | |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | v-if="!currentVersion.enabled && canLockBom" |
| | | v-if="!currentVersion.enabled && canLockBom && maxVersionid == currentVersion.id" |
| | | @click="changeStatus" |
| | | >激活版本</a-button |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | v-if="currentVersion.enabled && canLockBom" |
| | | v-if="currentVersion.enabled && canLockBom && maxVersionid == currentVersion.id" |
| | | @click="changeStatus" |
| | | >锁定版本</a-button |
| | | > |
| | |
| | | webUrl: getWebUrl(), |
| | | record: {}, |
| | | currentVersion: -1, |
| | | // 0120的锁定激活只能操作版本列表中第一个(最大版本号) |
| | | // 最新的版本的id |
| | | maxVersionid: -1, |
| | | spinning: false, |
| | | loading: false, |
| | | total: 0, |
| | |
| | | canLockBom() { |
| | | return checkPermit(PERMITS.lockBom, this.permits); |
| | | }, |
| | | is0120() { |
| | | return /^0120/.test(this.parentCode); |
| | | }, |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | |
| | | // res = res.data; |
| | | const { code, data, data2 } = res; |
| | | let list = []; |
| | | let maxVersionid = -1; |
| | | if (code && data) { |
| | | list = data2; |
| | | list.forEach((v) => { |
| | | maxVersionid = v.id > maxVersionid ? v.id : maxVersionid; |
| | | }); |
| | | } |
| | | this.maxVersionid = maxVersionid; |
| | | this.versionList = list; |
| | | } |
| | | }, |
| | |
| | | toggleSide() { |
| | | this.sideVisible = !this.sideVisible; |
| | | }, |
| | | rowClassFn(record) { |
| | | let classList = []; |
| | | if (record.children && record.children.length) { |
| | | classList.push("is-replace"); |
| | | } |
| | | if (/^0120/.test(record.subCode)) { |
| | | classList.push("is-0120"); |
| | | } |
| | | return classList; |
| | | }, |
| | | toDetails0120(record) { |
| | | const { |
| | | subCode: parentCode, |
| | | subModel: parentModel, |
| | | subName: parentName, |
| | | } = record; |
| | | this.$router.push({ |
| | | path: "/resource/product-details-0120", |
| | | query: { parentCode, customCode: "", parentModel, parentName }, |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.sendMessage(); |
| | |
| | | /deep/.ant-table-row-level-1.ant-table-row-level-1:hover > td { |
| | | background: #ffbcc9; |
| | | } |
| | | /deep/.is-0120 > td { |
| | | background: #ffae00; |
| | | } |
| | | /deep/.is-0120.is-0120.ant-table-row-hover > td, |
| | | /deep/.is-0120.is-0120:hover > td { |
| | | background: #f8c34f; |
| | | } |
| | | } |
| | | /deep/.ant-descriptions-row > th, |
| | | /deep/.ant-descriptions-row > td { |
| | |
| | | goDetails(record) { |
| | | // console.log(record); |
| | | const { parentCode, customCode, parentModel, parentName } = record; |
| | | let is0120 = /^0120/.test(parentCode); |
| | | this.$router.push({ |
| | | path: "/resource/product-details", |
| | | path: is0120 ? "/resource/product-details-0120" : "/resource/product-details", |
| | | query: { parentCode, customCode, parentModel, parentName }, |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | component: () => import('@/pages/resourceManage/product/prodDiff'), |
| | | }, |
| | | // 0120详情 |
| | | { |
| | | path: 'product-details-0120', |
| | | name: '钣金件详情', |
| | | meta: { |
| | | invisible: true, |
| | | highlight: '/resource/product' |
| | | }, |
| | | component: () => import('@/pages/resourceManage/product/details'), |
| | | }, |
| | | { |
| | | path: 'software', |
| | | name: '软件中心', |