|
@@ -3,6 +3,12 @@
|
|
|
<Toptitle title="拆单页">
|
|
|
<slot name="titleButton">
|
|
|
<Button
|
|
|
+ @click="handleFinish()"
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ >完成</Button
|
|
|
+ >
|
|
|
+ <Button
|
|
|
@click="showSupModal = true"
|
|
|
type="primary"
|
|
|
style="margin-right:10px;"
|
|
@@ -120,7 +126,7 @@
|
|
|
</div>
|
|
|
<div class="addArea">
|
|
|
<div class="addAreaTable">
|
|
|
- <Table :columns="tableColumns" :data="formData.detail" border>
|
|
|
+ <Table :columns="tableColumns" :data="formData.detail" border @on-selection-change='changeSelection'>
|
|
|
<template slot="set" slot-scope="{ row, index }">
|
|
|
<a
|
|
|
:disabled="row.status != 0"
|
|
@@ -185,6 +191,7 @@ export default {
|
|
|
data() {
|
|
|
// 这里存放数据
|
|
|
return {
|
|
|
+ detail_id:[],
|
|
|
showSupModal: false,
|
|
|
showPDTModal: false,
|
|
|
formData: {
|
|
@@ -226,6 +233,11 @@ export default {
|
|
|
searchData: {},
|
|
|
tableColumns: [
|
|
|
{
|
|
|
+ type: 'selection',
|
|
|
+ width: 60,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "序号",
|
|
|
type: "index",
|
|
|
align: "center",
|
|
@@ -343,17 +355,27 @@ export default {
|
|
|
minWidth: 80,
|
|
|
render: (h, params) => {
|
|
|
const { row } = params;
|
|
|
- return h("span", {}, row.status == 0 ? "未完成" : "已完成");
|
|
|
+ return h("span", {}, row.explode_status == 0 ? "未完成" : "已完成");
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
+ title:"是否下生产",
|
|
|
+ key:'',
|
|
|
+ align:"center",
|
|
|
+ resizable:true,
|
|
|
+ width:80,
|
|
|
+ render:(h,params) =>{
|
|
|
+ return h("span",{},params.status == 0? "否":"是")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "操作",
|
|
|
key: "name",
|
|
|
align: "center",
|
|
|
width: "120",
|
|
|
slot: "set",
|
|
|
minWidth: 80,
|
|
|
- fixed: "right",
|
|
|
+ // fixed: "right",
|
|
|
resizable: true,
|
|
|
},
|
|
|
],
|
|
@@ -414,6 +436,35 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeSelection(e){
|
|
|
+ e.forEach(item=>{
|
|
|
+ this.detail_id.push(item.id)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleFinish() {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: "确认完成?",
|
|
|
+ // content: "此操作确认后不可恢复,请确认!",
|
|
|
+ onOk: () => {
|
|
|
+ this.axios({
|
|
|
+ method: "post",
|
|
|
+ url: "/api/order_area_product_status",
|
|
|
+ data: {
|
|
|
+ orders_area_product_detail_id: this.detail_id
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$Message.success(res.msg);
|
|
|
+ this.initData(
|
|
|
+ this.formData.order_no,
|
|
|
+ this.formData.orders_area_product_detail_id
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {console.log(this.$refs.selection)},
|
|
|
+ });
|
|
|
+ },
|
|
|
//项目辅料新增
|
|
|
handleAddSup() {
|
|
|
this.supTableData.push({ id: "" });
|