补打功能

yangwl
mengjiao 2 months ago
parent be12b1bf7c
commit f67cd30d6f

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

@ -108,6 +108,18 @@
v-hasPermi="['mes:pro:workorder:edit']" v-hasPermi="['mes:pro:workorder:edit']"
>打印标识卡 >打印标识卡
</el-button> </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> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -246,11 +258,27 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
<script> <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 { export default {
name: "Order", name: "Order",
data() { data() {
@ -273,6 +301,7 @@ export default {
title: "", title: "",
// //
open: false, open: false,
openTEM: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -306,6 +335,7 @@ export default {
lastUpdateDate: null, lastUpdateDate: null,
Active: null, Active: null,
enterpriseId: null, enterpriseId: null,
buNumber:null,
enterpriseCode: null enterpriseCode: null
}, },
// //
@ -333,6 +363,10 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
cancelTEM() {
this.openTEM = false;
this.reset();
},
// //
reset() { reset() {
this.form = { this.form = {
@ -366,6 +400,7 @@ export default {
lastUpdateDate: null, lastUpdateDate: null,
Active: null, Active: null,
enterpriseId: null, enterpriseId: null,
buNumber:null,
enterpriseCode: null enterpriseCode: null
}; };
this.resetForm("form"); 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() { printIdCard() {
// ID // ID
if (this.ids.length === 0) { if (this.ids.length === 0) {
@ -448,8 +510,15 @@ export default {
this.$modal.msgError("打印失败: " + error.message); 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