Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
曹前明 2022-06-13 09:29:46 +08:00
commit 305d0a0f2f
9 changed files with 483 additions and 320 deletions

View File

@ -3,7 +3,7 @@
<el-form <el-form
id="customerForm" id="customerForm"
ref="checkForm" ref="checkForm"
label-width="100px" label-width="150px"
:model="checkForm" :model="checkForm"
> >
<el-row> <el-row>
@ -32,8 +32,8 @@
required required
> >
<el-input-number <el-input-number
style="width: 100%;"
v-model="checkForm[item.field_key]" v-model="checkForm[item.field_key]"
style="width: 100%;"
step-strictly step-strictly
placeholder="请输入" placeholder="请输入"
:min="0" :min="0"
@ -46,8 +46,8 @@
required required
> >
<el-input-number <el-input-number
style="width: 100%;"
v-model="checkForm[item.field_key]" v-model="checkForm[item.field_key]"
style="width: 100%;"
:precision="2" :precision="2"
:step="0.1" :step="0.1"
placeholder="请输入" placeholder="请输入"
@ -229,7 +229,7 @@
that.is_save = true; that.is_save = true;
} else { } else {
that.checkForm[key] = ''; that.checkForm[key] = '';
that.$set(that.checkForm, key, null) that.$set(that.checkForm, key, '')
} }
} }
let listJudge = this.formData.filter(item => { let listJudge = this.formData.filter(item => {
@ -337,7 +337,7 @@
that.formData[index].is_hidden = false; that.formData[index].is_hidden = false;
} else { } else {
that.formData[index].is_hidden = true; that.formData[index].is_hidden = true;
that.checkForm[field_key] = null; that.checkForm[field_key] = '';
} }
return rea; return rea;
} else { } else {
@ -350,7 +350,7 @@
that.formData[index].is_hidden = false; that.formData[index].is_hidden = false;
} else { } else {
that.formData[index].is_hidden = true; that.formData[index].is_hidden = true;
that.checkForm[field_key] = null; that.checkForm[field_key] = '';
} }
return eval(eval(a)); return eval(eval(a));
} }

View File

@ -3,7 +3,7 @@
<el-form <el-form
id="customerForm" id="customerForm"
ref="checkForm" ref="checkForm"
label-width="100px" label-width="150px"
:model="checkForm" :model="checkForm"
> >
<el-row> <el-row>
@ -429,7 +429,7 @@
that.formData[index].is_hidden = false; that.formData[index].is_hidden = false;
}else{ }else{
that.formData[index].is_hidden = true; that.formData[index].is_hidden = true;
that.checkForm[field_key] = null; that.checkForm[field_key] = '';
} }
return rea; return rea;
}else{ }else{
@ -442,7 +442,7 @@
that.formData[index].is_hidden = false; that.formData[index].is_hidden = false;
}else{ }else{
that.formData[index].is_hidden = true; that.formData[index].is_hidden = true;
that.checkForm[field_key] = null; that.checkForm[field_key] = '';
} }
return eval(eval(a)); return eval(eval(a));
} }

View File

