成品页面修改,包材标识卡打印

yangwl
mengjiao 3 months ago
parent ac12cd12ea
commit 3efb304f03

@ -25,6 +25,14 @@ export function addOrder(data) {
data: data
});
}
//
export function getIdCardList(data) {
return request({
url: '/wms/order/getIdCardList',
method: 'post',
data: data
});
}
// 修改包材采购单
export function updateOrder(data) {

@ -97,12 +97,24 @@
v-hasPermi="['wms:order:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-printer"
size="mini"
:disabled="single"
@click="printIdCard"
v-hasPermi="['mes:pro:workorder:edit']"
>打印标识卡
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" :index='indexMethod'> </el-table-column>
<el-table-column label="序号" type="index" > </el-table-column>
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="采购单号" align="center" prop="procureCode" min-width="200"/>
@ -128,8 +140,8 @@
<span v-else-if="scope.row.orderStatus === '2'">收货完成</span>
</template>
</el-table-column>
<el-table-column label="供应商编码" align="center" prop="supplierCode" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="供应商编码" align="center" prop="supplierCode" min-width="200"/>
<el-table-column label="供应商名称" align="center" prop="supplierName" min-width="200"/>
<el-table-column label="备注" align="center" prop="Remark" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createDate" width="180">
@ -238,8 +250,7 @@
</template>
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/wms/order";
import { listOrder, getOrder, delOrder, addOrder, updateOrder,getIdCardList } from "@/api/wms/order";
export default {
name: "Order",
data() {
@ -411,6 +422,37 @@ export default {
}
});
},
printIdCard() {
// ID
if (this.ids.length === 0) {
this.$modal.msgError("请先选择至少一条订单进行打印。");
return;
}
// ID
const selectedIds = this.ids;
//
Promise.all(selectedIds.map(id => getIdCardList({ id })))
.then(responses => {
responses.forEach(response => {
//
if (response.code === 200 ) {
this.$modal.msgSuccess(response.msg);
}
//
});
})
.catch(error => {
this.$modal.msgError("打印失败: " + error.message);
});
},
/** 删除按钮操作 */
handleDelete(row) {
const IDs = row.id || this.ids;

@ -236,6 +236,16 @@
v-hasPermi="['wms:put:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-edit"
size="mini"
@click="handleUpdateKEN"
v-hasPermi="['wms:put:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
@ -268,6 +278,7 @@
v-hasPermi="['wms:put:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -357,36 +368,43 @@
<!-- 添加或修改成品生产入库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="报工单号" prop="workOrder">
<el-input v-model="form.workOrder" placeholder="请输入报工单号" />
</el-form-item>
<!-- <el-form-item label="报工单号" prop="workOrder">-->
<!-- <el-input v-model="form.workOrder" placeholder="请输入报工单号" />-->
<!-- </el-form-item>-->
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item label="生产工单" prop="productOrder">
<el-form-item label="生产工单" prop="productOrder">
<el-input v-model="form.productOrder" placeholder="请输入生产工单号" />
</el-form-item>
<el-form-item label="仓库编码" prop="whCode">
<el-input v-model="form.whCode" placeholder="请输入仓库编码" />
<el-form-item label="生产批次" prop="batchNumber">
<el-input v-model="form.batchNumber" placeholder="请输入生产工单号" />
</el-form-item>
<el-form-item label="库区编码" prop="waCode">
<el-input v-model="form.waCode" placeholder="请输入库区编码" />
<el-form-item label="入库批次" prop="attr4">
<el-input v-model="form.attr4" placeholder="请输入生产工单号" />
</el-form-item>
<el-form-item label="库位编码" prop="wlCode">
<el-input v-model="form.wlCode" placeholder="请输入编码" />
<el-form-item label="仓库编码" prop="whCode">
<el-input v-model="form.whCode" placeholder="请输入库编码" />
</el-form-item>
<!-- <el-form-item label="库区编码" prop="waCode">-->
<!-- <el-input v-model="form.waCode" placeholder="请输入库区编码" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库位编码" prop="wlCode">-->
<!-- <el-input v-model="form.wlCode" placeholder="请输入库位编码" />-->
<!-- </el-form-item>-->
<el-form-item label="产品名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入产品名称" />
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="form.productCode" placeholder="请输入产品编码" />
</el-form-item>
<el-form-item label="产品分类" prop="productSort">
<el-input v-model="form.productSort" placeholder="请输入产品分类" />
</el-form-item>
<el-form-item label="规格型号" prop="specification">
<el-input v-model="form.specification" placeholder="请输入规格型号" />
</el-form-item>
<!-- <el-form-item label="产品分类" prop="productSort">-->
<!-- <el-input v-model="form.productSort" placeholder="请输入产品分类" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="规格型号" prop="specification">-->
<!-- <el-input v-model="form.specification" placeholder="请输入规格型号" />-->
<!-- </el-form-item>-->
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
</el-form-item>
@ -598,7 +616,7 @@ export default {
this.open = true;
this.title = "添加成品生产入库";
},
/** 修改按钮操作 */
/** 过账按钮操作 */
handleUpdate(row) {
const ids = row.id || this.ids;
let postData = this.ids.map(id => ({ id: id }));
@ -610,6 +628,16 @@ export default {
this.$modal.msgSuccess("过账完成");
}).catch(() => {});
},
/** 修改按钮操作 */
handleUpdateKEN(row) {
this.reset();
const ID = row.ID || this.ids
getPut(ID).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改";
});
},
formatProductCode(code) {
// 7
if (!code) return code; // null undefined

@ -95,8 +95,13 @@
<el-table-column label="库区编码" align="center" prop="waCode" v-if="false" />
<el-table-column label="库位编码" align="center" prop="wlCode" v-if="false" />
<el-table-column label="出库地点" align="center" prop="deliveryPlace" v-if="false" />
<el-table-column label="产品名称" align="center" prop="productName"/>
<el-table-column label="产品编码" align="center" prop="productCode"/>
<el-table-column label="产品名称" align="center" prop="productName" width="250"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="250">
<template slot-scope="scope">
<span>{{ formatProductCode(scope.row.productCode) }}</span>
</template>
</el-table-column>
<el-table-column label="产品分类" align="center" prop="productSort" v-if="false" />
<el-table-column label="规格型号" align="center" prop="specification" v-if="false" />
<el-table-column label="单位" align="center" prop="unitOfMeasure"/>
@ -415,6 +420,11 @@
this.open = true;
this.title = "添加成品销售出库";
},
formatProductCode(code) {
// 7
if (!code) return code; // null undefined
return code.replace(/^0{1,7}/, ''); // 170
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

@ -236,6 +236,7 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -244,6 +245,7 @@ import { listWmsRawOrderInSn, getWmsRawOrderInSn, delWmsRawOrderInSn, addWmsRawO
export default {
name: "WmsRawOrderInSn",
data() {
return {
//
@ -376,6 +378,7 @@ export default {
this.open = true;
this.title = "添加原材料收货明细";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

Loading…
Cancel
Save