|
@@ -22,18 +22,18 @@
|
|
<el-form-item label="图号">
|
|
<el-form-item label="图号">
|
|
<el-input v-model="dataForm.mapNumber" placeholder="图号" clearable/>
|
|
<el-input v-model="dataForm.mapNumber" placeholder="图号" clearable/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="是否组合">
|
|
|
|
- <el-select
|
|
|
|
- v-model="dataForm.isCompose"
|
|
|
|
- placeholder="请选择">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in optionsCompose"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+<!-- <el-form-item label="是否组合">-->
|
|
|
|
+<!-- <el-select-->
|
|
|
|
+<!-- v-model="dataForm.isCompose"-->
|
|
|
|
+<!-- placeholder="请选择">-->
|
|
|
|
+<!-- <el-option-->
|
|
|
|
+<!-- v-for="item in optionsCompose"-->
|
|
|
|
+<!-- :key="item.value"-->
|
|
|
|
+<!-- :label="item.label"-->
|
|
|
|
+<!-- :value="item.value">-->
|
|
|
|
+<!-- </el-option>-->
|
|
|
|
+<!-- </el-select>-->
|
|
|
|
+<!-- </el-form-item>-->
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="search()">查询</el-button>
|
|
<el-button @click="search()">查询</el-button>
|
|
<el-button v-if="isAuth('pro:product:save')" type="primary" @click="addOrUpdateHandle(0, false)">新建</el-button>
|
|
<el-button v-if="isAuth('pro:product:save')" type="primary" @click="addOrUpdateHandle(0, false)">新建</el-button>
|
|
@@ -47,8 +47,16 @@
|
|
row-key="productId"
|
|
row-key="productId"
|
|
border
|
|
border
|
|
:indent='20'
|
|
:indent='20'
|
|
|
|
+ lazy
|
|
|
|
+ :load="loadingData"
|
|
v-loading="dataListLoading"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%;">
|
|
style="width: 100%;">
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="序号"
|
|
|
|
+ type="index"
|
|
|
|
+ width="50"
|
|
|
|
+ align="center">
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="productCode"
|
|
prop="productCode"
|
|
header-align="center"
|
|
header-align="center"
|
|
@@ -328,7 +336,7 @@
|
|
import AddOrUpdate from './product-add-or-update'
|
|
import AddOrUpdate from './product-add-or-update'
|
|
import Detail from './product-detail'
|
|
import Detail from './product-detail'
|
|
import { getDictList } from '@/api/dict'
|
|
import { getDictList } from '@/api/dict'
|
|
- import { getProductList } from '@/api/product'
|
|
|
|
|
|
+ import { getProductList, getChildren } from '@/api/product'
|
|
import CraftsDetail from './crafts-detail'
|
|
import CraftsDetail from './crafts-detail'
|
|
import ProductDrawDetail from './product-draw-detail'
|
|
import ProductDrawDetail from './product-draw-detail'
|
|
import AttachDetail from '../common/attach-detail'
|
|
import AttachDetail from '../common/attach-detail'
|
|
@@ -417,8 +425,8 @@ export default {
|
|
}
|
|
}
|
|
getProductList(params).then(({data}) => {
|
|
getProductList(params).then(({data}) => {
|
|
if (data && data.code === '200') {
|
|
if (data && data.code === '200') {
|
|
- // this.dataList = data.data.records
|
|
|
|
- this.dataList = JSON.parse(JSON.stringify(data.data.records).replace(/"children":null/g, '"children":[]'))
|
|
|
|
|
|
+ this.dataList = data.data.records
|
|
|
|
+ // this.dataList = JSON.parse(JSON.stringify(data.data.records).replace(/"children":null/g, '"children":[]'))
|
|
this.dataList.forEach(item => {
|
|
this.dataList.forEach(item => {
|
|
if (item.attachList2 && item.attachList2.length > 0) {
|
|
if (item.attachList2 && item.attachList2.length > 0) {
|
|
item.simplePic = downloadUrl + item.attachList2[0].url
|
|
item.simplePic = downloadUrl + item.attachList2[0].url
|
|
@@ -727,6 +735,15 @@ export default {
|
|
},
|
|
},
|
|
templateDownload () {
|
|
templateDownload () {
|
|
location.href = this.$http.adornUrl(`/biz-service/product/template/download?_token=${Vue.cookie.get('token')}`)
|
|
location.href = this.$http.adornUrl(`/biz-service/product/template/download?_token=${Vue.cookie.get('token')}`)
|
|
|
|
+ },
|
|
|
|
+ loadingData (row, treeNode, resolve) {
|
|
|
|
+ getChildren(row.productId).then(({data}) => {
|
|
|
|
+ if (data && data.code === '200') {
|
|
|
|
+ resolve(data.data)
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(data.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|