@ -62,8 +62,8 @@
height="100" height="100"
v-el-height-adaptive-table="{ bottomOffset: 42 }" v-el-height-adaptive-table="{ bottomOffset: 42 }"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="记录编号" prop="number"> </el-table-column> <el-table-column label="记录编号" prop="number"></el-table-column>
<el-table-column label="操作人员"> <el-table-column label="操作人员">
<template slot-scope="scope" v-if="scope.row.create_by"> <template slot-scope="scope" v-if="scope.row.create_by">
{{ scope.row.create_by_.name }} {{ scope.row.create_by_.name }}
@ -80,7 +80,7 @@
<el-tag v-else>已审核</el-tag> <el-tag v-else>已审核</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"> </el-table-column> <el-table-column label="创建时间" prop="create_time"></el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@ -191,7 +191,7 @@
<span style="float: left">{{ item.batch }}</span> <span style="float: left">{{ item.batch }}</span>
<span <span
style="float: right; color: #8492a6; font-size: 13px" style="float: right; color: #8492a6; font-size: 13px"
>{{ item.material_.name }}</span >{{ item.material_.name }}</span
> >
</el-option> </el-option>
</el-select> </el-select>
@ -349,7 +349,9 @@
<el-input v-model="item.batch" placeholder="批次号"></el-input> <el-input v-model="item.batch" placeholder="批次号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5" style="margin-right: 10px"> </el-row>
<el-row>
<el-col :span="5">
<el-form-item <el-form-item
class="expiration_date" class="expiration_date"
label="有效期" label="有效期"
@ -365,6 +367,21 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18">
<el-form-item label="物料编号:">
<div v-for="(ob,ind) in item.details" :key="ob.number" style="display: inline-block">
<span>{{ob.number}}</span>
<el-button
v-if="ob.number!==''"
@click="deleteItemNumber(index,ind)"
style="border: none;background: none;padding: 0;margin-top: 4px;"
>
<i class="el-icon-remove-outline" style="font-size: 20px"></i>
</el-button>
</div>
<el-input style="width: 300px;" clearable v-model="itemDetails" placeholder="物料编号,回车确定编号" @keyup.enter.native="detailEnter(itemDetails,index)"></el-input>
</el-form-item>
</el-col>
<!-- 删除按钮 --> <!-- 删除按钮 -->
<el-col :span="1"> <el-col :span="1">
<el-tooltip <el-tooltip
@ -422,298 +439,308 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
getfifoList, getfifoList,
createInventory, createInventory,
createInother, createInother,
getWarehouseList, getWarehouseList,
deleteFifoitem, deleteFifoitem,
getmaterialbatchList, getmaterialbatchList,
deleteFifo, deleteFifo,
audit, audit,
outOther, outOther,
} from "@/api/inm"; } from "@/api/inm";
import { getPuorderList } from "@/api/pum"; import {getPuorderList} from "@/api/pum";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import { getpVendorList } from "@/api/vendor"; import {getpVendorList} from "@/api/vendor";
import { getMaterialList } from "@/api/mtm"; import {getMaterialList} from "@/api/mtm";
import { getUserList } from "@/api/user"; import {getUserList} from "@/api/user";
import { genTree } from "@/utils"; import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaulteinventory = { const defaulteinventory = {
vendor: null, vendor: null,
details: [ details: [
{ {
warehouse: "", //仓库 warehouse: "", //仓库
material: "", // 物料 material: "", // 物料
count: "", //数量 count: "", //数量
batch: "", //批次 batch: "", //批次
}, details:[],
],
};
const defaulteoutfifo = {
details: [
{
material_batch: null,
count: null,
},
],
};
export default {
components: { Pagination },
data() {
return {
inventory: defaulteinventory,
outfifo: defaulteoutfifo,
dialogVisibleout: false,
fifoList: {
count: 0,
}, },
types_: { ],
1: "生产领料", };
2: "销售提货", const defaulteoutfifo = {
3: "采购入库", details: [
4: "生产入库", {
5: "其他入库", material_batch: null,
6:"其他出库", count: null,
}, },
inpur: {}, ],
listQuery: { };
page: 1, export default {
page_size: 20, components: {Pagination},
}, data() {
puorderoptions: [], return {
materialbatchoptions: [], inventory: defaulteinventory,
warehouseData: [], outfifo: defaulteoutfifo,
materialoptions: [], dialogVisibleout: false,
vendoroptions: [], fifoList: {
listLoading: true, count: 0,
dialogVisible: false,
dialogType: "new",
dialogVisibles: false,
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
},
};
},
computed: {},
watch: {},
created() {
this.getlists();
this.getList();
this.getListgys();
this.getmaterialList();
this.getpuorderList();
},
methods: {
checkPermission,
getList() {
this.listLoading = true;
getfifoList(this.listQuery).then((response) => {
if (response.data) {
this.fifoList = response.data;
}
this.listLoading = false;
});
},
//出入库详情
handleDetail(scope) {
this.$router.push({
name: "fifodetail",
params: { id: scope.row.id, pu_order: scope.row.pu_order },
});
},
//供应商列表
getListgys() {
getpVendorList({ page: 0 }).then((response) => {
if (response.data) {
this.vendoroptions = response.data;
}
});
},
//采购订单
getpuorderList() {
getPuorderList({ page: 0 }).then((response) => {
if (response.data) {
this.puorderoptions = response.data;
}
});
},
//采购入库提交
confirminpur() {
createInventory(this.inpur).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisibles = false;
this.$message.success("成功");
}
});
},
//仓库
getlists() {
getWarehouseList({ page: 0 }).then((response) => {
if (response.data) {
this.warehouseData = genTree(response.data);
}
this.listLoading = false;
});
},
handlecgCreate() {
this.dialogVisibles = true;
},
addConditions1() {
if (this.outfifo.details.length <= 10) {
this.outfifo.details.push({
material_batch: null,
count: null,
});
} else {
this.$message("最多可添加十项条件");
}
},
addConditions() {
if (this.inventory.details.length <= 10) {
this.inventory.details.push({
warehouse: "", //仓库
material: "", // 物料
count: "", //数量
batch: "", // 批次
});
} else {
this.$message("最多可添加十项条件");
}
},
deleteItem(index) {
this.inventory.details.splice(index, 1);
},
deleteItem1(index) {
this.outfifo.details.splice(index, 1);
},
//物料
getmaterialList() {
this.listLoading = true;
getMaterialList({ pageoff: true }).then((response) => {
if (response.data) {
this.materialoptions = genTree(response.data);
}
this.listLoading = false;
});
},
//其他入库
handleCreate() {
this.inventory.details = [
{
warehouse: "", // 仓库
material: "", // 物料
count: "", //数量
batch: "", //批次
}, },
]; itemDetails:'',
this.inventory = Object.assign({}, defaulteinventory); types_: {
this.dialogType = "new"; 1: "生产领料",
this.dialogVisible = true; 2: "销售提货",
this.$nextTick(() => { 3: "采购入库",
this.$refs["Form"].clearValidate(); 4: "生产入库",
}); 5: "其他入库",
}, 6: "其他出库",
//其他出库 },
handleoutCreate() { inpur: {},
this.outfifo.details = [ listQuery: {
{ page: 1,
material_batch: null, page_size: 20,
count: null, },
puorderoptions: [],
materialbatchoptions: [],
warehouseData: [],
materialoptions: [],
vendoroptions: [],
listLoading: true,
dialogVisible: false,
dialogType: "new",
dialogVisibles: false,
rule1: {
name: [{required: true, message: "请输入", trigger: "blur"}],
}, },
];
this.outfifo = Object.assign({}, defaulteoutfifo);
this.dialogVisibleout = true;
getmaterialbatchList({ page: 0 }).then((response) => {
if (response.data) {
this.materialbatchoptions = response.data;
}
});
this.$nextTick(() => {
this.$refs["Formout"].clearValidate();
});
},
confirmoutfifo() {
console.log(this.outfifo);
outOther(this.outfifo).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisibleout = false;
this.$message.success("成功");
}
});
},
//审核
handleAudit(scope) {
this.$confirm("是否通过?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "success",
})
.then(async () => {
await audit(scope.row.id);
this.getList();
this.$message.success("已审核");
})
.catch((err) => {
console.error(err);
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}; };
},
computed: {},
watch: {},
created() {
this.getlists();
this.getList(); this.getList();
this.getListgys();
this.getmaterialList();
this.getpuorderList();
}, },
methods: {
detailEnter(item,index){
this.inventory.details[index].details.push({number:item});
this.itemDetails = '';
},
deleteItemNumber(index,ind){
this.inventory.details[index].details.splice(ind,1);
},
checkPermission,
getList() {
this.listLoading = true;
async confirm(form) { getfifoList(this.listQuery).then((response) => {
console.log(this.inventory); if (response.data) {
this.fifoList = response.data;
createInother(this.inventory).then((res) => { }
if (res.code >= 200) { this.listLoading = false;
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteFifo(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
}); });
},
//出入库详情
handleDetail(scope) {
this.$router.push({
name: "fifodetail",
params: {id: scope.row.id, pu_order: scope.row.pu_order},
});
},
//供应商列表
getListgys() {
getpVendorList({page: 0}).then((response) => {
if (response.data) {
this.vendoroptions = response.data;
}
});
},
//采购订单
getpuorderList() {
getPuorderList({page: 0}).then((response) => {
if (response.data) {
this.puorderoptions = response.data;
}
});
},
//采购入库提交
confirminpur() {
createInventory(this.inpur).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisibles = false;
this.$message.success("成功");
}
});
},
//仓库
getlists() {
getWarehouseList({page: 0}).then((response) => {
if (response.data) {
this.warehouseData = genTree(response.data);
}
this.listLoading = false;
});
},
handlecgCreate() {
this.dialogVisibles = true;
},
addConditions1() {
if (this.outfifo.details.length <= 10) {
this.outfifo.details.push({
material_batch: null,
count: null,
});
} else {
this.$message("最多可添加十项条件");
}
},
addConditions() {
if (this.inventory.details.length <= 10) {
this.inventory.details.push({
warehouse: "", //仓库
material: "", // 物料
count: "", //数量
batch: "", // 批次
details:[]
});
} else {
this.$message("最多可添加十项条件");
}
},
deleteItem(index) {
this.inventory.details.splice(index, 1);
},
deleteItem1(index) {
this.outfifo.details.splice(index, 1);
},
//物料
getmaterialList() {
this.listLoading = true;
getMaterialList({pageoff: true}).then((response) => {
if (response.data) {
this.materialoptions = genTree(response.data);
}
this.listLoading = false;
});
},
//其他入库
handleCreate() {
this.inventory.details = [
{
warehouse: "", // 仓库
material: "", // 物料
count: "", //数量
batch: "", //批次
details:[],
},
];
this.inventory = Object.assign({}, defaulteinventory);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
//其他出库
handleoutCreate() {
this.outfifo.details = [
{
material_batch: null,
count: null,
},
];
this.outfifo = Object.assign({}, defaulteoutfifo);
this.dialogVisibleout = true;
getmaterialbatchList({page: 0}).then((response) => {
if (response.data) {
this.materialbatchoptions = response.data;
}
});
this.$nextTick(() => {
this.$refs["Formout"].clearValidate();
});
},
confirmoutfifo() {
console.log(this.outfifo);
outOther(this.outfifo).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisibleout = false;
this.$message.success("成功");
}
});
},
//审核
handleAudit(scope) {
this.$confirm("是否通过?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "success",
})
.then(async () => {
await audit(scope.row.id);
this.getList();
this.$message.success("已审核");
})
.catch((err) => {
console.error(err);
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
async confirm(form) {
console.log(this.inventory);
createInother(this.inventory).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteFifo(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
//装箱
handlePack(scope) {
this.$router.push({
name: "salesdetail",
params: {id: scope.row.sale},
});
},
}, },
//装箱 };
handlePack(scope) {
this.$router.push({
name: "salesdetail",
params: { id: scope.row.sale },
});
},
},
};
</script> </script>

View File

@ -261,8 +261,7 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, }, {
{
value: '', value: '',
label: '' label: ''
}, { }, {
@ -271,6 +270,24 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, {
value: 'g',
label: 'g'
}, {
value: 'kg',
label: 'kg'
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, },
], ],
listQuery: { listQuery: {
@ -343,12 +360,19 @@
//检查表 //检查表
handlebind(scope) { handlebind(scope) {
let materialItem = sessionStorage.getItem('materialItem'); let materialItem = sessionStorage.getItem('materialItem');
let materialType = sessionStorage.getItem('materialType');
if(materialItem){ if(materialItem){
sessionStorage.removeItem('materialItem'); sessionStorage.removeItem('materialItem');
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
}else{ }else{
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
} }
if(materialType){
sessionStorage.removeItem('materialType');
sessionStorage.setItem('materialType','30');
}else{
sessionStorage.setItem('materialType','30');
}
this.$router.push({name: "MaterialDO", params: {id: scope.row.id}}) this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
}, },
handleFilter() { handleFilter() {

View File

@ -596,7 +596,7 @@
}, },
listQueryrecordform: { listQueryrecordform: {
page: 1, page: 1,
page_size: 20, page_size: 99,
}, },
recordformList: { recordformList: {
count: 0, count: 0,
@ -694,10 +694,10 @@
], ],
typeOptions_:{ typeOptions_:{
10 : "生产记录表", 10 : "生产记录表",
20 : "工序检查表", 20 : "工序检查表",//wp p
30 : "入厂检验表", 30 : "入厂检验表",//wuliao
40 : "成品检验表", 40 : "成品检验表",//p
50 : "首件检查表", 50 : "首件检查表",//wp
}, },
materialTypes: { materialTypes: {
"1": '成品', "1": '成品',
@ -723,12 +723,19 @@
judgeList: [], judgeList: [],
limitedPhoto: false, limitedPhoto: false,
isDisabled: true, isDisabled: true,
type:null,
}; };
}, },
computed: {}, computed: {},
watch: {}, watch: {},
mounted(){ mounted(){
this.item = JSON.parse(sessionStorage.getItem('materialItem')) ; this.item = JSON.parse(sessionStorage.getItem('materialItem')) ;
let type = sessionStorage.getItem('materialType') ;
if(type.indexOf(','>0)){
this.type = type.split(',');
}else{
this.type = parseInt(type);
}
this.material = this.item.id; this.material = this.item.id;
this.recordformLists(); this.recordformLists();
getrecordformList({page:0}).then((response) => { getrecordformList({page:0}).then((response) => {
@ -896,13 +903,32 @@
this.fieldLists1(); this.fieldLists1();
}, },
recordformLists() { recordformLists() {
this.listQueryrecordform.material = this.material; debugger;
// this.listQueryrecordform.type = 2; let that = this;
getrecordformList(this.listQueryrecordform).then((response) => { that.listQueryrecordform.material = that.material;
if (response.data) { if(that.type===10){
this.recordformList = response.data; debugger;
} that.listQueryrecordform.type = 10;
}); getrecordformList(that.listQueryrecordform).then((response) => {
if (response.data) {
that.recordformList = response.data;
}
});
}else{
debugger;
that.listQueryrecordform.type = that.type[0];
getrecordformList(that.listQueryrecordform).then((response) => {
if (response.data) {
that.recordformList = response.data;
that.listQueryrecordform.type = that.type[1];
getrecordformList(that.listQueryrecordform).then((response) => {
if (response.data) {
that.recordformList.results = that.recordformList.results.concat(response.data.results);
}
});
}
});
}
}, },
fieldLists() { fieldLists() {
let that = this; let that = this;

View File

@ -216,8 +216,7 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, }, {
{
value: '', value: '',
label: '' label: ''
}, { }, {
@ -226,6 +225,24 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, {
value: 'g',
label: 'g'
}, {
value: 'kg',
label: 'kg'
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, },
], ],
listQuery: { listQuery: {
@ -269,12 +286,19 @@
//检查表 //检查表
handlebind(scope) { handlebind(scope) {
let materialItem = sessionStorage.getItem('materialItem'); let materialItem = sessionStorage.getItem('materialItem');
let materialType = sessionStorage.getItem('materialType');
if(materialItem){ if(materialItem){
sessionStorage.removeItem('materialItem'); sessionStorage.removeItem('materialItem');
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
}else{ }else{
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
} }
if(materialType){
sessionStorage.removeItem('materialType');
sessionStorage.setItem('materialType','20,40');
}else{
sessionStorage.setItem('materialType','20,40');
}
this.$router.push({name: "MaterialDO", params: {id: scope.row.id}}) this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
}, },
handleFilter() { handleFilter() {

View File

@ -245,7 +245,8 @@
:model="tableForm" :model="tableForm"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="dialogVisibleForm" :visible.sync="dialogVisibleForm"
:title="tableForm.name"> :title="tableForm.name"
>
<el-form <el-form
label-width="200px" label-width="200px"
label-position="right" label-position="right"
@ -312,6 +313,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="box-sizing: border-box;padding-right: 50px">
<el-col v-for="(item,$index) in dialogFieldList" :key="$index" :span="12">
<el-form-item v-if="item.field_type==='draw'" :label="item.field_name">
<img style="width: 500px;" :src="item.draw_template" alt="tupian">
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</el-dialog> </el-dialog>
</el-card> </el-card>
@ -428,6 +436,20 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="模板图片" v-if="field.field_type === 'draw'">
<el-upload
class="avatar-uploader"
:action="upUrl"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:headers="upHeaders"
>
<img v-if="field.draw_template" :src="field.draw_template" class="avatar"/>
<i v-else class="el-icon-plus avatar-uploader-icon"/>
</el-upload>
</el-form-item>
<el-form-item label="排序" prop="sort"> <el-form-item label="排序" prop="sort">
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number> <el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
</el-form-item> </el-form-item>
@ -496,6 +518,7 @@
field_name: '', field_name: '',
sort: '', sort: '',
field_choice: [""], field_choice: [""],
draw_template:''
}, },
field_choice: [''], field_choice: [''],
options: [], options: [],
@ -585,6 +608,10 @@
{ {
value: 'selects', value: 'selects',
label: '多选' label: '多选'
},
{
value: 'draw',
label: '绘图模板'
} }
], ],
formList:[], formList:[],
@ -796,7 +823,18 @@
.catch(() => { .catch(() => {
}); });
} }
},
handleAvatarSuccess(res, file) {
debugger;
console.log(res)
this.field.draw_template = res.data.path;
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isLt2M;
}, },
//新增字段 //新增字段
handlefieldCreate() { handlefieldCreate() {

View File

@ -190,8 +190,7 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, }, {
{
value: '', value: '',
label: '' label: ''
}, { }, {
@ -200,6 +199,24 @@
}, { }, {
value: '', value: '',
label: '' label: ''
}, {
value: 'g',
label: 'g'
}, {
value: 'kg',
label: 'kg'
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, {
value: '',
label: ''
}, },
], ],
listQuery: { listQuery: {
@ -242,12 +259,19 @@
//检查表 //检查表
handlebind(scope) { handlebind(scope) {
let materialItem = sessionStorage.getItem('materialItem'); let materialItem = sessionStorage.getItem('materialItem');
let materialType = sessionStorage.getItem('materialType');
if(materialItem){ if(materialItem){
sessionStorage.removeItem('materialItem'); sessionStorage.removeItem('materialItem');
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
}else{ }else{
sessionStorage.setItem('materialItem',JSON.stringify(scope.row)); sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
} }
if(materialType){
sessionStorage.removeItem('materialType');
sessionStorage.setItem('materialType','20,50');
}else{
sessionStorage.setItem('materialType','20,50');
}
this.$router.push({name: "MaterialDO", params: {id: scope.row.id}}) this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
}, },
handleFilter() { handleFilter() {

View File

@ -119,7 +119,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div style="width: 90%;margin: auto;"> <div style="width: 90%;margin: auto;">
<svg height=1000 id="mySvg" style="width:100%!important;"> <svg height=1500 id="mySvg" style="width:100%!important;">
</svg> </svg>
</div> </div>
</div> </div>
@ -356,7 +356,7 @@
var g = new dagreD3.graphlib.Graph().setGraph({ var g = new dagreD3.graphlib.Graph().setGraph({
rankdir: 'DL', rankdir: 'DL',
nodesep: 100, nodesep: 100,
edgesep: 10,//两条线之间的距离 edgesep: 50,//两条线之间的距离
ranksep: 50,//节点之间的距离 ranksep: 50,//节点之间的距离
marginx: 160, marginx: 160,
marginy: 20, marginy: 20,