|
@@ -145,7 +145,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="仓库名称" prop="fName">
|
|
|
- <el-input v-model="form.fName" placeholder="请输入仓库名称" />
|
|
|
+ <el-input v-model="form.fName" placeholder="请输入仓库名称" @change="nameChange"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -224,6 +224,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="简称" prop="fCname">
|
|
|
+ <el-input
|
|
|
+ v-model="form.fCname"
|
|
|
+ placeholder="请输入简称"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<!--<el-form-item label="状态,默认 T ,正常T 停用F 下拉选择">
|
|
@@ -238,6 +246,10 @@
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <up-load
|
|
|
+ :relevantAttachments="relevantAttachments"
|
|
|
+ :createBy="username"
|
|
|
+ ></up-load>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
@@ -251,6 +263,8 @@ import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild,
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import Vue from 'vue'
|
|
|
+import upLoad from "@/views/Warehousing/components/upLoad";
|
|
|
+import Cookies from "js-cookie";
|
|
|
|
|
|
Vue.directive('dialogDrag', {
|
|
|
bind(el, binding, vnode, oldVnode) {
|
|
@@ -308,7 +322,10 @@ Vue.directive('dialogDrag', {
|
|
|
})
|
|
|
export default {
|
|
|
name: "Dept",
|
|
|
- components: { Treeselect },
|
|
|
+ components: {
|
|
|
+ Treeselect,
|
|
|
+ upLoad,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
//全屏放大
|
|
@@ -354,6 +371,9 @@ export default {
|
|
|
fName: [
|
|
|
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
|
|
|
],
|
|
|
+ fCname: [
|
|
|
+ { required: true, message: " ", trigger: "blur" }
|
|
|
+ ],
|
|
|
orderNum: [
|
|
|
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
|
|
],
|
|
@@ -364,7 +384,9 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ relevantAttachments: [],
|
|
|
+ username:null,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -372,6 +394,7 @@ export default {
|
|
|
this.getDicts("sys_normal_disable").then(response => {
|
|
|
this.statusOptions = response.data;
|
|
|
});
|
|
|
+ this.username = Cookies.get("userName");
|
|
|
},
|
|
|
methods: {
|
|
|
//全屏放大
|
|
@@ -428,6 +451,7 @@ export default {
|
|
|
status: "0",
|
|
|
fLocation:'0'
|
|
|
};
|
|
|
+ this.relevantAttachments = []
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
@@ -460,6 +484,7 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.form.fLocation = this.form.fLocation + ''
|
|
|
this.form.fCharg = this.form.fCharg + ''
|
|
|
+ this.relevantAttachments = this.form.annexList? this.form.annexList: [];
|
|
|
this.open = true;
|
|
|
this.title = "修改仓库";
|
|
|
});
|
|
@@ -472,12 +497,15 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.fId != undefined) {
|
|
|
+ console.log(this.relevantAttachments)
|
|
|
+ this.form.annexList = this.relevantAttachments
|
|
|
updateDept(this.form).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
+ this.form.annexList = this.relevantAttachments
|
|
|
addDept(this.form).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
@@ -500,7 +528,10 @@ export default {
|
|
|
location.reload();
|
|
|
this.msgSuccess("删除成功");
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ nameChange() {
|
|
|
+ this.$set(this.form, 'fCname', this.form.fName)
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|