7/2 系统管理

演示数据2.0
wangwei 1 year ago
parent 98e7a7b264
commit 31e87e7c6a

@ -147,7 +147,7 @@
<modifyDialog :inputQuery="inputQuery" :modifySubmit="onModifySubmit"></modifyDialog>
<div style="text-align: center;margin-top: 12px">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
:disabled="!configParams.typeScan"
:disabled="!configParams.typeScan" :loading="subLoading"
>提交
</el-button
>
@ -291,7 +291,8 @@ export default {
uploadFileUrl: null,
headers: {},
configParams: {},
loading: false
loading: false,
subLoading: false,
}
},
@ -448,10 +449,12 @@ export default {
if(!(this.inputQuery.mainAction =='WareHouseIn' && this.inputQuery.actionType == 1)){
this.inputQuery.devInType = 0;
}
this.subLoading = true
updateBusType(this.inputQuery)
.then((response) => {
this.subLoading = false
if (response.code == 20000) {
this.loading = false
// this.loading = false
this.cancelDialog()
this.getList()
} else {
@ -459,7 +462,7 @@ export default {
}
})
.catch(() => {
this.loading = false
this.subLoading = false
this.cancelDialog()
})
},

@ -112,7 +112,7 @@
</el-col>
</el-row>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="saveSpace"
<el-button type="primary" size="small" icon="search" @click="saveSpace" :loading="saveSpaceLoading"
>提交
</el-button
>
@ -186,7 +186,8 @@ export default {
{required: true, message: "请输入货位名称", trigger: "blur"}
],
},
modifySubInvList: []
modifySubInvList: [],
saveSpaceLoading: false,
};
},
watch: {
@ -303,7 +304,9 @@ export default {
saveSpace() {
this.$refs['formData'].validate((valid) => {
if (valid) {
this.saveSpaceLoading = true
saveSpace(this.formData, this.formName).then((res) => {
this.saveSpaceLoading = false
if (res.code === 20000) {
if ("add" === this.formName) {
this.$message.success("新增成功");

@ -5,7 +5,8 @@
<p class="form-title">配送企业资质设置</p>
</div>
<div style=" float: right; text-align: right; margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addCert" style="text-align:right">添加设置</el-button>
<el-button type="primary" size="mini" icon="search" @click="addCert" style="text-align:right">添加设置
</el-button>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
@ -73,13 +74,14 @@
<el-col :span="22">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentSup.remark" style="width: 95.5%" auto-complete="off" type="textarea"
autosize></el-input>
autosize
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
<el-button type="primary" size="small" icon="search" @click="onAddSubmit" :loading="addLoading"
>提交
</el-button
>
@ -99,8 +101,11 @@
</div>
<div style=" float: right;
text-align: right;
margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addManufacturerCert" style="text-align:right">添加设置</el-button>
margin-bottom: 8px;"
>
<el-button type="primary" size="mini" icon="search" @click="addManufacturerCert" style="text-align:right">
添加设置
</el-button>
</div>
<el-table v-loading="loading" :data="manufacturerList" style="width: 100%" border highlight-current-row>
@ -149,17 +154,22 @@
:isShow="false"
>
<el-form :model="currentManufacturer" label-width="100px" :rules="formManufactureRules" ref="dataManufacturerForm">
<el-form :model="currentManufacturer" label-width="100px" :rules="formManufactureRules"
ref="dataManufacturerForm"
>
<el-row>
<el-col :span="11">
<el-form-item label="证书名称:" prop="name">
<el-input v-model="currentManufacturer.name" auto-complete="off" :disabled="currentManufacturer.need"></el-input>
<el-input v-model="currentManufacturer.name" auto-complete="off" :disabled="currentManufacturer.need"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="产地:" prop="foreign">
<el-select v-model="currentManufacturer.foreign" style="width: 100%" :disabled="currentManufacturer.need">
<el-select v-model="currentManufacturer.foreign" style="width: 100%"
:disabled="currentManufacturer.need"
>
<el-option label="全部" :value="1"></el-option>
<el-option label="国外" :value="2"></el-option>
<el-option label="国内" :value="3"></el-option>
@ -179,13 +189,14 @@
<el-col :span="11">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentManufacturer.remark" auto-complete="off" type="textarea"
autosize></el-input>
autosize
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddManufacturerSubmit"
<el-button type="primary" size="small" icon="search" @click="onAddManufacturerSubmit" :loading="onAddManufacturerSubmitLoading"
>提交
</el-button
>
@ -205,8 +216,10 @@
</div>
<div style="float:right;
text-align: right;
margin-bottom: 8px;">
<el-button type="primary" size="mini" icon="search" @click="addProductCert" style="text-align:right">添加设置</el-button>
margin-bottom: 8px;"
>
<el-button type="primary" size="mini" icon="search" @click="addProductCert" style="text-align:right">添加设置
</el-button>
</div>
<el-table v-loading="productLoading" :data="productList" style="width: 100%" border highlight-current-row>
@ -321,7 +334,8 @@
<el-col :span="11">
<el-form-item label="说明:" prop="remark">
<el-input v-model="currentProduct.remark" style="width: 90%" auto-complete="off" type="textarea"
autosize></el-input>
autosize
></el-input>
</el-form-item>
</el-col>
</el-row>
@ -345,7 +359,8 @@
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
:value="item.code"
>
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
@ -357,7 +372,7 @@
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddProductSubmit"
<el-button type="primary" size="small" icon="search" @click="onAddProductSubmit" :loading="scertLoading"
>提交
</el-button
>
@ -374,8 +389,8 @@
</template>
<script>
import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet";
import {filterClassify} from "@/api/purchase/classifyCode"
import { filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet } from '@/api/purchase/supCertSet'
import { filterClassify } from '@/api/purchase/classifyCode'
export default {
data() {
@ -390,24 +405,24 @@ export default {
total: 0,
loading: false,
enableMap: {
true: "是",
false: "否",
true: '是',
false: '否'
},
addDialogVisible: false,
currentSup: {},
formName: "add",
formName: 'add',
formMap: {
add: "新增配送企业资质设置",
update: "编辑配送企业资质设置",
add: '新增配送企业资质设置',
update: '编辑配送企业资质设置'
},
formRules: {
name: [
{required: true, message: "证书名称", trigger: "blur"}
{ required: true, message: '证书名称', trigger: 'blur' }
],
need: [
{required: true, message: "是否必传", trigger: "blur"}
],
{ required: true, message: '是否必传', trigger: 'blur' }
]
},
@ -419,29 +434,29 @@ export default {
limit: 20
},
statusMap: {
true: "禁用",
false: "启用",
true: '禁用',
false: '启用'
},
foreignMap: {
"1": "全部",
"2": "国外",
"3": "国内",
'1': '全部',
'2': '国外',
'3': '国内'
},
manufacturerTotal: 0,
manufacturerLoading: false,
addManufacturerDialogVisible: false,
currentManufacturer: {},
formManufacturerName: "add",
formManufacturerName: 'add',
formManufacturerMap: {
add: "新增生产企业资质设置",
update: "编辑生产企业资质设置",
add: '新增生产企业资质设置',
update: '编辑生产企业资质设置'
},
formManufactureRules: {
name: [
{required: true, message: "请输入证书名称", trigger: "blur"}
],
{ required: true, message: '请输入证书名称', trigger: 'blur' }
]
},
@ -456,203 +471,208 @@ export default {
productLoading: false,
addProductDialogVisible: false,
currentProduct: {},
formProductName: "add",
formProductName: 'add',
formProductMap: {
add: "新增产品资质设置",
update: "编辑产品资质设置",
add: '新增产品资质设置',
update: '编辑产品资质设置'
},
classifyList: [],
mutilData: [],
inputKey: null,
addLoading: false,
onAddManufacturerSubmitLoading: false,
scertLoading: false,
};
}
},
methods: {
/**--------配送企业资质设置--------------*/
handleCurrentChange(val) {
this.query.page = val.page;
this.getList();
this.query.page = val.page
this.getList()
},
getList() {
this.loading = true;
this.loading = true
filterCertSet(this.query)
.then(response => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false
this.list = response.data.list || []
this.total = response.data.total || 0
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
this.loading = false
this.list = []
this.total = 0
})
},
handleEdit(row) {
this.formName = "update";
this.currentSup = row;
this.addDialogVisible = true;
this.formName = 'update'
this.currentSup = row
this.addDialogVisible = true
},
handleDel(row) {
let query = {
id: row.id,
id: row.id
}
delSupCertCert(query)
.then((response) => {
this.getList();
this.getList()
})
.catch(() => {
});
})
},
addCert() {
this.formName = "add";
this.currentSup = {};
this.addDialogVisible = true;
this.formName = 'add'
this.currentSup = {}
this.addDialogVisible = true
},
onAddSubmit() {
this.$refs["dataForm"].validate(valid => {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.addDialogVisible = false;
if (this.formName == "add") {
this.currentSup.type = 1;
this.addDialogVisible = false
this.addLoading = true
if (this.formName == 'add') {
this.currentSup.type = 1
addSupCertSet(this.currentSup)
.then((response) => {
this.addLoading = false
if (response.code == 20000) {
this.getList();
this.getList()
} else {
this.$message.error(response.message);
this.$message.error(response.message)
}
})
.catch(() => {
});
})
} else {
modifySupCertSet(this.currentSup).then((res) => {
this.addLoading = false
if (res.code == 20000) {
this.getList();
this.$message.success("保存成功!");
this.getList()
this.$message.success('保存成功!')
} else {
this.getList();
this.$message.error(res.message);
this.getList()
this.$message.error(res.message)
}
})
}
}
});
})
},
cancelDialog() {
this.getList();
this.getManufacturerList();
this.getProductList();
this.addDialogVisible = false;
this.addManufacturerDialogVisible = false;
this.addProductDialogVisible = false;
this.getList()
this.getManufacturerList()
this.getProductList()
this.addDialogVisible = false
this.addManufacturerDialogVisible = false
this.addProductDialogVisible = false
},
/**--------生产企业资质设置--------------*/
handleManufacturerChange(val) {
this.manufacturerQuery.page = val.page;
this.getManufacturerList();
this.manufacturerQuery.page = val.page
this.getManufacturerList()
},
getManufacturerList() {
this.manufacturerLoading = true;
this.manufacturerLoading = true
filterCertSet(this.manufacturerQuery)
.then(response => {
this.manufacturerLoading = false;
this.manufacturerList = response.data.list || [];
this.manufacturerTotal = response.data.total || 0;
this.manufacturerLoading = false
this.manufacturerList = response.data.list || []
this.manufacturerTotal = response.data.total || 0
})
.catch(() => {
this.manufacturerLoading = false;
this.manufacturerList = [];
this.manufacturerTotal = 0;
});
this.manufacturerLoading = false
this.manufacturerList = []
this.manufacturerTotal = 0
})
},
handleManufacturerEdit(row) {
this.formManufacturerName = "update";
this.currentManufacturer = row;
this.addManufacturerDialogVisible = true;
this.formManufacturerName = 'update'
this.currentManufacturer = row
this.addManufacturerDialogVisible = true
},
handleManufacturerDel(row) {
let query = {
id: row.id,
id: row.id
}
delSupCertCert(query)
.then((response) => {
this.getManufacturerList();
this.getManufacturerList()
})
.catch(() => {
});
})
},
addManufacturerCert() {
this.formManufacturerName = "add";
this.currentManufacturer = {};
this.addManufacturerDialogVisible = true;
this.formManufacturerName = 'add'
this.currentManufacturer = {}
this.addManufacturerDialogVisible = true
},
onAddManufacturerSubmit() {
this.$refs["dataManufacturerForm"].validate(valid => {
this.$refs['dataManufacturerForm'].validate(valid => {
if (valid) {
this.addManufacturerDialogVisible = false;
if (this.formManufacturerName == "add") {
this.currentManufacturer.type = 2;
this.addManufacturerDialogVisible = false
this.onAddManufacturerSubmitLoading = true
if (this.formManufacturerName == 'add') {
this.currentManufacturer.type = 2
addSupCertSet(this.currentManufacturer)
.then((response) => {
this.onAddManufacturerSubmitLoading = false
if (response.code == 20000) {
this.getManufacturerList();
this.getManufacturerList()
} else {
this.$message.error(response.message);
this.$message.error(response.message)
}
})
.catch(() => {
});
})
} else {
modifySupCertSet(this.currentManufacturer).then((res) => {
this.onAddManufacturerSubmitLoading = false
if (res.code == 20000) {
this.getManufacturerList();
this.$message.success("保存成功!");
this.getManufacturerList()
this.$message.success('保存成功!')
} else {
this.getManufacturerList();
this.$message.error(res.message);
this.getManufacturerList()
this.$message.error(res.message)
}
})
}
}
});
})
},
/**--------产品资质设置--------------*/
handleProductChange(val) {
this.productQuery.page = val.page;
this.getProductList();
this.productQuery.page = val.page
this.getProductList()
},
getProductList() {
this.productLoading = true;
this.productLoading = true
filterCertSet(this.productQuery)
.then(response => {
this.productLoading = false;
this.productList = response.data.list || [];
this.productTotal = response.data.total || 0;
this.productLoading = false
this.productList = response.data.list || []
this.productTotal = response.data.total || 0
})
.catch(() => {
this.productLoading = false;
this.productList = [];
this.productTotal = 0;
});
this.productLoading = false
this.productList = []
this.productTotal = 0
})
},
handleProductEdit(row) {
this.formProductName = "update";
this.currentProduct = row;
this.formProductName = 'update'
this.currentProduct = row
if (row.imports == '1') {
this.currentProduct.imports = '全部'
} else if (row.imports == '2') {
@ -660,51 +680,55 @@ export default {
} else if (row.imports == '3') {
this.currentProduct.imports = '国内'
}
this.addProductDialogVisible = true;
this.addProductDialogVisible = true
this.classifyFirstSearch(this.currentProduct.flbm);
this.classifyFirstSearch(this.currentProduct.flbm)
},
handleProductDel(row) {
let query = {
id: row.id,
id: row.id
}
delSupCertCert(query)
.then((response) => {
this.getProductList();
this.getProductList()
})
.catch(() => {
});
})
},
addProductCert() {
this.formProductName = "add";
this.currentProduct = {};
this.addProductDialogVisible = true;
this.formProductName = 'add'
this.currentProduct = {}
this.addProductDialogVisible = true
},
onAddProductSubmit() {
this.$refs["dataForm"].validate(valid => {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.addProductDialogVisible = false;
if (this.formProductName == "add") {
this.currentProduct.type = 3;
this.addProductDialogVisible = false
this.scertLoading = true
if (this.formProductName == 'add') {
this.currentProduct.type = 3
addSupCertSet(this.currentProduct)
.then((response) => {
this.scertLoading = false
if (response.code == 20000) {
this.getProductList();
this.getProductList()
} else {
this.$message.error(response.message);
this.$message.error(response.message)
}
})
.catch(() => {
});
this.scertLoading = false
})
} else {
modifySupCertSet(this.currentProduct).then((res) => {
this.scertLoading = false
if (res.code == 20000) {
this.getProductList();
this.$message.success("保存成功!");
this.getProductList()
this.$message.success('保存成功!')
} else {
this.getProductList();
this.$message.error(res.message);
this.getProductList()
this.$message.error(res.message)
}
})
}
@ -713,47 +737,46 @@ export default {
},
classifyFirstSearch(key) {
let query = {
inFilter: key,
inFilter: key
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
this.loading = false
this.classifyList = response.data.list || []
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
this.loading = false
this.classifyList = []
})
},
classifySearch(key) {
let query = {
key: key,
key: key
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
this.loading = false
this.classifyList = response.data.list || []
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
this.loading = false
this.classifyList = []
})
}
},
filters: {},
mounted() {
},
created() {
//
this.getList();
this.getManufacturerList();
this.getProductList();
this.getList()
this.getManufacturerList()
this.getProductList()
}
}
};
</script>
<style scoped

