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

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

parents e68eee19 c3fd2de7
......@@ -162,7 +162,7 @@ export default {
},
size: {
type: String,
default: "default "
default: "default"
},
height: {
type: Number,
......
......@@ -2,20 +2,20 @@ import Api from '@/plugins/request'
export default {
index: `${resourceUrl}mesparttaskplansimulate/paged`,
paged(params) {
return Api.post(`${resourceUrl}mesparttaskplansimulate/paged`, params);
return Api.post(`${resourceUrl}/mesparttaskplansimulate/paged`, params);
},
get(params) {
return Api.get(`${resourceUrl}mesparttaskplansimulate/get`, params);
return Api.get(`${resourceUrl}/mesparttaskplansimulate/get`, params);
},
create(params) {
return Api.post(`${resourceUrl}mesparttaskplansimulate/create`, params);
return Api.post(`${resourceUrl}/mesparttaskplansimulate/create`, params);
},
update(params) {
return Api.post(`${resourceUrl}mesparttaskplansimulate/update`, params);
return Api.post(`${resourceUrl}/mesparttaskplansimulate/update`, params);
},
//删除:
delete(params) {
return Api.delete(`${resourceUrl}mesparttaskplansimulate/delete`, {
return Api.delete(`${resourceUrl}/mesparttaskplansimulate/delete`, {
params: params
});
},
......@@ -76,4 +76,13 @@ export default {
userdepartmentsofworkshop(params) {
return Api.get(`${systemUrl}/user/userdepartmentsofworkshop`, params);
},
//工时修改
updatesetuptimeandfirstequip(params) {
return Api.post(`${apsUrl}/mes_op_task_plan_simulate/updatesetuptimeandfirstequip`, params);
},
//工时同步到原始工艺
apsupdate(params) {
return Api.post(`${designUrl}/routingdetail/apsupdate `, params);
},
}
......@@ -2,44 +2,25 @@
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<Col :span="12">
<FormItem :label="l('tASKSEQ')" prop="tASKSEQ">
<Input v-model="entity.task_seq"></Input>
</FormItem>
<FormItem :label="l('tASKSEQ')" prop="tASKSEQ">{{this.entity.task_seq}}</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('tASKNAME')" prop="tASKNAME">
<Input v-model="entity.task_name"></Input>
</FormItem>
<FormItem :label="l('tASKNAME')" prop="tASKNAME">{{this.entity.task_name}}</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('sHOPID')" prop="sHOPID">
<!-- v-model="orderSearchForm.orderCat" -->
<Select v-model="entity.sHOPID">
<Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select>
<FormItem label="生产设备">
<EquipSelect v-model="entity.eQUIPID"></EquipSelect>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('eQUIPID')" prop="eQUIPID">
<Select v-model="entity.eQUIPID">
<Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select>
<Col :span="12" v-model="entity.rUNTIME">
<FormItem :label="l('rUNTIME')" prop="rUNTIME">
<InputNumber v-model="entity.run_time" :max="100" :min="1"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="关重资源名称" prop="rUNTIME">
<Select v-model="entity.run_time">
<Option value="" class="option-text">请选择</Option>
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select>
</FormItem>
</Col>
<Col :span="12" v-model="entity.rUNTIME">
<FormItem :label="l('rUNTIME')" prop="rUNTIME">
<!-- v-model="value1" -->
<InputNumber v-model="entity.run_time" :max="100" :min="1"></InputNumber>
<FormItem label=" ">
<Checkbox v-model="single">是否同步到原始工艺</Checkbox>
</FormItem>
</Col>
</Row>
......@@ -50,70 +31,99 @@
</Form>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
name: 'Edit',
name: "Edit",
data() {
return {
disabled: false,
entity: {},
orderCatList:[
],
orderCatList: [],
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
name: [{ required: true, message: "必填", trigger: "blur" }]
},
single: false
};
},
props: {
row: {
type:Object,
default:()=>{
return null
type: Object,
default: () => {
return null;
}
}
},
methods: {
load(v) {
this.entity = v
this.entity = v;
},
handleSubmit() {
this.$refs.form.validate((v) => {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true
Api.update(this.entity)
.then((r) => {
this.disabled = false
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-option-ok')
this.disabled = true;
let parmsUp = {
run_time: this.entity.run_time,
first_equip: this.entity.eQUIPID,
id: this.entity.id
};
Api.updatesetuptimeandfirstequip(parmsUp)
.then(res => {
if (res.success) {
if (!this.single) {
this.$Message.success("保存成功");
this.$emit("on-option-ok");
} else {
let parms = {
id: this.entity.routing_detail_id, //工序ID
name: this.entity.task_name, //工序名
task_seq: this.entity.task_seq, //工序号
resource_id: this.entity.eQUIPID, //设备id
runtime: this.entity.run_time, //单件工时
department_id: 0 //班组ID
};
Api.apsupdate(parms)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-option-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
} else {
this.$Message.error('保存失败')
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
})
});
},
handleClose() {
this.$emit('on-close')
this.$emit("on-close");
},
l(key) {
key = 'mes_op_task_execute' + '.' + key
return this.$t(key)
key = "mes_op_task_execute" + "." + key;
return this.$t(key);
}
},
watch: {
row(v) {
if (v != {}) {
//alert(JSON.stringify(v))
this.entity = v
this.entity = v;
}
}
}
}
};
</script>
......@@ -14,6 +14,7 @@
</div>
</div>
</Sider>
<Content class="content">
<CustomTable :tcolumn="ocolumn" :orderSearchForm="orderSearchForm" ref="CustomTable">
<!-- slot内容 -->
......
......@@ -183,9 +183,9 @@ export default {
RoutingList: {},
components: {},
ruleValidate: {
code: [
{ required: true, message: '工艺文件编号不能为空', trigger: 'blur' }
],
// code: [
// { required: true, message: '工艺文件编号不能为空', trigger: 'blur' }
// ],
// number:[{required: true,type:'number'}],
name: [
{ required: true, message: '工艺文件名称不能为空', trigger: 'blur' }
......
......@@ -63,7 +63,7 @@
</FormItem>
</Col>
<Col span="12">
<FormItem label="订单状态" style="width:100%">
<FormItem label="状态" style="width:100%">
<dictionary
code="plan.order.status"
v-model="orderSearchForm.status"
......@@ -74,6 +74,28 @@
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="批次号" style="width:100%">
<Input v-model="orderSearchForm.batchNumber" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="紧急程度" style="width:100%">
<dictionary
code="plan.order.urgencyLevel"
v-model="orderSearchForm.urgencyLevel"
style="width:240px"
></dictionary>
</FormItem>
</Col>
<Col span="12">
<FormItem label="任务类型" style="width:100%">
<dictionary
......@@ -83,6 +105,8 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="阶段" style="width:100%">
<dictionary
......@@ -92,8 +116,6 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="材料" style="width:100%">
<dictionary
......@@ -103,13 +125,13 @@
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="数量" style="width:100%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary
......@@ -119,15 +141,6 @@
></dictionary>
</FormItem>
</Col>
<Col span="12">
<FormItem label="3D打印承制单位" style="width:100%">
<dictionary
code="plan.order.printSupply"
v-model="orderSearchForm.printSupply"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
......@@ -185,18 +198,6 @@
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="工艺状态" style="width:100%">
<Select v-model="orderSearchForm.RoutingSetStatus" style="width:200px">
<Option value>全部</Option>
<Option value="1">已设置</Option>
<Option value="0">未设置</Option>
</Select>
</FormItem>
</Col>
<Col span="12"></Col>
</Row>
</Form>
<div slot="footer">
<Button @click="close" style="margin-left:20px;">取消</Button>
......@@ -413,12 +414,12 @@ export default {
}, //确定保存后返回数据
orderSearchForm: {
productId: null, //产品id
productId: "", //产品id
productName: "", //产品名称
taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: 0, //数量
quantity: null, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
......@@ -437,9 +438,11 @@ export default {
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
MaxResultCount: 10,
SkipCount: 0,
RoutingSetStatus: ""
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null, //紧急程度
MaxResultCount:10,
SkipCount:0,
},
formValidate: {
id: "",
......@@ -516,6 +519,8 @@ export default {
fixed: "left"
},
{ title: "图号", key: "drawnNumber", width: 120 },
{ title: "项目号", key: "projectNumber", width: 120 },
{ title: "批次号", key: "batchNumber", width: 120 },
{ title: "数量", key: "quantity", width: 80, align: "center" },
......@@ -761,7 +766,7 @@ export default {
this.orderSearchForm.SkipCount =
(num - 1) * this.orderSearchForm.MaxResultCount;
console.log(this.orderSearchForm.SkipCount);
this.loaddata(this.orderSearchForm);
},
pageSizeChange(limit) {
......@@ -776,30 +781,13 @@ export default {
// url =
// `${PlanUrl}/mesorder/getpagedmesordersforpdefm?ProcessUserType=` + params
// }else{
this.orderSearchForm = {
productId: params.productId,
taskType: params.taskType, //任务类型
stage: params.stage, //阶段
materialId: params.materialId, //材料
quantity: params.quantity, //数量
guestName: params.guestName, //甲方客户
printSupply: params.printSupply, //3D打印承制单位
functionaryOffice: params.functionaryOffice, //厂内责任机关
mainDepartmentId: params.mainDepartmentId, //厂内责任主体部门ID
taskRequire: params.taskRequire, //任务接点要求
putintDocmentCode: params.putintDocmentCode, //甲方投产输入文件编号
technologyDocmentCode: params.technologyDocmentCode, //甲方技术输入文件编号
outerDrawnNumber: params.outerDrawnNumber, //外部图号/模型号
modelVersion: params.modelVersion, //模型版本
taskCode: params.taskCode, //甲方任务号
status: params.status, //订单状态
simpleSearch: typeof params == "string" ? params : params.simpleSearch, //快速搜索
SkipCount: this.orderSearchForm.SkipCount,
MaxResultCount: this.orderSearchForm.MaxResultCount,
ProcessUserType: this.tabstatus,
ProductingPreparation: this.ProductingPreparationPeople,
RoutingSetStatus: this.orderSearchForm.RoutingSetStatus
};
this.orderSearchForm.simpleSearch= typeof params == "string" ? params : params.simpleSearch, //快速搜索
this.orderSearchForm.ProcessUserType= this.tabstatus,
this.orderSearchForm.ProductingPreparation= this.ProductingPreparationPeople,
this.orderSearchForm.RoutingSetStatus= this.orderSearchForm.RoutingSetStatus
url =
`${PlanUrl}/mesorder/getpagedmesordersforpdefm?` +
......
This diff is collapsed.
<template>
<Tabs :animated="false">
<orderscheduling :style="{ height: tabHeight }" ref="orderscheduling"></orderscheduling>
<!-- <Tabs :animated="false">
<TabPane label="排产派工" name="1">
<orderscheduling :style="{ height: tabHeight }" ref="orderscheduling"></orderscheduling>
</TabPane>
<TabPane label="料单确认" name="2">
<TabPane label="料单确认" name="2">
<ordermaterial :style="{ height: tabHeight }" ref="ordermaterial"></ordermaterial>
</TabPane>
</Tabs>
</TabPane>
</Tabs> -->
</template>
<script>
import ordermaterial from './ordermaterial.vue'
// import ordermaterial from './ordermaterial.vue'
import orderscheduling from './orderscheduling.vue'
export default {
components: { ordermaterial, orderscheduling },
components: { orderscheduling },
data() {
return {
tabHeight:""
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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