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