补打功能

yangwl
mengjiao 3 months ago
parent be12b1bf7c
commit f67cd30d6f

@ -33,7 +33,13 @@ export function getIdCardList(data) {
data: data
});
}
export function getIdCardListDA(data) {
return request({
url: '/wms/order/getIdCardListDA',
method: 'post',
data: data
});
}
// 修改包材采购单
export function updateOrder(data) {
return request({

@ -108,6 +108,18 @@
v-hasPermi="['mes:pro:workorder:edit']"
>打印标识卡
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-printer"
size="mini"
:disabled="single"
@click="printIdCardKEN"
v-hasPermi="['mes:pro:workorder:edit']"
>补打标识卡
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -246,11 +258,27 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="openTEM" width="500px" append-to-body>
<el-form ref="formBD" :model="form" :rules="rules" label-width="80px">
<el-form-item label="补打数量" prop="buNumber">
<el-input v-model="form.buNumber" placeholder="补打数量" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormTRM"> </el-button>
<el-button @click="cancelTEM()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder,getIdCardList } from "@/api/wms/order";
import { listOrder, getOrder, delOrder, addOrder, updateOrder,getIdCardList,getIdCardListDA } from "@/api/wms/order";
export default {
name: "Order",
data() {
@ -273,6 +301,7 @@ export default {
title: "",
//
open: false,
openTEM: false,
//
queryParams: {
pageNum: 1,
@ -306,6 +335,7 @@ export default {
lastUpdateDate: null,
Active: null,
enterpriseId: null,
buNumber:null,
enterpriseCode: null
},
//
@ -333,6 +363,10 @@ export default {
this.open = false;
this.reset();
},
cancelTEM() {
this.openTEM = false;
this.reset();
},
//
reset() {
this.form = {
@ -366,6 +400,7 @@ export default {
lastUpdateDate: null,
Active: null,
enterpriseId: null,
buNumber:null,
enterpriseCode: null
};
this.resetForm("form");
@ -422,6 +457,33 @@ export default {
}
});
},
submitFormTRM(){
const ID =this.ids[0]
console.log(ID)
this.$refs["formBD"].validate(valid => {
if (valid) {
console.log(this.form.buNumber)
this.form.ID=ID
const formData = {
...this.form, //
id: ID // ID
}
//
getIdCardListDA(formData)
.then(response => {
if (response.code === 200 ) {
this.$modal.msgSuccess(response.msg);
this.openTEM = false; //
this.getList(); //
}
})
.catch(error => {
console.error('Error:', error);
this.$modal.msgError("请求失败,请稍后再试");
});
}
});
},
printIdCard() {
// ID
if (this.ids.length === 0) {
@ -448,8 +510,15 @@ export default {
this.$modal.msgError("打印失败: " + error.message);
});
},
printIdCardKEN(){
// const ID = row.id || this.ids
// getOrder(ID).then(response => {
// this.form = response.data;
//
// });
this.openTEM = true;
this.title = "补打物料标识卡";
},

Loading…
Cancel
Save