|
@@ -24,7 +24,6 @@ import { required, mobileRequired, mobile } from '@/components/template/rules_ve
|
|
|
import { materialNormList, materialNormListExport, materialNormAdd, materialNormEdit, materialNormDetail, materialNormBatchUpdateStatus } from "@/api/auxiliaryChargeManagement";
|
|
|
import { materialCategoryTree } from "@/api/auxiliaryMaterialClass";
|
|
|
import { getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
|
|
|
-
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
|
mixins: [import_mixin],
|
|
@@ -41,11 +40,45 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量上架',
|
|
|
+ isRole: true,
|
|
|
+ click: () => {
|
|
|
+ if (this.recordSelected.length) {
|
|
|
+ this.setRowStatus("ON")
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: `请先勾选需要设置的数据!`,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量下架',
|
|
|
+ isRole: true,
|
|
|
+ click: () => {
|
|
|
+ if (this.recordSelected.length) {
|
|
|
+ this.setRowStatus("OFF")
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: `请先勾选需要设置的数据!`,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ ],
|
|
|
],
|
|
|
// 表格属性
|
|
|
tableAttributes: {
|
|
|
// 启用勾选列
|
|
|
- selectColumn: false
|
|
|
+ selectColumn: true
|
|
|
},
|
|
|
// 表格事件
|
|
|
tableEvents: {
|
|
@@ -316,10 +349,11 @@ export default {
|
|
|
return (
|
|
|
<div class='operation-btns'>
|
|
|
<el-button type="text" onClick={() => {
|
|
|
- Object.assign(this.formData, row)
|
|
|
- this.formDialogType = 1
|
|
|
- this.openForm()
|
|
|
- {/* materialNormDetail({ id: row.normId }).then(res => {}) */ }
|
|
|
+ materialNormDetail({ id: row.normId }).then(res => {
|
|
|
+ Object.assign(this.formData, res.data)
|
|
|
+ this.formDialogType = 1
|
|
|
+ this.openForm()
|
|
|
+ })
|
|
|
}}>编辑</el-button>
|
|
|
</div>
|
|
|
)
|
|
@@ -335,7 +369,6 @@ export default {
|
|
|
]).then(([res1, res2]) => {
|
|
|
this.partsUnitList = res1.data.records
|
|
|
this.materialCategoryTree = res2.data
|
|
|
- console.log(this.materialCategoryTree)
|
|
|
this.formDialog = true;
|
|
|
})
|
|
|
},
|
|
@@ -354,6 +387,15 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ setRowStatus(type) {
|
|
|
+ materialNormBatchUpdateStatus({
|
|
|
+ ids: this.recordSelected.map(item => item.normId).join(','),
|
|
|
+ stateEnum: type
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: `设置成功!` })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|