@ -120,7 +120,7 @@
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" @click.native="queryProductList" icon="el-icon-search">搜索</el-button>
<el-button type="primary" @click.native="formSubmit" icon="el-icon-check">选入</el-button>
<el-button type="primary" @click.native="formSubmit" icon="el-icon-check" :loading="subLoading">选入</el-button>
</el-button-group>
</div>
@ -181,6 +181,7 @@ export default {
formLoading: false,
productVisible: false,
loading: false,
subLoading: false,
productQuery: {
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
@ -258,7 +259,9 @@ export default {
relIdList: relIdList
};
console.log(params)
this.subLoading = true
batchAddInvRemindSet(params).then((res) => {
this.subLoading = false
if (res.code === 20000) {
this.$message.success("添加成功");
this.closeDialog();
@ -266,6 +269,7 @@ export default {
this.$message.error(res.message);
}
}).catch((error) => {
this.subLoading = false
this.$message.error(error.message);
this.closeDialog();
})

@ -206,7 +206,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click.native="formSubmit()"
<el-button type="primary" size="small" @click.native="formSubmit()" :loading="fromLoading"
>提交
</el-button>
<el-button @click.native="cancelDialog" size="small">取消</el-button>
@ -449,6 +449,7 @@ export default {
invlist: [],
invTotal: 0,
invLoading: false,
fromLoading: false,
};
},
filters: {
@ -516,10 +517,11 @@ export default {
return;
}
// this.formData.statusIds = this.getMenuAllCheckedKeys();
this.fromLoading = true
if (this.formName == "add") {
saveWarehouse(this.formData, "save")
.then((response) => {
this.loading = false;
this.fromLoading = false
this.cancelDialog();
this.getList();
if (response.code === 20000) {
@ -534,10 +536,12 @@ export default {
.catch(() => {
this.cancelDialog();
this.loading = false;
this.fromLoading = false
});
} else if (this.formName == "edit") {
saveWarehouse(this.formData, "edit")
.then((response) => {
this.fromLoading = false
this.loading = false;
this.cancelDialog();
this.getList();
@ -551,6 +555,7 @@ export default {
}
})
.catch(() => {
this.fromLoading = false
this.cancelDialog();
this.loading = false;
});

@ -280,6 +280,7 @@
<el-button
type="primary"
@click.native="forInvSubmit()"
:loading="submitLoading"
>提交
</el-button
>
@ -492,6 +493,7 @@ export default {
sysList: [],
sysSubList: [],
advanceTypese: [],
submitLoading: false,
};
},
methods: {
@ -640,7 +642,9 @@ export default {
forInvSubmit() { // ---
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.submitLoading = true
saveSubWarehouse(this.subData, this.formName).then((response) => {
this.submitLoading = false
this.subFormVisible = false;
if (response.code == 20000) {
this.getList();
@ -648,6 +652,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.submitLoading = false
this.subFormVisible = false;
});
}

@ -170,7 +170,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :loading="subLoading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -223,7 +223,8 @@ export default {
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
}
},
subLoading: false,
};
},
created() {
@ -293,8 +294,10 @@ export default {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
this.subLoading = true
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.subLoading = false
if (response.code == 20000) {
this.$modal.msgSuccess('修改成功')
this.open = false
@ -305,6 +308,7 @@ export default {
})
} else {
addType(this.form).then(response => {
this.subLoading = false
if (response.code == 20000) {
this.$modal.msgSuccess('新增成功')
this.open = false

@ -266,7 +266,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :loading="confirmLoading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -326,7 +326,8 @@ export default {
path: [
{required: true, message: "路由地址不能为空", trigger: "blur"}
]
}
},
confirmLoading: false
};
},
created() {
@ -429,8 +430,10 @@ export default {
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
this.confirmLoading = true
if (this.form.menuId != undefined) {
updateMenu(this.form).then(response => {
this.confirmLoading = false
if (response.code == 20000) {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -442,6 +445,7 @@ export default {
});
} else {
addMenu(this.form).then(response => {
this.confirmLoading = false
if (response.code == 20000) {
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -84,7 +84,7 @@
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
<el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="subLoading"
>提交
</el-button
>
@ -151,6 +151,7 @@ export default {
uploadFileUrl: null,
headers: {},
configParms: {},
subLoading: false,
};
@ -210,13 +211,16 @@ export default {
},
onModifySubmit() {
this.subLoading = true
updateEntrustRece(this.inputQuery)
.then((response) => {
this.subLoading = false
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.subLoading = false
this.loading = false;
this.cancelDialog();
});

@ -4,7 +4,8 @@
<el-card style="margin-top: -30px">
<el-button-group style="display: flex">
<el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px"
:loading="loading">提交
:loading="subLoading"
>提交
</el-button>
</el-button-group>
<el-row>
@ -26,7 +27,8 @@
</el-col>
<el-col :span="8">
<el-form-item prop="menuName">
<el-input v-model="formData.menuName" auto-complete="off" :disabled="formData.auditStatus == 1"></el-input>
<el-input v-model="formData.menuName" auto-complete="off" :disabled="formData.auditStatus == 1"
></el-input>
</el-form-item>
</el-col>
</el-row>
@ -82,9 +84,6 @@
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
@ -109,7 +108,8 @@
:on-error="uploadHandleError"
:file-list="fileList"
:data="{type:'image2'}"
:auto-upload="true">
:auto-upload="true"
>
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }}
</el-button>
@ -130,34 +130,34 @@
</template>
<script>
import draggable from "vuedraggable";
import store from "@/store";
import {insertCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert";
import {insertMenuHelp,updateMenuHelp} from "@/api/system/sysMenuHelp";
import draggable from 'vuedraggable'
import store from '@/store'
import { insertCompanyCert, updateCompanyCert } from '@/api/purchase/companyCert'
import { insertMenuHelp, updateMenuHelp } from '@/api/system/sysMenuHelp'
import { updateInv } from '@/api/auth/authAdmin'
import { isBlank } from '@/utils/strUtil'
export default {
name: "addhelpSettings",
name: 'addhelpSettings',
props: {
closeDialog: {
type: Function,
required: true,
required: true
},
from: {
type: Object,
required: true,
required: true
},
formName: {
type: Object,
required: true,
required: true
}
},
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
code: "",
code: '',
formData: {
type: 0,
updateTime: null,
@ -165,103 +165,106 @@ export default {
menuKey: null,
menuName: null,
filePath: null,
status: null,
status: null
},
formRules: {
menuKey: [
{required: true, message: "请输入组件路径", trigger: "blur"}
{ required: true, message: '请输入组件路径', trigger: 'blur' }
],
menuName: [
{required: true, message: "请输入菜单名称", trigger: "blur"}
],
{ required: true, message: '请输入菜单名称', trigger: 'blur' }
]
},
loading: false,
uploadUrl: "",
subLoading: false,
uploadUrl: '',
fileList: [],
headers: {},
choiceFile: "选取文件",
choiceFile: '选取文件'
};
}
},
components: {
draggable,
draggable
},
methods: {
submitUpload() {
this.$refs["dataForm"].validate(valid => {
this.$refs['dataForm'].validate(valid => {
if (valid) {
if (this.$isBlank(this.formData.menuKey)) {
this.$message.error("组件路径不能为空!");
return;
this.$message.error('组件路径不能为空!')
return
}
if (this.$isBlank(this.formData.menuName)) {
this.$message.error("菜单名称不能为空!");
return;
this.$message.error('菜单名称不能为空!')
return
}
this.subLoading = true
if (this.formName == 2) {
updateMenuHelp(this.formData).then((res) => {
this.subLoading = false
if (res.code === 20000) {
this.$message.success( "修改状态成功");
this.closeDialog();
this.$message.success('修改状态成功')
this.closeDialog()
}
})
}
insertMenuHelp(this.formData).then((res) => {
this.subLoading = false
if (res.code === 20000) {
this.$message.success( "添加成功");
this.closeDialog();
this.$message.success('添加成功')
this.closeDialog()
}
})
}
});
})
},
uploadHandleRemove(file, fileList) {
console.log(file, fileList);
console.log(file, fileList)
},
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
console.log(file)
console.log(this.fileList)
},
uploadHandleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
},
uploadOnchange(file, fileList) {
let fileName = file.name;
let fileName = file.name
let uid = file.uid
let pos = fileName.lastIndexOf(".");
let lastName = fileName.substring(pos, fileName.length);
if (lastName.toLowerCase() !== ".jpg" && lastName.toLowerCase() !== ".png" && lastName.toLowerCase() !== ".doc" && lastName.toLowerCase() !== ".pdf") {
this.$message.error("上传文件只能是 jpg,png,doc,pdf 格式");
let pos = fileName.lastIndexOf('.')
let lastName = fileName.substring(pos, fileName.length)
if (lastName.toLowerCase() !== '.jpg' && lastName.toLowerCase() !== '.png' && lastName.toLowerCase() !== '.doc' && lastName.toLowerCase() !== '.pdf') {
this.$message.error('上传文件只能是 jpg,png,doc,pdf 格式')
for (let i = 0; i < fileList.length; i++) {//list
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
return;
return
}
//
const isLt = file.size / 1024 / 1024 / 2 <= 1;
const isLt = file.size / 1024 / 1024 / 2 <= 1
if (!isLt) {
this.$message.error("上传文件大小不能超过 2MB");
this.$message.error('上传文件大小不能超过 2MB')
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
}
return isLt;
return isLt
},
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
this.formData.filePath = response.data.name;
this.formData.filePath = response.data.name
} else {
this.$message.error("文件上传失败:" + response.message);
this.$message.error('文件上传失败:' + response.message)
}
},
uploadHandleError() {
@ -269,38 +272,38 @@ export default {
},
toViewCompanyCert() {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + this.formData.filePath);
},
this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name='
window.open(this.certFileUrl + this.formData.filePath)
}
},
filters: {},
mounted() {
document.body.ondrop = function(event) {
event.preventDefault();
event.stopPropagation();
};
event.preventDefault()
event.stopPropagation()
}
},
created() {
this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file";
this.uploadUrl = this.BASE_URL + '/udiwms/upload/register/file'
this.headers = {
ADMINID: store.getters.adminId,
ADMINTOKEN: store.getters.token,
};
ADMINTOKEN: store.getters.token
}
if (isBlank(this.from.id)) {
this.formData={};
this.formData = {}
} else {
//
this.formData=this.from;
this.formData = this.from
}
if (this.formData.filePath != null) {
this.choiceFile = "更换文件";
this.choiceFile = '更换文件'
} else {
this.choiceFile = "选取文件";
this.choiceFile = '选取文件'
}
}
}
},
};
</script>
<style scoped>

@ -91,7 +91,7 @@
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="onAddSubmit"
<el-button type="primary" size="small" @click="onAddSubmit" :loading="addLoading"
>提交
</el-button
>
@ -169,6 +169,7 @@ export default {
edit: "编辑单据生成设置",
},
formName: null,
addLoading: false,
};
},
@ -254,8 +255,9 @@ export default {
this.$message.error("单据类型名称不得为纯数字类型!");
return;
}
this.addLoading = true
addBusTypeChange(this.inputQuery).then((res) => {
this.addLoading = false
if (res.code === 20000) {
this.cancelDialog();
this.loading = false;
@ -264,10 +266,12 @@ export default {
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.addLoading = false
});
} else {
this.addLoading = true
updateBusTypeChange(this.inputQuery).then((res) => {
this.addLoading = false
if (res.code === 20000) {
this.loading = false;
this.cancelDialog();
@ -276,6 +280,7 @@ export default {
this.$message.error(res.message);
}
}).catch((error) => {
this.addLoading = false
this.loading = false;
this.$message.error(error.message);
this.cancelDialog();

@ -93,7 +93,7 @@
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="onAddSubmit"
<el-button type="primary" size="small" @click="onAddSubmit" :loading="addLoading"
>提交
</el-button
>
@ -176,6 +176,7 @@ export default {
edit: "编辑出入库单据流转设置",
},
formName: null,
addLoading: false,
};
},
@ -259,28 +260,32 @@ export default {
this.$message.error("单据类型名称不得为纯数字类型!");
return;
}
this.addLoading = true
addBusTypePre(this.inputQuery).then((res) => {
this.addLoading = false
if (res.code === 20000) {
this.loading = false;
// this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(res.message);
}
}).catch(() => {
this.addLoading = false
});
} else {
this.addLoading = true
updateBusTypePre(this.inputQuery).then((res) => {
this.addLoading = false
if (res.code === 20000) {
this.loading = false;
this.cancelDialog();
this.getList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.addLoading = false
this.$message.error(error.message);
this.cancelDialog();
});

@ -273,7 +273,7 @@
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button type="primary" @click="saveSet"></el-button>
<el-button type="primary" @click="saveSet" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeDialog"></el-button>
</div>
</el-card>
@ -316,6 +316,7 @@ export default {
],
},
loading: false,
saveLoading: false,
}
},
@ -330,7 +331,9 @@ export default {
this.$message.warning("请选择" + this.invTitle + "!");
return;
}
this.saveLoading = true
updateSet(data).then((response) => {
this.saveLoading = false
if (response.code === 20000) {
this.closeDialog();
} else {

@ -147,7 +147,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" size="small">提交</el-button>
<el-button type="primary" @click="submitForm" size="small" :loading="submitLoading">提交</el-button>
<el-button @click="cancel" size="small">取消</el-button>
</div>
</el-dialog>
@ -299,7 +299,8 @@ export default {
roleSort: [
{required: true, message: "角色顺序不能为空", trigger: "blur"}
]
}
},
submitLoading: false,
};
},
@ -541,6 +542,7 @@ export default {
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
this.submitLoading = true
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys();
if (this.form.menuIds.length == 0) {
@ -548,6 +550,7 @@ export default {
return
}
updateRole(this.form).then(response => {
this.submitLoading = false
if (response.code === 20000) {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -563,6 +566,7 @@ export default {
return
}
addRole(this.form).then(response => {
this.submitLoading = false
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();

@ -242,6 +242,7 @@
type="primary"
size="small"
@click.native="formSubmit()"
:loading="formSubmitLoading"
>提交
</el-button
>
@ -366,7 +367,8 @@ export default {
{required: true, message: "请输入密码", trigger: "blur"}
]
},
deleteLoading: false
deleteLoading: false,
formSubmitLoading: false,
};
},
methods: {
@ -513,10 +515,10 @@ export default {
}
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.formLoading = true;
this.formSubmitLoading = true;
let data = Object.assign({}, this.formData);
authAdminSave(data, this.formName).then(response => {
this.formLoading = false;
this.formSubmitLoading = false;
if (response.code !== 20000) {
this.$message.error(response.message);
return false;

Loading…
Cancel
Save