|
@@ -9,6 +9,7 @@
|
|
|
<!-- 数据表格 -->
|
|
<!-- 数据表格 -->
|
|
|
<div>
|
|
<div>
|
|
|
<el-form
|
|
<el-form
|
|
|
|
|
+ ref="formRef"
|
|
|
label-position="left"
|
|
label-position="left"
|
|
|
class="ele-form-search"
|
|
class="ele-form-search"
|
|
|
:model="formData"
|
|
:model="formData"
|
|
@@ -68,6 +69,7 @@
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
v-model="formData.type"
|
|
v-model="formData.type"
|
|
|
clearable
|
|
clearable
|
|
|
|
|
+ :disabled="isView"
|
|
|
@change="handleOutInChange"
|
|
@change="handleOutInChange"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
@@ -85,6 +87,7 @@
|
|
|
filterable
|
|
filterable
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
v-model="formData.bizType"
|
|
v-model="formData.bizType"
|
|
|
|
|
+ :disabled="isView"
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
@@ -102,6 +105,7 @@
|
|
|
filterable
|
|
filterable
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
v-model="formData.categoryLevelId"
|
|
v-model="formData.categoryLevelId"
|
|
|
|
|
+ :disabled="isView"
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
@@ -233,7 +237,7 @@
|
|
|
status: 2,
|
|
status: 2,
|
|
|
keyWord: '',
|
|
keyWord: '',
|
|
|
bizType: '',
|
|
bizType: '',
|
|
|
- assetType: '',
|
|
|
|
|
|
|
+ categoryLevelId: '',
|
|
|
type: ''
|
|
type: ''
|
|
|
},
|
|
},
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -374,153 +378,153 @@
|
|
|
// }
|
|
// }
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- if (!this.isView) {
|
|
|
|
|
|
|
+ // if (!this.isView) {
|
|
|
return arr.filter((item) => item != '');
|
|
return arr.filter((item) => item != '');
|
|
|
- }
|
|
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
- if (this.isView) {
|
|
|
|
|
- return [
|
|
|
|
|
- {
|
|
|
|
|
- type: 'index',
|
|
|
|
|
- label: '序号',
|
|
|
|
|
- width: 50,
|
|
|
|
|
- align: 'center'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'categoryCode',
|
|
|
|
|
- label: '物品编码',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'categoryName',
|
|
|
|
|
- label: '物品名称',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'categoryLevelPath',
|
|
|
|
|
- label: '物品类型',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'specification',
|
|
|
|
|
- label: '规格',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- width: 160,
|
|
|
|
|
- prop: 'inStorageTime',
|
|
|
|
|
- label: '出入库时间',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // if (this.isView) {
|
|
|
|
|
+ // return [
|
|
|
|
|
+ // {
|
|
|
|
|
+ // type: 'index',
|
|
|
|
|
+ // label: '序号',
|
|
|
|
|
+ // width: 50,
|
|
|
|
|
+ // align: 'center'
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'categoryCode',
|
|
|
|
|
+ // label: '物品编码',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'categoryName',
|
|
|
|
|
+ // label: '物品名称',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'categoryLevelPath',
|
|
|
|
|
+ // label: '物品类型',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'specification',
|
|
|
|
|
+ // label: '规格',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // width: 160,
|
|
|
|
|
+ // prop: 'inStorageTime',
|
|
|
|
|
+ // label: '出入库时间',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'bizNo',
|
|
|
|
|
- label: '单号',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- slot: 'bizNo',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'inBizType',
|
|
|
|
|
- slot: 'inBizType',
|
|
|
|
|
- label: '出入库类型',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- width: 150,
|
|
|
|
|
- formatter: (row) => {
|
|
|
|
|
- return (
|
|
|
|
|
- sceneState.find((item) => item.code == row.inBizType).label ??
|
|
|
|
|
- ''
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'bizNo',
|
|
|
|
|
+ // label: '单号',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // slot: 'bizNo',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'inBizType',
|
|
|
|
|
+ // slot: 'inBizType',
|
|
|
|
|
+ // label: '出入库类型',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // width: 150,
|
|
|
|
|
+ // formatter: (row) => {
|
|
|
|
|
+ // return (
|
|
|
|
|
+ // sceneState.find((item) => item.code == row.inBizType).label ??
|
|
|
|
|
+ // ''
|
|
|
|
|
+ // );
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'supplierName',
|
|
|
|
|
- label: '往来单位',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'warehouseName',
|
|
|
|
|
- label: '仓库名称',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'remark',
|
|
|
|
|
- label: '备注',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'supplierName',
|
|
|
|
|
+ // label: '往来单位',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'warehouseName',
|
|
|
|
|
+ // label: '仓库名称',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'remark',
|
|
|
|
|
+ // label: '备注',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'inQuantity',
|
|
|
|
|
- label: '入库数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'inQuantity',
|
|
|
|
|
+ // label: '入库数量',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'inUnitPrice',
|
|
|
|
|
- label: '入库单价',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'inPrice',
|
|
|
|
|
- label: '入库成本小计',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'outQuantity',
|
|
|
|
|
- label: '出库数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'outUnitPrice',
|
|
|
|
|
- label: '出库单价',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'outPrice',
|
|
|
|
|
- label: '出库成本小计',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'totalQuantity',
|
|
|
|
|
- label: '结存数量',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'totalUnitPrice',
|
|
|
|
|
- label: '结存单位成本',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'totalPrice',
|
|
|
|
|
- label: '结存成本',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- showOverflowTooltip: true
|
|
|
|
|
- }
|
|
|
|
|
- ];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'inUnitPrice',
|
|
|
|
|
+ // label: '入库单价',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'inPrice',
|
|
|
|
|
+ // label: '入库成本小计',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'outQuantity',
|
|
|
|
|
+ // label: '出库数量',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'outUnitPrice',
|
|
|
|
|
+ // label: '出库单价',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'outPrice',
|
|
|
|
|
+ // label: '出库成本小计',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'totalQuantity',
|
|
|
|
|
+ // label: '结存数量',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'totalUnitPrice',
|
|
|
|
|
+ // label: '结存单位成本',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'totalPrice',
|
|
|
|
|
+ // label: '结存成本',
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // showOverflowTooltip: true
|
|
|
|
|
+ // }
|
|
|
|
|
+ // ];
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
clientEnvironmentId() {
|
|
clientEnvironmentId() {
|
|
|
return this.$store.state.user.info.clientEnvironmentId;
|
|
return this.$store.state.user.info.clientEnvironmentId;
|
|
@@ -642,9 +646,13 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async open(isView, row) {
|
|
async open(isView, row) {
|
|
|
- console.log(row);
|
|
|
|
|
|
|
+ console.log('open', row, this.$refs.formRef);
|
|
|
|
|
+ if(this.$refs.formRef) {
|
|
|
|
|
+ this.$refs.formRef.resetFields()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (isView) {
|
|
if (isView) {
|
|
|
- await this.getList(row);
|
|
|
|
|
|
|
+ // await this.getList(row);
|
|
|
|
|
|
|
|
// this.tableList = row.info.map((item) => {
|
|
// this.tableList = row.info.map((item) => {
|
|
|
// return {
|
|
// return {
|
|
@@ -652,7 +660,7 @@
|
|
|
// startTime: this.getDate(new Date(Number(item.startTime)))
|
|
// startTime: this.getDate(new Date(Number(item.startTime)))
|
|
|
// };
|
|
// };
|
|
|
// });
|
|
// });
|
|
|
- console.log(this.tableList);
|
|
|
|
|
|
|
+ // console.log(this.tableList);
|
|
|
|
|
|
|
|
this.formData.code = row.code;
|
|
this.formData.code = row.code;
|
|
|
this.formData.name = row.name;
|
|
this.formData.name = row.name;
|
|
@@ -660,6 +668,9 @@
|
|
|
this.formData.time =
|
|
this.formData.time =
|
|
|
row.startTime && row.endTime ? [row.startTime, row.endTime] : [];
|
|
row.startTime && row.endTime ? [row.startTime, row.endTime] : [];
|
|
|
this.formData.keyWord = row.keyWord;
|
|
this.formData.keyWord = row.keyWord;
|
|
|
|
|
+ this.formData.type = row.isType;
|
|
|
|
|
+ this.formData.bizType = row.bizType;
|
|
|
|
|
+ this.formData.categoryLevelId = row.categoryLevelId;
|
|
|
} else {
|
|
} else {
|
|
|
this.tableList = [];
|
|
this.tableList = [];
|
|
|
this.formData = {
|
|
this.formData = {
|
|
@@ -667,7 +678,10 @@
|
|
|
name: '',
|
|
name: '',
|
|
|
status: 2,
|
|
status: 2,
|
|
|
time: [],
|
|
time: [],
|
|
|
- keyWord: ''
|
|
|
|
|
|
|
+ keyWord: '',
|
|
|
|
|
+ type: '',
|
|
|
|
|
+ bizType: '',
|
|
|
|
|
+ categoryLevelId: ''
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
this.isView = isView;
|
|
this.isView = isView;
|
|
@@ -678,9 +692,9 @@
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
async datasource({ page, limit, where, order }) {
|
|
async datasource({ page, limit, where, order }) {
|
|
|
- if (this.isView) {
|
|
|
|
|
- return this.tableList;
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ // if (this.isView) {
|
|
|
|
|
+ // return this.tableList;
|
|
|
|
|
+ // } else {
|
|
|
const params = Object.assign({}, this.formData);
|
|
const params = Object.assign({}, this.formData);
|
|
|
if (params.time?.length) {
|
|
if (params.time?.length) {
|
|
|
params.startTime = params.time[0];
|
|
params.startTime = params.time[0];
|
|
@@ -697,7 +711,7 @@
|
|
|
console.log(data);
|
|
console.log(data);
|
|
|
this.tableList = data;
|
|
this.tableList = data;
|
|
|
return data;
|
|
return data;
|
|
|
- }
|
|
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
search() {
|
|
search() {
|
|
|
this.$refs.table.reload();
|
|
this.$refs.table.reload();
|
|
@@ -705,6 +719,10 @@
|
|
|
reset() {
|
|
reset() {
|
|
|
this.formData.time = [];
|
|
this.formData.time = [];
|
|
|
this.formData.keyWord = '';
|
|
this.formData.keyWord = '';
|
|
|
|
|
+ this.formData.type = '';
|
|
|
|
|
+ this.formData.bizType = '';
|
|
|
|
|
+ this.formData.categoryLevelId = '';
|
|
|
|
|
+ this.$refs.formRef.resetFields()
|
|
|
this.search();
|
|
this.search();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|