|
|
@@ -35,24 +35,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:remark="{ row }">
|
|
|
- <el-input placeholder="备注" v-model="row.remark"></el-input>
|
|
|
+ <el-input placeholder="备注" v-model="row.remark"></el-input>
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:action="{ row, $index }">
|
|
|
- <template v-if="row.orderSource != 1">
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
-
|
|
|
-
|
|
|
- >
|
|
|
- 设置物料
|
|
|
+ <template >
|
|
|
+ <el-link type="primary" :underline="false" @click="categorySelect">
|
|
|
+ 添加物料
|
|
|
</el-link>
|
|
|
- <el-popconfirm
|
|
|
- class="ele-action"
|
|
|
- title="确定要删除此销售订单吗?"
|
|
|
- @confirm="remove(row, $index)"
|
|
|
- >
|
|
|
+ <el-popconfirm class="ele-action" title="确定要删除此销售订单吗?" @confirm="remove(row, $index)">
|
|
|
<template v-slot:reference>
|
|
|
<el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
删除
|
|
|
@@ -63,6 +54,38 @@
|
|
|
</template>
|
|
|
|
|
|
|
|
|
+ <!-- 展开内容 -->
|
|
|
+ <template v-slot:expand="{ row }">
|
|
|
+ <div style="width:100%; min-height: 60px" v-if="row.materialList">
|
|
|
+ <ele-pro-table :toolbar="false" toolsTheme="none" ref="table2" :need-page="false"
|
|
|
+ :datasource="row.materialList" :columns="columns2" row-key="id">
|
|
|
+
|
|
|
+ <template v-slot:categoryName="{ row, $index }">
|
|
|
+ <el-input :value="row.categoryName" placeholder="请选择"
|
|
|
+ @click.native="categorySelect(row, $index)"></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+ <template v-slot:unit="{ row }">
|
|
|
+ <DictSelection dictName="计量单位" v-model="row.unit"></DictSelection>
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
+ <template v-slot:count="{ row }">
|
|
|
+ <el-input v-model="row.count" placeholder="请输入" @input="(value) =>
|
|
|
+ (row.count = value.replace(
|
|
|
+ /^(-)*(\d+)\.(\d\d\d\d\d\d).*$/,
|
|
|
+ '$1$2.$3'
|
|
|
+ ))
|
|
|
+ "></el-input>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </ele-pro-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
</ele-pro-table>
|
|
|
|
|
|
</el-form>
|
|
|
@@ -75,8 +98,9 @@
|
|
|
|
|
|
<saleOrderPop ref="saleOrderRef" @chooseOrder="chooseOrder"></saleOrderPop>
|
|
|
|
|
|
- <!-- 选择物料 -->
|
|
|
- <ChooseMaterial ref="chooseRef" @success="handleChooseMaterial"></ChooseMaterial>
|
|
|
+
|
|
|
+
|
|
|
+ <ProductModal ref="productRefs" />
|
|
|
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
@@ -85,14 +109,14 @@
|
|
|
|
|
|
import saleOrderPop from './saleOrderPop.vue'
|
|
|
|
|
|
-import ChooseMaterial from '@/components/CreatePlan/ChooseMaterial.vue';
|
|
|
|
|
|
+import ProductModal from './ProductModal.vue'
|
|
|
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
saleOrderPop,
|
|
|
- ChooseMaterial,
|
|
|
+ ProductModal
|
|
|
|
|
|
|
|
|
},
|
|
|
@@ -107,7 +131,13 @@ export default {
|
|
|
|
|
|
// 表格列配置
|
|
|
columns: [
|
|
|
-
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'expand',
|
|
|
+ columnKey: 'materialList',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'expand'
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
prop: 'code',
|
|
|
@@ -115,7 +145,7 @@ export default {
|
|
|
slot: 'code',
|
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
|
- minWidth: 110
|
|
|
+ minWidth: 120
|
|
|
},
|
|
|
{
|
|
|
prop: 'customerName',
|
|
|
@@ -165,7 +195,7 @@ export default {
|
|
|
align: 'center',
|
|
|
minWidth: 110
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
@@ -177,6 +207,40 @@ export default {
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
],
|
|
|
+
|
|
|
+ columns2: [
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '物料名称',
|
|
|
+ prop: 'categoryName',
|
|
|
+ slot: 'categoryName',
|
|
|
+ action: 'categoryName'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '物料编码',
|
|
|
+ prop: 'categoryCode'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '牌号',
|
|
|
+ prop: 'brandNum'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '型号',
|
|
|
+ prop: 'modelType'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '数量',
|
|
|
+ slot: 'count',
|
|
|
+ action: 'count'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '单位',
|
|
|
+ slot: 'unit',
|
|
|
+ action: 'unit'
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
rules: {
|
|
|
materialName: [
|
|
|
{
|
|
|
@@ -237,16 +301,24 @@ export default {
|
|
|
},
|
|
|
|
|
|
chooseOrder(list) {
|
|
|
- this.$refs.table.setData([...list]);
|
|
|
+ this.$refs.table.setData([...this.tableData, ...list]);
|
|
|
},
|
|
|
|
|
|
- remove (row, index) {
|
|
|
- let _arr = this.$refs.table.getData() || [];
|
|
|
- _arr.splice(index, 1);
|
|
|
- this.$refs.table.setData([..._arr]);
|
|
|
- },
|
|
|
+ remove(row, index) {
|
|
|
+ let _arr = this.$refs.table.getData() || [];
|
|
|
+ _arr.splice(index, 1);
|
|
|
+ this.$refs.table.setData([..._arr]);
|
|
|
+ },
|
|
|
+
|
|
|
+ categorySelect(row) {
|
|
|
+ this.current = row;
|
|
|
+ this.$refs.productRefs.open(row.materialList, this.current, 1)
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- handleChooseMaterial() { },
|
|
|
|
|
|
|
|
|
chooseVersion() {
|