Commit fb72273f authored by renjintao's avatar renjintao

send

parent 85dcc6e3
......@@ -41,7 +41,7 @@
<Button type="primary" @click="addModal=true">创建</Button>
</template>
<template slot="batch">
<Button type="primary" class="mr10 ml10">订单派发</Button>
<Button type="primary" class="mr10 ml10" @click="openSendModal">订单派发</Button>
<Button type="primary" class="mr10 ml10">批量删除</Button>
</template>
</DataGrid>
......@@ -61,6 +61,13 @@
<Button type="primary" @click="orderSplitOk">确定分解</Button>
</div>
</Modal>
<Modal v-model="sendModal" title="订单派发" width="1200">
<Send :row="sendList" ref="orderSplit" />
<div slot="footer">
<Button @click="splitModal = false">取消</Button>
<Button type="primary" @click="orderSplitOk">确定分解</Button>
</div>
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
......@@ -90,6 +97,7 @@ import Edit from "./edit";
import Detail from "./detail";
import Search from "./search";
import Split from "./split";
import Send from "./send";
export default {
name: "list",
components: {
......@@ -97,7 +105,8 @@ export default {
Edit,
Detail,
Search,
Split
Split,
Send
},
data() {
return {
......@@ -113,7 +122,8 @@ export default {
detailModal: false,
deletelModal: false,
splitModal: false,
ModalInfo:false,
ModalInfo: false,
sendModal: false,
curId: 0,
id: "id",
columns: [
......@@ -689,7 +699,8 @@ export default {
taskTypeList: [], //任务类型
statusList: [], //状态类型
rowData: {}, //编辑、查看的当前行数据
ModalInfoStaut:'',
ModalInfoStaut: "",
sendList:[],
};
},
created() {
......@@ -829,17 +840,21 @@ export default {
// }
// })
// } else {
this.$http.order.orderSplit(this.dataListRetrun).then((res) => {
if (res.result) {
this.$Message.success('订单分解成功!')
this.easySearch('')
this.ModalOrderSplit = false
} else {
this.$Message.error('订单分解失败!')
}
})
//}
this.ModalInfo = false
this.$http.order.orderSplit(this.dataListRetrun).then(res => {
if (res.result) {
this.$Message.success("订单分解成功!");
this.easySearch("");
this.ModalOrderSplit = false;
} else {
this.$Message.error("订单分解失败!");
}
});
//}
this.ModalInfo = false;
},
openSendModal() {
this.sendModal = true;
this.rowData = sendList;
},
remove(id) {
this.deletelModal = true;
......@@ -947,10 +962,11 @@ export default {
//new tree end
//list start
onSelect(a, b) {
alert(JSON.stringify(a));
//alert(JSON.stringify(a));
//批量选择
let selectRows = a;
this.arrPartPkId = [];
this.sendList=a;
// selectRows.forEach(e => {
// this.arrPartPkId.push(e.part_task_pk);
// });
......
<template>
<div style="width:100%;margin:0 auto" :style="{height:divHeight}">
<Detail v-if="info.status" :info="info"></Detail>
<Table
:loading="loading"
border
:columns="columns1"
:data="dataList"
class="tableCommon"
v-if="osrMoreList"
></Table>
<div style="width100%;margin:40px auto">
<Form
:model="orderForm"
:label-width="110"
class="margin-top-20 margin-bottom-50"
:rules="ruleValidate"
ref="formValidate"
>
<Row>
<Col span="8" v-if="false">
<FormItem label="主工艺人员" style="width:100%" prop="DistributeMainRouting">
<UserSelect
ref="userSelected"
v-model="orderForm.DistributeMainRouting"
style="width:240px"
:roleTitle="roleTitle"
/>
</FormItem>
</Col>
<Col span="6">
<FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect
ref="userSelected"
v-model="orderForm.ProductingPreparationPeople"
style="width:240px"
/>
</FormItem>
</Col>
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<DatePicker
v-model="orderForm.ProductingPreparationFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeProductPFD"
></DatePicker>
</FormItem>
</Col>
<Col span="6">
<FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect
ref="userSelected"
v-model="orderForm.QuotationPeople"
style="width:240px"
/>
</FormItem>
</Col>
<Col span="8" v-if="false">
<FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate">
<DatePicker
v-model="orderForm.MainRoutingFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeMainRFD"
></DatePicker>
</FormItem>
</Col>
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate">
<DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem>
</Col>
<Col span="6" v-if="false">
<FormItem label="专业工艺人员" style="width:100%" prop="MajorRoutingPeople">
<UserSelect ref="userSelected" v-model="orderForm.MajorRoutingPeople" />
</FormItem>
</Col>
<Col span="6" v-if="false">
<FormItem label="完成时间" style="width:100%" prop="MajorRoutingFinishDate">
<DatePicker
v-model="orderForm.MajorRoutingFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeMajorRFD"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
</div>
</div>
</template>
<script>
import Detail from "./detail";
var myDate = new Date();
export default {
name: "send",
components: {
Detail
},
data() {
return {
divHeight: "260px",
osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表
info: {
status: true,
orderInfo: []
},
roleTitle: "工艺员",
orderForm: {
DistributeMainRouting: null, //主工艺人员
MainRoutingFinishDate: "", //主工艺人员完成时间
MajorRoutingPeople: null, //专业工艺人员
MajorRoutingFinishDate: "", //专业工艺人员完成时间
CheckUpPeople: 1, //校对人员 暂时不用
CheckUpFinishDate: "2019-12-19", //校对人员完成时间
ProductingPreparationPeople: null, //生产准备人员
ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员
QuotationFinishDate: "" //订单报价完成时间
},
columns1: [
{
title: "订单编码",
key: "mesCode",
width: 180,
tooltip: true
},
{
title: "任务类型",
key: "taskType",
align: "center",
width: 100,
tooltip: true
},
{
title: "产品名称",
key: "productName",
tooltip: true
},
{
title: "阶段",
key: "stage",
width: 80
},
{
title: "材料",
key: "materialId",
width: 100,
tooltip: true
},
{
title: "数量",
key: "quantity",
align: "right",
width: 70
}
],
dataList: [],
dataListRetrun: [], //确定后返回数据
ruleValidate: {
// DistributeMainRouting: [
// {
// required: true,
// message: '请选择人员',
// trigger: 'change',
// type: 'number'
// }
// ],
// MainRoutingFinishDate: [
// {
// required: true,
// message: '请选择时间',
// trigger: 'change'
// }
// ],
// MajorRoutingPeople: [
// {
// required: true,
// message: '请选择人员',
// trigger: 'change',
// type: 'number',
// }
// ],
// MajorRoutingFinishDate: [
// {
// required: true,
// message: '请选择时间',
// trigger: 'change'
// }
// ],
// CheckUpPeople: [
// {
// required: true,
// message: '请选择人员',
// trigger: 'change',
// }
// ],
// CheckUpFinishDate: [
// {
// required: true,
// message: '请选择时间',
// trigger: 'change'
// }
// ],
ProductingPreparationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
ProductingPreparationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
],
QuotationPeople: [
{
required: true,
message: "请选择人员",
trigger: "change",
type: "number"
}
],
QuotationFinishDate: [
{
required: true,
message: "请选择时间",
trigger: "change"
}
]
}
};
},
props: {
row: {
type: Array,
default: () => {
return [];
}
}
},
methods: {
intData(data) {
//打开modal层时给订单list赋值
this.orderInfo = [];
this.dataList = [];
this.dataList = data;
this.osrOneList = false;
this.osrMoreList = false;
if (data.length == 1) {
this.info.status = true;
this.info.orderInfo = data[0];
} else if (data.length > 1) {
this.osrMoreList = true;
this.info.status = false;
this.info.orderInfo = [];
}
},
returnDataList() {
this.dataListRetrun = [];
this.dataList.forEach(item => {
let objStr = {};
objStr.id = item.id;
objStr.mesCode = item.mesCode;
objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting;
objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate;
objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople;
objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate;
objStr.CheckUpPeople = this.orderForm.CheckUpPeople;
objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate;
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
this.dataListRetrun.push(objStr);
});
//返回审批数据
return this.dataListRetrun;
},
getTimeMainRFD(value) {
this.orderForm.MainRoutingFinishDate = value;
},
getTimeMajorRFD(value) {
this.orderForm.MajorRoutingFinishDate = value;
},
getTimeCheckFD(value) {
this.orderForm.CheckUpFinishDate = value;
},
getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = value;
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value;
}
},
created() {
var theight = window.innerHeight - 400 + "px";
this.divHeight = theight;
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + "px";
})();
};
},
watch: {
row(v) {
if (v != []) {
this.orderSearchForm = this.$u.clone(this.row);
this.placeholdeinfo=this.orderSearchForm.productName
}
}
}
};
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment