fix:发货打印
This commit is contained in:
parent
bc582323ab
commit
977f5b0584
|
|
@ -118,7 +118,15 @@ export default {
|
||||||
`${config.API_URL}/inm/mio/${id}/revert/`,
|
`${config.API_URL}/inm/mio/${id}/revert/`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
packmioitem: {
|
||||||
|
name: "装箱",
|
||||||
|
req: async function(id,data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/inm/mio/${id}/pack_mioitem/`,data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 出入库明细
|
// 出入库明细
|
||||||
mioitem: {
|
mioitem: {
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,13 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
v-if="mioObj.state == 10&&mode!=='show'"
|
v-if="mioObj.state == 10&&mode!=='show'"
|
||||||
>新增</el-button
|
>新增</el-button>
|
||||||
>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-message-box"
|
||||||
|
@click="table_pack"
|
||||||
|
v-if="mioObj.state == 10&&mode!=='show'&&type=='sale_out'&&project_code=='bxerp'"
|
||||||
|
>装箱</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 8px"></div>
|
<div style="height: 8px"></div>
|
||||||
<scTable
|
<scTable
|
||||||
|
|
@ -75,7 +80,9 @@
|
||||||
hidePagination
|
hidePagination
|
||||||
hideDo
|
hideDo
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
|
@selection-change="selectionChange"
|
||||||
>
|
>
|
||||||
|
<el-table-column type="selection" width="50" />
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="物料"
|
label="物料"
|
||||||
|
|
@ -88,6 +95,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批次号" prop="batch">
|
<el-table-column label="批次号" prop="batch">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="大箱序号" prop="pack_index">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="仓库" prop="warehouse_name">
|
<el-table-column label="仓库" prop="warehouse_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
|
|
@ -155,66 +164,56 @@
|
||||||
v-if="project_code=='bxerp'&&mioObj.state == 10 &&
|
v-if="project_code=='bxerp'&&mioObj.state == 10 &&
|
||||||
(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
||||||
v-auth="'mioitem.test'"
|
v-auth="'mioitem.test'"
|
||||||
>
|
>检验</el-button>
|
||||||
检验
|
|
||||||
</el-button>
|
|
||||||
<scFileImport
|
<scFileImport
|
||||||
v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
||||||
:templateUrl="checkTemplate"
|
:templateUrl="checkTemplate"
|
||||||
accept=".xlsx"
|
accept=".xlsx"
|
||||||
:apiObj="$API.common.upload"
|
:apiObj="$API.common.upload"
|
||||||
@success="upSuccess"
|
@success="upSuccess"
|
||||||
>
|
></scFileImport>
|
||||||
</scFileImport>
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_check(scope.row)"
|
@click="table_check(scope.row)"
|
||||||
v-if="scope.row.test_date == null &&mioObj.state == 20 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
v-if="scope.row.test_date == null &&mioObj.state == 20 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
||||||
v-auth="'mioitem.test'"
|
v-auth="'mioitem.test'"
|
||||||
>
|
>检验</el-button>
|
||||||
检验
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="check_Show(scope.row)"
|
@click="check_Show(scope.row)"
|
||||||
v-if="scope.row.test_date !== null"
|
v-if="scope.row.test_date !== null"
|
||||||
>
|
>查看</el-button>
|
||||||
查看
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="check_reSet(scope.row)"
|
@click="check_reSet(scope.row)"
|
||||||
v-if="scope.row.test_date !== null"
|
v-if="scope.row.test_date !== null"
|
||||||
>
|
>检验作废</el-button>
|
||||||
检验作废
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="table_del(scope.row)"
|
@click="table_del(scope.row)"
|
||||||
v-if="mioObj.state == 10"
|
v-if="mioObj.state == 10"
|
||||||
>
|
>删除</el-button>
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mioObj.type == 'do_out'"
|
v-if="mioObj.type == 'do_out'"
|
||||||
@click="printMaterial(scope.row,'mioitem')"
|
@click="printMaterial(scope.row,'mioitem')"
|
||||||
>
|
>物料标签</el-link>
|
||||||
物料标签
|
<el-link
|
||||||
</el-link>
|
type="primary"
|
||||||
|
v-if="mioObj.state == 20&&mioObj.type == 'sale_out'"
|
||||||
|
@click="printSaleOut(scope.row,'in')"
|
||||||
|
>发货标签</el-link>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="check_revert(scope.row)"
|
@click="check_revert(scope.row)"
|
||||||
v-if="mioObj.state == 20&&(mioObj.type=='do_out'||mioObj.type=='other_in'||mioObj.type=='pur_in')"
|
v-if="mioObj.state == 20&&(mioObj.type=='do_out'||mioObj.type=='other_in'||mioObj.type=='pur_in')"
|
||||||
v-auth="'mio.update'"
|
v-auth="'mio.update'"
|
||||||
>
|
>撤回</el-button>
|
||||||
撤回
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -236,6 +235,15 @@
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
>
|
>
|
||||||
</save-dialog>
|
</save-dialog>
|
||||||
|
<pack-dialog
|
||||||
|
v-if="dialog.pack"
|
||||||
|
ref="packDialog"
|
||||||
|
:mioObj="mioitemObj"
|
||||||
|
:type="packType"
|
||||||
|
@success="handlePackSuccess"
|
||||||
|
@closed="dialog.pack = false"
|
||||||
|
>
|
||||||
|
</pack-dialog>
|
||||||
<check-dialog
|
<check-dialog
|
||||||
v-if="dialog.check"
|
v-if="dialog.check"
|
||||||
ref="checkDialog"
|
ref="checkDialog"
|
||||||
|
|
@ -276,27 +284,40 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
<el-dialog title="发货装箱" v-model="showPack">
|
||||||
|
<el-form label-width="80px">
|
||||||
|
<el-form-item label="大箱序号">
|
||||||
|
<el-input-number precision="0" v-model="pack_index"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="packSure">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
|
<el-dialog title="打印机设置" v-model="setNameVisible" width="600px">
|
||||||
<el-form label-width="100px">
|
<el-form label-width="100px">
|
||||||
<el-form-item label="打印机名称">
|
<el-form-item label="打印机名称">
|
||||||
<el-input v-model="printer_name"></el-input>
|
<el-input v-model="printer_name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" @click="savePrinter">保存</el-button>
|
<el-button type="primary" @click="savePrinter">保存</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ElLoading } from "element-plus";
|
import { ElLoading } from "element-plus";
|
||||||
import saveDialog from "./mioitem_form.vue";
|
import saveDialog from "./mioitem_form.vue";
|
||||||
|
import packDialog from "./packPrint_form.vue";
|
||||||
import checkDialog from "./mioitem_check.vue";
|
import checkDialog from "./mioitem_check.vue";
|
||||||
import print from "./../setting/print/A4.vue";
|
import print from "./../setting/print/A4.vue";
|
||||||
import scFileImport from "@/components/scFileImport";
|
import scFileImport from "@/components/scFileImport";
|
||||||
|
import { index } from "d3";
|
||||||
export default {
|
export default {
|
||||||
name: "mioitem",
|
name: "mioitem",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
|
packDialog,
|
||||||
checkDialog,
|
checkDialog,
|
||||||
scFileImport,
|
scFileImport,
|
||||||
print
|
print
|
||||||
|
|
@ -321,15 +342,17 @@ export default {
|
||||||
dialog: {
|
dialog: {
|
||||||
check: false,
|
check: false,
|
||||||
save: false,
|
save: false,
|
||||||
|
pack: false,
|
||||||
},
|
},
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {},
|
params: {},
|
||||||
// mioId: "",
|
|
||||||
mioObj: {},
|
mioObj: {},
|
||||||
|
mioitemObj: {},
|
||||||
wprList:[],
|
wprList:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
tableDatas:[],
|
tableDatas:[],
|
||||||
|
mioitemIds:[],
|
||||||
stateDict: {
|
stateDict: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "已提交",
|
20: "已提交",
|
||||||
|
|
@ -342,13 +365,16 @@ export default {
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
},
|
},
|
||||||
|
showPack:false,
|
||||||
visible: false,
|
visible: false,
|
||||||
printVisible:false,
|
printVisible:false,
|
||||||
mioitemId: "",
|
mioitemId: "",
|
||||||
|
packType: "in",
|
||||||
// type: "",
|
// type: "",
|
||||||
// cate: "",
|
// cate: "",
|
||||||
objitem: {},
|
objitem: {},
|
||||||
mtype:10,
|
mtype:10,
|
||||||
|
pack_index:1,
|
||||||
mioType:'',
|
mioType:'',
|
||||||
project_code:'',
|
project_code:'',
|
||||||
setNameVisible:false,
|
setNameVisible:false,
|
||||||
|
|
@ -405,7 +431,32 @@ export default {
|
||||||
this.$refs.saveDialog.open("add", that.mioType);
|
this.$refs.saveDialog.open("add", that.mioType);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection) {
|
||||||
|
let that = this;
|
||||||
|
that.mioitemIds = [];
|
||||||
|
that.selection = selection;
|
||||||
|
selection.forEach((item)=>{
|
||||||
|
that.mioitemIds.push(item.id);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//装箱
|
||||||
|
table_pack(){
|
||||||
|
let that = this;
|
||||||
|
that.showPack = true;
|
||||||
|
},
|
||||||
|
packSure(){
|
||||||
|
let that = this;
|
||||||
|
let params = {
|
||||||
|
mioitems: that.mioitemIds,
|
||||||
|
pack_index:that.pack_index,
|
||||||
|
}
|
||||||
|
that.$API.inm.mio.packmioitem.req(that.mioObj.id,params).then((res) => {
|
||||||
|
that.$message.success("装箱成功");
|
||||||
|
that.showPack = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
//删除
|
//删除
|
||||||
table_del(row) {
|
table_del(row) {
|
||||||
this.$confirm(`确定删除吗?`, "提示", {
|
this.$confirm(`确定删除吗?`, "提示", {
|
||||||
|
|
@ -481,6 +532,7 @@ export default {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handlePackSuccess(){},
|
||||||
handleCheckSuccess() {
|
handleCheckSuccess() {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
this.dialog.check = false;
|
this.dialog.check = false;
|
||||||
|
|
@ -574,6 +626,15 @@ export default {
|
||||||
that.printSetting();
|
that.printSetting();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
printSaleOut(row,type){
|
||||||
|
let that = this;
|
||||||
|
that.packType = type;
|
||||||
|
that.mioitemObj = row;
|
||||||
|
this.dialog.pack = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.packDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,11 @@
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="大箱序号" prop="pack_index">
|
||||||
|
<el-input-number precision="0" v-model="form.pack_index"></el-input-number>该小箱放在第几个大箱
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="物料" prop="material">
|
<el-form-item label="物料" prop="material">
|
||||||
<xtSelect
|
<xtSelect
|
||||||
|
|
@ -277,29 +282,12 @@ export default {
|
||||||
other_in: "其他入库",
|
other_in: "其他入库",
|
||||||
other_out: "其他出库",
|
other_out: "其他出库",
|
||||||
},
|
},
|
||||||
form: {count: 1,note: ''},
|
form: {count: 1,note: '',pack_index: 1},
|
||||||
rules: {
|
rules: {
|
||||||
batch:[
|
pack_index:[{required: true,message: "请填写包装序号",trigger: "blur"}],
|
||||||
{
|
batch:[{required: true,message: "请填写批次号",trigger: "blur"}],
|
||||||
required: true,
|
material: [{required: true,message: "请选择所需产品",trigger: "blur"}],
|
||||||
message: "请填写批次号",
|
warehouse: [{required: true,message: "请选择仓库",trigger: "blur"}],
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
material: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择所需产品",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
warehouse: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请选择仓库",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
selectObj:{},
|
selectObj:{},
|
||||||
showDigit:false,
|
showDigit:false,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,246 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="标签信息"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="130px"
|
||||||
|
v-if="type=='in'"
|
||||||
|
>
|
||||||
|
<el-form-item label="类型">
|
||||||
|
<el-radio-group v-model="packtype">
|
||||||
|
<el-radio label="国内">国内</el-radio>
|
||||||
|
<el-radio label="国外">国外</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-if="packtype == '国外'">
|
||||||
|
<el-form-item label="Drawing Number" prop="drawingNumber">
|
||||||
|
<el-input v-model="form.drawingNumber" placeholder="图纸编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Serial Number" prop="serialNumber">
|
||||||
|
<el-input v-model="form.serialNumber" placeholder="序列号" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="packtype == '国内'">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<el-input v-model="form.name" placeholder="名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号">
|
||||||
|
<el-input v-model="form.model" placeholder="型号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批号">
|
||||||
|
<el-input v-model="form.batch" placeholder="批号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input v-model="form.count" placeholder="数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="130px"
|
||||||
|
v-if="type=='out'"
|
||||||
|
>
|
||||||
|
<el-form-item label="类型">
|
||||||
|
<el-radio-group v-model="packtype">
|
||||||
|
<el-radio label="国内">国内</el-radio>
|
||||||
|
<el-radio label="国外">国外</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.date"
|
||||||
|
type="date"
|
||||||
|
placeholder="日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-if="packtype == '国外'">
|
||||||
|
<el-form-item label="Item" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Drawing Number" prop="drawingNumber">
|
||||||
|
<el-input v-model="form.drawingNumber" placeholder="图纸编号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Serial Number" prop="serialNumber">
|
||||||
|
<el-input v-model="form.serialNumber" placeholder="序列号" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-if="packtype == '国内'">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<el-input v-model="form.name" placeholder="名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="型号">
|
||||||
|
<el-input v-model="form.model" placeholder="型号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input v-model="form.count" placeholder="数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批号">
|
||||||
|
<el-input v-model="form.batch" placeholder="批号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="本次发货共">
|
||||||
|
<el-input-number v-model="form.packNum" placeholder="数量" />箱
|
||||||
|
<el-input v-model="form.pack" placeholder="数量" style="width: 60%;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="submit">确定</el-button>
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
props: {
|
||||||
|
type: { type: String, default: "" },
|
||||||
|
mioitemObj: { type: Object },
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
packtype: "国内",
|
||||||
|
loading: false,
|
||||||
|
mode: "add",
|
||||||
|
form: {
|
||||||
|
drawingNumber: "",
|
||||||
|
serialNumber: "",
|
||||||
|
name: "",
|
||||||
|
model: "",
|
||||||
|
batch: "",
|
||||||
|
count:"",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
number: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请填写编号",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
isSaveing: false,
|
||||||
|
options: [],
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
//显示
|
||||||
|
open() {
|
||||||
|
this.visible = true;
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
//提交
|
||||||
|
submit() {
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let commands = [];
|
||||||
|
if(that.type == "in"){
|
||||||
|
if(that.packtype == "国内"){
|
||||||
|
commands = [
|
||||||
|
"SIZE 70 mm,100 mm",
|
||||||
|
"GAP 7 mm,7 mm",
|
||||||
|
"CLS",
|
||||||
|
"REFERENCE 0,0",
|
||||||
|
"WINTEXT 20,750,36,90,0,0,Simhei,中国建筑材料科学研究总院-玻纤院",
|
||||||
|
"WINTEXT 80,750,36,90,0,0,Simhei,名称",
|
||||||
|
"WINTEXT 80,600,36,90,0,0,Simhei," + this.form.name,
|
||||||
|
"WINTEXT 130,750,36,90,0,0,Simhei,批号",
|
||||||
|
"WINTEXT 130,600,36,90,0,0,Simhei," + this.form.model,
|
||||||
|
"WINTEXT 180,750,36,90,0,0,Simhei,型号" ,
|
||||||
|
"WINTEXT 180,600,36,90,0,0,Simhei," + this.form.batch,
|
||||||
|
"WINTEXT 230,750,36,90,0,0,Simhei,数量" ,
|
||||||
|
"WINTEXT 230,600,36,90,0,0,Simhei," + this.form.count,
|
||||||
|
"PRINT 1",
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
commands = [
|
||||||
|
"SIZE 70 mm,100 mm",
|
||||||
|
"GAP 7 mm,7 mm",
|
||||||
|
"CLS",
|
||||||
|
"REFERENCE 0,0",
|
||||||
|
"WINTEXT 50,760,36,90,0,0,Simhei,Drawing Number",
|
||||||
|
"WINTEXT 50,500,36,90,0,0,Simhei," + this.form.drawingNumber,
|
||||||
|
"WINTEXT 110,760,36,90,0,0,Simhei,Serial Number",
|
||||||
|
"WINTEXT 110,500,36,90,0,0,Simhei," + this.form.serialNumber,
|
||||||
|
"PRINT 1",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}else if(that.type == "out"){
|
||||||
|
if(that.packtype == "国内"){
|
||||||
|
commands = [
|
||||||
|
"SIZE 70 mm,100 mm",
|
||||||
|
"GAP 7 mm,7 mm",
|
||||||
|
"CLS",
|
||||||
|
"REFERENCE 0,0",
|
||||||
|
"WINTEXT 20,750,36,90,0,0,Simhei,装箱单("+this.form.date+")",
|
||||||
|
"WINTEXT 80,750,36,90,0,0,Simhei,名称",
|
||||||
|
"WINTEXT 80,600,36,90,0,0,Simhei," + this.form.name,
|
||||||
|
"WINTEXT 130,750,36,90,0,0,Simhei,批号",
|
||||||
|
"WINTEXT 130,600,36,90,0,0,Simhei," + this.form.model,
|
||||||
|
"WINTEXT 180,750,36,90,0,0,Simhei,数量" ,
|
||||||
|
"WINTEXT 180,600,36,90,0,0,Simhei," + this.form.count,
|
||||||
|
"WINTEXT 230,750,36,90,0,0,Simhei,型号" ,
|
||||||
|
"WINTEXT 230,600,36,90,0,0,Simhei," + this.form.batch,
|
||||||
|
"WINTEXT 280,750,36,90,0,0,Simhei,本次发货",
|
||||||
|
"WINTEXT 320,750,36,90,0,0,Simhei,共"+this.form.packNum+"箱" ,
|
||||||
|
"WINTEXT 280,600,36,90,0,0,Simhei," + this.form.pack,
|
||||||
|
"WINTEXT 330,750,36,90,0,0,Simhei,中国建筑材料科学研究总院--玻纤院",
|
||||||
|
"PRINT 1",
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
commands = [
|
||||||
|
"SIZE 70 mm,100 mm",
|
||||||
|
"GAP 7 mm,7 mm",
|
||||||
|
"CLS",
|
||||||
|
"REFERENCE 0,0",
|
||||||
|
"WINTEXT 20,750,36,90,0,0,Simhei,Packing List("+this.form.date+")",
|
||||||
|
"WINTEXT 80,760,36,90,0,0,Simhei,Item",
|
||||||
|
"WINTEXT 80,500,36,90,0,0,Simhei," + this.form.name,
|
||||||
|
"WINTEXT 130,760,36,90,0,0,Simhei,Drawing Number",
|
||||||
|
"WINTEXT 130,500,36,90,0,0,Simhei," + this.form.drawingNumber,
|
||||||
|
"WINTEXT 180,760,36,90,0,0,Simhei,Serial Number",
|
||||||
|
"WINTEXT 180,500,36,90,0,0,Simhei," + this.form.serialNumber,
|
||||||
|
"PRINT 1",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('commands',commands);
|
||||||
|
let obj = {};
|
||||||
|
obj.printer_commands = commands;
|
||||||
|
obj.printer_name = that.printer_name;
|
||||||
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
|
that.$message.success("打印成功");
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.$emit("success");
|
||||||
|
that.visible = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表单注入数据
|
||||||
|
setData(data) {
|
||||||
|
Object.assign(this.form, data);
|
||||||
|
},
|
||||||
|
//设置过滤项
|
||||||
|
setFilters(filters) {
|
||||||
|
this.selectionFilters = filters;
|
||||||
|
this.setFiltersVisible = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style></style>
|
||||||
|
|
@ -95,6 +95,11 @@
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.state == 20"
|
||||||
|
@click="printSaleOut(scope.row,'out')"
|
||||||
|
>发货标签</el-link>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="warning"
|
type="warning"
|
||||||
|
|
@ -133,14 +138,24 @@
|
||||||
@closed="visibleDrawer = false"
|
@closed="visibleDrawer = false"
|
||||||
>
|
>
|
||||||
</record-dialog>
|
</record-dialog>
|
||||||
|
<pack-dialog
|
||||||
|
v-if="dialog.pack"
|
||||||
|
ref="packDialog"
|
||||||
|
:mioObj="mioitemObj"
|
||||||
|
:type="packType"
|
||||||
|
@success="handlePackSuccess"
|
||||||
|
@closed="dialog.pack = false"
|
||||||
|
>
|
||||||
|
</pack-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./sale_form.vue";
|
import saveDialog from "./sale_form.vue";
|
||||||
import recordDialog from "./../inm/mioitem.vue";
|
import recordDialog from "./../inm/mioitem.vue";
|
||||||
|
import packDialog from "./../inm/packPrint_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "mio",
|
name: "mio",
|
||||||
components: {
|
components: {
|
||||||
|
packDialog,
|
||||||
saveDialog,
|
saveDialog,
|
||||||
recordDialog,
|
recordDialog,
|
||||||
},
|
},
|
||||||
|
|
@ -162,6 +177,7 @@ export default {
|
||||||
],
|
],
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
pack: false,
|
||||||
record: false,
|
record: false,
|
||||||
},
|
},
|
||||||
query: {},
|
query: {},
|
||||||
|
|
@ -175,6 +191,8 @@ export default {
|
||||||
type: "",
|
type: "",
|
||||||
cate: "good",
|
cate: "good",
|
||||||
mioId: "",
|
mioId: "",
|
||||||
|
packType: "out",
|
||||||
|
showPack:false,
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -245,6 +263,15 @@ export default {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
printSaleOut(row,type){
|
||||||
|
let that = this;
|
||||||
|
that.packType = type;
|
||||||
|
that.mioitemObj = row;
|
||||||
|
this.dialog.pack = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.packDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue