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

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

parents 5091a54b f4d865c4
...@@ -3,35 +3,27 @@ ...@@ -3,35 +3,27 @@
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('tASKSEQ')" prop="tASKSEQ"> <FormItem :label="l('tASKSEQ')" prop="tASKSEQ">
<span>{{entity.task_seq}}</span> <b>{{entity.task_seq}}</b>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('tASKNAME')" prop="tASKNAME"> <FormItem :label="l('tASKNAME')" prop="tASKNAME">
<span>{{entity.task_name}}</span> <b>{{entity.task_name}}</b>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="班组" prop="sHOPID"> <FormItem label="班组" prop="sHOPID">
<!-- v-model="orderSearchForm.orderCat" --> <DepartmentSelect v-model="entity.department_id" @on-change="deprtChange" />
<Select v-model="entity.department_id">
<Option
v-for="(item,index) in list"
:key="index"
:value="item.value"
style="display:none"
:label="item.label"
></Option>
<Tree key="mytree" :data="orderCatList" ref="mytree" :render="renderContent"></Tree>
<!-- <Option v-for="(item,index) in orderCatList" :value="item.title" :key="index">{{ item.title }}</Option> -->
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="首选设备" prop="eQUIPID"> <FormItem label="首选设备" prop="eQUIPID">
<Select placeholder="编号 / 名称"> <Select placeholder="编号 / 名称">
<Option value="" class="option-text">编号 / 名称</Option> <Option
<Option v-for="(item,index) in equiptypeList" :value="item.id" :key="index">{{ item.equipTypeName }}</Option> v-for="(item,index) in equiptypeList"
:value="item.id"
:key="index"
>{{ item.equipTypeName }}</Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
...@@ -42,17 +34,17 @@ ...@@ -42,17 +34,17 @@
<Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option> <Option v-for="item in orderCatList" :value="item" :key="item">{{ item }}</Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> --> </Col>-->
<Col :span="12"> <Col :span="12">
<FormItem :label="l('rUNTIME')" prop="rUNTIME"> <FormItem :label="l('rUNTIME')" prop="rUNTIME">
<!-- v-model="value1" --> <!-- v-model="value1" -->
<InputNumber :max="100" :min="1"></InputNumber> <InputNumber :max="100" :min="1"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem> <FormItem>
<!-- v-model="single" --> <!-- v-model="single" -->
<Checkbox> 是否同步到原始工艺</Checkbox> <Checkbox>是否同步到原始工艺</Checkbox>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -63,27 +55,27 @@ ...@@ -63,27 +55,27 @@
</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: {
department_id: null, //班组 department_id: null //班组
}, },
list:[], list: [],
selectdata: [], selectdata: [],
orderCatList:[],//班组 orderCatList: [], //班组
equiptypeList:[],//设备 equiptypeList: [], //设备
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }] name: [{ required: true, message: "必填", trigger: "blur" }]
} }
} };
}, },
props: { props: {
eid: Number, eid: Number,
parmse: String, parmse: Object
}, },
created() { created() {
// this.getUserDepart() // this.getUserDepart()
...@@ -97,82 +89,52 @@ export default { ...@@ -97,82 +89,52 @@ export default {
// }) // })
// }, // },
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true this.disabled = true;
// 未选是否同步到原始工艺
Api.subupdate(this.entity) Api.subupdate(this.entity)
.then((r) => { .then(r => {
this.disabled = false this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$emit('on-ok') this.$emit("on-ok");
} 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);
}) });
} }
}) });
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
"span",
{
style: {
// color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
);
}, },
handleSelect(data) { deprtChange(v,item){
if (data.length > 0) { console.log(v,item)
this.selectdata = [];
this.selectdata = data;
this.list = [];
this.list.push({ label: data[0].title, value: data[0].id });
// if (data[0].isProduct == "1") {
// this.orderSearchForm.productName = data[0].title;
// this.orderSearchForm.productId = data[0].productId;
// this.orderSearchForm.drawnNumber = data[0].drawingNo;
// } else {
// this.$Message.error("此节点不是产品,请选择产品节点!");
// }
}
}, },
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: {
eid(v) { eid(v) {
if (v != 0) { if (v != 0) {
this.load(v) this.load(v);
} }
}, },
parmse(u){ parmse(u) {
console.log(u) console.log("row数据:", u);
if(u){ if (u) {
this.entity = u this.entity = u;
} }
} }
} }
} };
</script> </script>
...@@ -65,16 +65,31 @@ export default { ...@@ -65,16 +65,31 @@ export default {
high: true, high: true,
width: 60, width: 60,
render: (h, params) => { render: (h, params) => {
return h("Icon", { return h(
attrs: { "Tooltip",
type: {
params.row.insert_flag == 1 ? "ios-flag" : "ios-flag-outline", props: {
size: 20, content: params.row.insert_flag == 1 ? "取消插单" : "进行插单",
color: params.row.insert_flag == 1 ? "#2680EB" : "#aaa" placement: "top",
},
class:'ico',
}, },
class: "click-h", [
on: { click: () => this.changeFlag(params.row.id, params.index) } h("Icon", {
}); attrs: {
type:
params.row.insert_flag == 1
? "ios-flag"
: "ios-flag-outline",
size: 20,
color: params.row.insert_flag == 1 ? "#2680EB" : "#aaa",
},
on: {
click: () => this.changeFlag(params.row.id, params.index)
}
})
]
);
} }
}, },
{ {
...@@ -237,6 +252,13 @@ export default { ...@@ -237,6 +252,13 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{
key:"first_equip",
title:this.l("first_equip"),
align:"left",
easy:true,
high:true,
},
{ {
key: "notes", key: "notes",
title: this.l("notes"), title: this.l("notes"),
...@@ -398,20 +420,20 @@ export default { ...@@ -398,20 +420,20 @@ export default {
this.editModal = true; this.editModal = true;
this.formData = dataForm this.formData = dataForm
// this.curId = Number(id); // this.curId = Number(id);
this.getUserDepart() // this.getUserDepart()
this.getEquiptypeList() this.getEquiptypeList()
}, },
// 获取班组 // 获取班组
getUserDepart(){ // getUserDepart(){
Api.getUserDepart().then(res=>{ // Api.getUserDepart().then(res=>{
// console.log(res.result) // // console.log(res.result)
this.$refs.editPart.orderCatList = res.result // this.$refs.editPart.orderCatList = res.result
}) // })
}, // },
// 获取设备 // 获取设备
getEquiptypeList(){ getEquiptypeList(){
Api.getEquiptypeList().then(res=>{ Api.getEquiptypeList().then(res=>{
// console.log("设备",res.result) console.log("设备",res.result)
this.$refs.editPart.equiptypeList = res.result this.$refs.editPart.equiptypeList = res.result
}) })
}, },
......
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