|
@@ -9,6 +9,7 @@
|
|
|
:loading="loading"
|
|
|
tooltip-effect="dark"
|
|
|
show-summary
|
|
|
+ border
|
|
|
:summary-method="getSummaries"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
@@ -76,6 +77,18 @@
|
|
|
<el-button round size="mini" @click="gotoGoods(scope.row.good_id)">{{ scope.row.no }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="配置项" min-width="200" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.config_options && scope.row.config_options.length > 0">
|
|
|
+ <div v-for="option in scope.row.config_options" :key="option.id" class="config-item-row">
|
|
|
+ <el-tag size="mini">{{ option.name }}:</el-tag>
|
|
|
+ <el-tag size="mini" type="info" style="margin-left: 5px">{{ option.value }}</el-tag>
|
|
|
+ <el-tag v-if="option.material_code" size="mini" type="warning" style="margin-left:2px;">({{ option.material_code }})</el-tag>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span v-else>无配置项</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="good_type" label="类型" width="100"></el-table-column>
|
|
|
<el-table-column v-if="params.type === '2'" label="总需数量" prop="count1"></el-table-column>
|
|
|
<el-table-column v-if="params.type === '2'" label="已产数量" prop="count2"></el-table-column>
|
|
@@ -223,11 +236,21 @@ export default {
|
|
|
if (this.params.type > 1) {
|
|
|
API_orderItems.getPageGroupList(this.params).then(response => {
|
|
|
this.loading = false
|
|
|
+ response.data.map(item => {
|
|
|
+ if (item.config_data) {
|
|
|
+ item.config_options = JSON.parse(item.config_data)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.tableData = response
|
|
|
}).catch(() => (this.loading = false))
|
|
|
} else {
|
|
|
API_orderItems.getPageList(this.params).then(response => {
|
|
|
this.loading = false
|
|
|
+ response.data.map(item => {
|
|
|
+ if (item.config_data) {
|
|
|
+ item.config_options = JSON.parse(item.config_data)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.tableData = response
|
|
|
}).catch(() => (this.loading = false))
|
|
|
}
|
|
@@ -446,6 +469,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.config-item-row {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
.el-select {
|
|
|
width: 130px;
|
|
|
}
|