Commit a0a11d46 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'master' of http://git.mes123.com/zhouyx/mes-ui into qin

parents 242d293a bcc0ae07
...@@ -290,6 +290,21 @@ export default { ...@@ -290,6 +290,21 @@ export default {
title: '紧急程度', title: '紧急程度',
key: 'urgencyLevel', key: 'urgencyLevel',
width: 100, width: 100,
filters: this.getArry(
this.$store.getters.dictionaryByKey('plan.order.urgencyLevel')
),
filterMethod(value, row) {
return row.urgencyLevel.indexOf(value) > -1
},
render: (h, params) => {
return h('state', {
props: {
code: 'plan.order.urgencyLevel',
type: 'text',
value: params.row.urgencyLevel + ''
}
})
}
}, },
// { // {
// title: '任务类型', // title: '任务类型',
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</Col>--> </Col>-->
<Col span="8"> <Col span="8">
<FormItem label="项目号" style="width:100%"> <FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" style="width:240px" /> <Input v-model="orderSearchForm.projectNumber" style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -128,7 +128,11 @@ ...@@ -128,7 +128,11 @@
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem label="紧急程度" style="width:100%"> <FormItem label="紧急程度" style="width:100%">
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel" ></dictionary> <dictionary
style="width:240px"
code="plan.order.urgencyLevel"
v-model="orderSearchForm.urgencyLevel"
></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col span="8"> <!-- <Col span="8">
...@@ -172,7 +176,7 @@ ...@@ -172,7 +176,7 @@
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" /> <Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem> </FormItem>
</Col>--> </Col>-->
<!-- <Col span="8"> <!-- <Col span="8">
<FormItem label="模型版本" style="width:100%"> <FormItem label="模型版本" style="width:100%">
<Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" /> <Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" />
...@@ -184,7 +188,7 @@ ...@@ -184,7 +188,7 @@
<Input v-model="orderSearchForm.designer" placeholder style="width:240px" /> <Input v-model="orderSearchForm.designer" placeholder style="width:240px" />
</FormItem> </FormItem>
</Col>--> </Col>-->
<!-- <Col span="8"> <!-- <Col span="8">
<FormItem label="厂内机关负责人" style="width:100%"> <FormItem label="厂内机关负责人" style="width:100%">
<Input v-model="orderSearchForm.officeFunctionary" placeholder style="width:240px" /> <Input v-model="orderSearchForm.officeFunctionary" placeholder style="width:240px" />
...@@ -213,240 +217,243 @@ ...@@ -213,240 +217,243 @@
</div> </div>
</template> </template>
<script> <script>
var myDate = new Date() var myDate = new Date();
var dayTomorrow = new Date() var dayTomorrow = new Date();
dayTomorrow.setTime(dayTomorrow.getTime() + 24 * 60 * 60 * 1000) dayTomorrow.setTime(dayTomorrow.getTime() + 24 * 60 * 60 * 1000);
var nowDate = var nowDate =
myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate() myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate();
var tomorrowDate = var tomorrowDate =
dayTomorrow.getFullYear() + dayTomorrow.getFullYear() +
'-' + "-" +
(dayTomorrow.getMonth() + 1) + (dayTomorrow.getMonth() + 1) +
'-' + "-" +
dayTomorrow.getDate() dayTomorrow.getDate();
export default { export default {
name: 'createOrder', name: "createOrder",
data() { data() {
return { return {
divHeight: '260px', divHeight: "260px",
list: [], list: [],
data1: [], data1: [],
selectdata: [], selectdata: [],
placeholdeinfo: '请选择', placeholdeinfo: "请选择",
orderSearchForm: { orderSearchForm: {
id: null, id: null,
productId: null, //产品id productId: null, //产品id
productName: '', //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段 stage: null, //阶段
materialId: null, //材料 materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: '', //甲方客户 guestName: "", //甲方客户
printSupply: '', //3D打印承制单位 printSupply: "", //3D打印承制单位
functionaryOffice: '', //厂内责任机关 functionaryOffice: "", //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: '', //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号 putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号 technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号 outerDrawnNumber: "", //外部图号/模型号
modelVersion: '', //模型版本 modelVersion: "", //模型版本
taskCode: '', //甲方任务号 taskCode: "", //甲方任务号
designer: '', //甲方设计人员 designer: "", //甲方设计人员
officeFunctionary: '', //厂内机关负责人 officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员 mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法 routing_Method: null, //工艺方法
outer_Envelope_Size: '', //包装尺寸 outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间
remark: '', //备注 remark: "", //备注
projectNumber:'',//项目号 projectNumber: "", //项目号
batchNumber:'',//批次号 batchNumber: "", //批次号
urgencyLevel:null,//紧急程度 urgencyLevel: null //紧急程度
}, },
ruleValidate: { ruleValidate: {
productId: [ productId: [
{ {
required: true, required: true,
message: '请选择产品名称', message: "请选择产品名称",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
taskType: [ taskType: [
{ {
required: true, required: true,
message: '请选择任务类型', message: "请选择任务类型",
trigger: 'change', trigger: "change",
type: 'number' type: "number"
} }
], ],
stage: [ stage: [
{ {
required: true, required: true,
message: '请选择阶段', message: "请选择阶段",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
materialId: [ materialId: [
{ {
required: true, required: true,
message: '请选择材料', message: "请选择材料",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
quantity: [ quantity: [
{ {
required: true, required: true,
message: '请输入数量', message: "请输入数量",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
routing_Method: [ routing_Method: [
{ {
required: true, required: true,
message: '请选择工艺方法', message: "请选择工艺方法",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
] ]
} }
} };
}, },
methods: { methods: {
addOrderOk() { addOrderOk() {
return this.orderSearchForm return this.orderSearchForm;
}, },
handleSelect(data) { handleSelect(data) {
if (data.length > 0) { if (data.length > 0) {
this.selectdata = [] this.selectdata = [];
this.selectdata = data this.selectdata = data;
this.list = [] this.list = [];
this.list.push({ label: data[0].title, value: data[0].id }) this.list.push({ label: data[0].title, value: data[0].id });
if (data[0].isProduct == '1') { if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].title this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo this.orderSearchForm.drawnNumber = data[0].drawingNo;
} else { } else {
this.$Message.error('此节点不是产品,请选择产品节点!') this.$Message.error("此节点不是产品,请选择产品节点!");
} }
} }
}, },
resetFields() { resetFields() {
;(this.placeholdeinfo = '请选择'), (this.placeholdeinfo = "请选择"),
(this.orderSearchForm = { (this.orderSearchForm = {
productId: null, //产品id productId: null, //产品id
productName: '', //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段 stage: null, //阶段
materialId: null, //材料 materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: '', //甲方客户 guestName: "", //甲方客户
printSupply: '', //3D打印承制单位 printSupply: "", //3D打印承制单位
functionaryOffice: '', //厂内责任机关 functionaryOffice: "", //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: '', //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号 putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号 technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号 outerDrawnNumber: "", //外部图号/模型号
modelVersion: '', //模型版本 modelVersion: "", //模型版本
taskCode: '', //甲方任务号 taskCode: "", //甲方任务号
designer: '', //甲方设计人员 designer: "", //甲方设计人员
officeFunctionary: '', //厂内机关负责人 officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员 mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法 routing_Method: null, //工艺方法
outer_Envelope_Size: '', //包装尺寸 outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间
remark: '' //备注 remark: "" //备注
}) });
}, },
inidate(data) { inidate(data) {
this.orderSearchForm = data this.orderSearchForm = data;
this.orderSearchForm.productId = parseInt(data.productId) this.orderSearchForm.productId = parseInt(data.productId);
this.orderSearchForm.taskType = parseInt(data.taskType) this.orderSearchForm.taskType = parseInt(data.taskType);
this.orderSearchForm.stage = parseInt(data.stage) this.orderSearchForm.stage = parseInt(data.stage);
this.orderSearchForm.materialId = parseInt(data.materialId) this.orderSearchForm.materialId = parseInt(data.materialId);
this.orderSearchForm.routing_Method = parseInt(data.routing_Method) this.orderSearchForm.routing_Method = parseInt(data.routing_Method);
this.orderSearchForm.guestName = parseInt(data.guestName) this.orderSearchForm.guestName = parseInt(data.guestName);
this.orderSearchForm.printSupply = parseInt(data.printSupply) this.orderSearchForm.printSupply = parseInt(data.printSupply);
this.orderSearchForm.mainDepartmentId = parseInt(data.mainDepartmentId) this.orderSearchForm.mainDepartmentId = parseInt(data.mainDepartmentId);
this.orderSearchForm.urgencyLevel = parseInt(data.urgencyLevel);
this.orderSearchForm.demandStartDate = this.getFormatDate( this.orderSearchForm.demandStartDate = this.getFormatDate(
data.demandStartDate data.demandStartDate
) );
this.orderSearchForm.demandFinishDate = this.getFormatDate( this.orderSearchForm.demandFinishDate = this.getFormatDate(
data.demandFinishDate data.demandFinishDate
) );
this.placeholdeinfo = data.productName this.placeholdeinfo = data.productName;
}, },
iniTree(data) { iniTree(data) {
this.data1 = data this.data1 = data;
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
//渲染树的样式 //渲染树的样式
return h( return h(
'span', "span",
{ {
style: { style: {
color: data.isProduct != '1' ? '#249E91' : '#333', //根据选中状态设置样式 color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: 'pointer' cursor: "pointer"
}, },
on: { on: {
click: () => { click: () => {
let arrTree = [] let arrTree = [];
arrTree.push(data) arrTree.push(data);
this.handleSelect(arrTree) //手动选择树节点 this.handleSelect(arrTree); //手动选择树节点
} }
} }
}, },
data.title data.title
) );
}, },
getStartDate(value) { getStartDate(value) {
if (value == '') { if (value == "") {
this.orderSearchForm.demandStartDate = this.getFormatDate(nowDate) this.orderSearchForm.demandStartDate = this.getFormatDate(nowDate);
} else { } else {
this.orderSearchForm.demandStartDate = this.getFormatDate(value) this.orderSearchForm.demandStartDate = this.getFormatDate(value);
} }
}, },
getFinishedDate(value) { getFinishedDate(value) {
if (value == '') { if (value == "") {
this.orderSearchForm.demandFinishDate = this.getFormatDate(tomorrowDate) this.orderSearchForm.demandFinishDate = this.getFormatDate(
tomorrowDate
);
} else { } else {
this.orderSearchForm.demandFinishDate = this.getFormatDate(value) this.orderSearchForm.demandFinishDate = this.getFormatDate(value);
} }
}, },
getFormatDate(dates) { getFormatDate(dates) {
const d = new Date(dates) const d = new Date(dates);
const resDate = const resDate =
d.getFullYear() + d.getFullYear() +
'-' + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
'-' + "-" +
this.p(d.getDate()) this.p(d.getDate());
return resDate return resDate;
}, },
p(s) { p(s) {
return s < 10 ? '0' + s : s return s < 10 ? "0" + s : s;
} }
}, },
created() { created() {
var theight = window.innerHeight - 400 + 'px' var theight = window.innerHeight - 400 + "px";
this.divHeight = theight this.divHeight = theight;
}, },
mounted() { mounted() {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
window.screenHeight = window.innerHeight window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + 'px' this.divHeight = window.screenHeight - 400 + "px";
})() })();
} };
} }
} };
</script> </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