Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
7641469088
|
@ -9,8 +9,7 @@
|
|||
<div style="padding: 8px">
|
||||
<div>
|
||||
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
||||
<el-button type="primary" v-if="project_code=='bxerp'" @click="printSaleOut(mioObj,'out')" style="position: absolute;right: 40px;">发货标签</el-button>
|
||||
<el-button type="primary" v-else @click="handlePrint" style="position: absolute;right: 40px;">打印</el-button>
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 40px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="编号">{{
|
||||
mioObj.number
|
||||
|
@ -52,6 +51,7 @@
|
|||
>{{ mioObj.customer_name }}</el-descriptions-item
|
||||
>
|
||||
</el-descriptions>
|
||||
<span v-if="indexArr.length>0" style="font-size: 14px;">大箱标签:</span><el-button type="primary" line v-for="item in indexArr" :key="item" @click="printSaleOut(mioObj,'out',item)">第{{ item }}箱</el-button>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="height: 8px"></div>
|
||||
|
@ -322,7 +322,6 @@ import packDialog from "./packPrint_form.vue";
|
|||
import checkDialog from "./mioitem_check.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
import scFileImport from "@/components/scFileImport";
|
||||
import { index } from "d3";
|
||||
export default {
|
||||
name: "mioitem",
|
||||
components: {
|
||||
|
@ -359,6 +358,7 @@ export default {
|
|||
mioObj: {},
|
||||
mioitemObj: {},
|
||||
wprList:[],
|
||||
indexArr:[],
|
||||
selection: [],
|
||||
tableData:[],
|
||||
tableDatas:[],
|
||||
|
@ -425,14 +425,19 @@ export default {
|
|||
that.mioObj = res;
|
||||
that.mioType = res.type;
|
||||
that.belongDeptId = res.belong_dept;
|
||||
let items = res.items;
|
||||
let indexArr = [];
|
||||
items.forEach((item)=>{
|
||||
if(indexArr.indexOf(item.pack_index) == -1){
|
||||
indexArr.push(item.pack_index);
|
||||
}
|
||||
})
|
||||
that.indexArr = indexArr;
|
||||
});
|
||||
},
|
||||
//添加
|
||||
table_add() {
|
||||
let that = this;
|
||||
// console.log(this.$refs.table);
|
||||
// console.log(this.$refs.table.tableData);
|
||||
// console.log(that.mioType);
|
||||
let tableData = this.$refs.table.tableData;
|
||||
let datas = [];
|
||||
tableData.forEach(item => {
|
||||
|
@ -470,6 +475,7 @@ export default {
|
|||
that.$API.inm.mio.packmioitem.req(that.mioObj.id,params).then((res) => {
|
||||
that.$message.success("装箱成功");
|
||||
that.showPack = false;
|
||||
that.getMio();
|
||||
that.$refs.table.refresh();
|
||||
});
|
||||
},
|
||||
|
@ -542,11 +548,8 @@ export default {
|
|||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
this.getMio();
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
handlePackSuccess(){},
|
||||
handleCheckSuccess() {
|
||||
|
@ -643,13 +646,14 @@ export default {
|
|||
that.printSetting();
|
||||
}
|
||||
},
|
||||
printSaleOut(row,type){
|
||||
printSaleOut(row,type,index){
|
||||
let that = this;
|
||||
that.packType = type;
|
||||
that.mioitemObj = row;
|
||||
this.dialog.pack = true;
|
||||
that.$nextTick(() => {
|
||||
that.$refs.packDialog.open();
|
||||
let total = that.indexArr.length;
|
||||
that.$refs.packDialog.open(index,total);
|
||||
});
|
||||
},
|
||||
upSuccess1(res, close) {
|
||||
|
|
|
@ -137,8 +137,6 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
console.log(that.type);
|
||||
console.log(that.mioObj);
|
||||
that.$nextTick(() => {
|
||||
if(that.type=="in"){//里面的小箱子
|
||||
that.form.name = that.mioObj.material_?that.mioObj.material_.name:'';
|
||||
|
@ -146,21 +144,36 @@ export default {
|
|||
that.form.batch = that.mioObj.batch;
|
||||
that.form.count = that.mioObj.count;
|
||||
}else{//外面的大箱子
|
||||
let date = new Date();
|
||||
that.form.date = that.$TOOL.dateFormat2(date);
|
||||
console.log(that.form.date);
|
||||
let items = that.mioObj.items;
|
||||
that.form.date = that.mioObj.date;
|
||||
that.form.packNum = items.length;
|
||||
that.form.pack = items.map(item=>item.count).reduce((a,b)=>a+b);
|
||||
that.form.name = items[0].material_.name;
|
||||
that.form.model = items[0].material_.model;
|
||||
that.form.batch = items[0].batch;
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open() {
|
||||
open(index,total) {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
that.form.date = that.$TOOL.dateFormat2(date);
|
||||
if(index&&total){
|
||||
that.form.packNum = total;
|
||||
that.form.pack = index+'/'+total;
|
||||
that.$nextTick(() => {
|
||||
let totalCount = 0;
|
||||
let items = that.mioObj.items;
|
||||
that.form.name = items[0].material_.name;
|
||||
that.form.model = items[0].material_.model;
|
||||
that.form.batch = items[0].batch;
|
||||
items.forEach(item=>{
|
||||
if(item.pack_index==index){
|
||||
totalCount += Number(item.count);
|
||||
}
|
||||
})
|
||||
that.form.count = totalCount;
|
||||
})
|
||||
}
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue