Commit 9fd98ed7 authored by 周远喜's avatar 周远喜

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

parents 56c4e473 891b434b
......@@ -1489,6 +1489,7 @@ export default {
description:'描述',
levelNum:'编码分类层数',
codeLength:'编码分类位数',
materialCodeLength:'物料编码位数'
},
//转续列表
order_execute_handon:{
......
......@@ -55,6 +55,8 @@
></state>
<Dictionary
v-else
@on-change="setRow(row,index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
:value="row.dataType"
......@@ -100,7 +102,8 @@ export default {
arr: [],
entity: {
upId: 0,
code: 0
code: 0,
status:0,
},
disabled: false,
columns: [
......
import Api from '@/plugins/request'
export default {
index:`${systemUrl}/category/paged`,
paged(params){
return Api.post(`${systemUrl}/category/paged`,params);
},
listTable(params){
return Api.post(`${systemUrl}/custompropertydefinition/list`,params);
},
......
......@@ -51,6 +51,8 @@
></state>
<Dictionary
v-else
@on-change="setRow(row,index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
:value="row.dataType"
......
......@@ -4,7 +4,7 @@
<Sider width="300" v-if="showMenu">
<div class="p-list">
<h3>
零部件库
<Dictionary code="material.code.type" v-model="type" style="width:130px;float:left;"></Dictionary>
<div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small">
<Button icon="md-add" title="新增顶级" @click="addNew"></Button>
......@@ -53,7 +53,7 @@
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<MasterData ref="dataTable" @on-edit="editRow" />
<MasterData ref="dataTable" @on-edit="editRow" :root="root" @on-ok="ok" />
</Content>
</Layout>
<Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false">
......@@ -79,6 +79,10 @@ export default {
name: "classification",
data() {
return {
root: {
id: 0,
ids: []
},
keys: "",
expand: false,
list: [],
......@@ -106,13 +110,13 @@ export default {
this.loadTree();
this.modal = false;
this.curId = 0;
if (row) {
this.dataList.map((e, index) => {
if (e.id == row.id) {
this.$set(this.$refs.dataTable.dataColumns, index, row);
}
});
}
// if (row) {
// this.dataList.map((e, index) => {
// if (e.id == row.id) {
// this.$set(this.$refs.dataTable.dataColumns, index, row);
// }
// });
// }
},
addNew() {
this.curId = 0;
......@@ -186,34 +190,39 @@ export default {
}
}
},
data.title
data.title +
"(" +
(data.totalMaterialCount == undefined
? "0"
: data.totalMaterialCount) +
")"
);
},
handleSelect(data) {
let tableData = [];
let obj = {};
let children = 0;
if (data.upId == 0 && data.children.length > 0) {
data.children.forEach(e => {
if (e.children.length > 0) {
children = 1;
} else {
children = 0;
}
obj = {
id: e.id,
name: e.name,
code: e.code,
status: e.status,
children: children,
upId: e.upId,
description: e.description
};
tableData.push(obj);
});
this.dataList = tableData;
this.$refs.dataTable.dataColumns = tableData;
}
// let tableData = [];
// let obj = {};
// let children = 0;
// if (data.upId == 0 && data.children.length > 0) {
// data.children.forEach(e => {
// if (e.children.length > 0) {
// children = 1;
// } else {
// children = 0;
// }
// obj = {
// id: e.id,
// name: e.name,
// code: e.code,
// status: e.status,
// children: children,
// upId: e.upId,
// description: e.description
// };
// tableData.push(obj);
// });
// this.dataList = tableData;
// this.$refs.dataTable.dataColumns = tableData;
// }
},
loadTree() {
let conditions = [];
......@@ -238,19 +247,20 @@ export default {
// console.log(v);
// console.log(b);
let ids = [];
ids.push(b.value);
ids.push(b.id);
if (b.children) {
addId(b.children);
function addId(data) {
data.map(u => {
ids.push(u.value);
ids.push(u.id);
if (u.children) {
addId(u.children);
}
});
}
}
// this.$emit("on-select", b.value, b, ids);
this.root.ids = ids;
this.root.id = b.id;
},
hide() {
this.showMenu = false;
......
<template>
<div class="master-data">
<Table border :columns="columns" :data="dataColumns" :height="tableHeight"></Table>
<!-- <Table border :columns="columns" :data="dataColumns" :height="tableHeight"></Table> -->
<DataGrid :columns="columns" ref="grid" :action="action" :high="false" :height="750">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入编码/名称"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<!-- <template slot="searchForm">
<Search />
</template>-->
<!-- <template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>-->
</DataGrid>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "masterData",
props: ["root"],
data() {
return {
action: Api.index,
tableHeight: "",
dataColumns: [],
easySearch: {
keys: { op: "code,name", value: null },
id: { op: "In", value: this.root.ids }
},
columns: [
// {
// key: "index",
......@@ -32,21 +62,18 @@ export default {
key: "status",
title: "状态",
align: "left",
render: (h, params) => {
return h("state", {
props: {
code: "materail.category.status",
type: "text",
value: params.row.status + ""
}
});
}
},
{
key: "banben",
title: "版本",
align: "left"
code: "materail.category.status"
// render: (h, params) => {
// return h("state", {
// props: {
// code: "materail.category.status",
// type: "text",
// value: params.row.status + ""
// }
// });
// }
},
{
key: "description",
title: "描述",
......@@ -74,7 +101,7 @@ export default {
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
params.row.children == 0 ? "删除" : ""
"删除"
)
]);
}
......@@ -98,26 +125,43 @@ export default {
};
},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
},
edit(row) {
this.$emit("on-edit", row);
},
remove(id) {
this.$Modal.confirm({
title: "删除",
content: "<p>您确定要删除吗?</p>",
onOk: () => {
Api.delete(id).then(r => {
if (r.success) {
this.loadTree();
this.$Message.success("删除成功");
}
});
},
onCancel: () => {
this.$Message.success("取消删除");
Api.delete(id).then(r => {
if (r.success) {
this.$emit("on-ok");
this.$refs.grid.reload(this.easySearch);
this.$Message.success("删除成功");
}
});
}
// this.$Modal.confirm({
// title: "删除",
// content: "<p>您确定要删除吗?</p>",
// onOk: () => {
// onCancel: () => {
// this.$Message.success("取消删除");
// }
// });
// }
},
watch: {
root: {
handler(newName, oldName) {
this.easySearch.id.value = newName.ids;
if (newName.id) {
this.$refs.grid.reload(this.easySearch);
}
},
immediate: true,
deep: true
}
}
};
</script>
......
......@@ -50,7 +50,8 @@ export default {
return {
entity: {
upId: this.nodeInfo.id,
code: 0
code: 0,
status: 0
},
upName: this.nodeInfo.title,
disabled: false,
......
......@@ -36,6 +36,11 @@
<InputNumber v-model="entity.codeLength" :max="5" :min="1"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('materialCodeLength')" prop="materialCodeLength">
<InputNumber v-model="entity.materialCodeLength" :max="10" :min="1"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -64,7 +69,8 @@ export default {
status: null,
description: "",
levelNum: null,
codeLength: null
codeLength: null,
materialCodeLength:null
},
// formValidate:{
// name:'',type:'',status:'',levelNum:'',codeLength:''
......@@ -74,7 +80,8 @@ export default {
type: [{ required: true, message: "必填"}],
status: [{ required: true, message: "必填"}],
levelNum: [{ required: true, message: "必填"}],
codeLength: [{ required: true, message: "必填"}]
codeLength: [{ required: true, message: "必填"}],
materialCodeLength: [{ required: true, message: "必填"}]
}
};
},
......
......@@ -14,6 +14,7 @@
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed>
<Filed :span="12" :name="l('levelNum')">{{entity.levelNum}}</Filed>
<Filed :span="12" :name="l('codeLength')">{{entity.codeLength}}</Filed>
<Filed :span="12" :name="l('materialCodeLength')">{{entity.materialCodeLength}}</Filed>
</Row>
</div>
......
......@@ -36,6 +36,11 @@
<InputNumber v-model="entity.codeLength" disabled :max="5" :min="1"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('materialCodeLength')" prop="materialCodeLength">
<InputNumber v-model="entity.materialCodeLength" disabled :max="10" :min="1"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -56,7 +61,8 @@ export default {
type: [{ required: true, message: "必填" }],
status: [{ required: true, message: "必填" }],
levelNum: [{ required: true, message: "必填" }],
codeLength: [{ required: true, message: "必填" }]
codeLength: [{ required: true, message: "必填" }],
materialCodeLength: [{ required: true, message: "必填" }]
}
};
},
......
......@@ -54,6 +54,7 @@ keys:{op:"code,name",value:null}
{ key:"description",title:this.l("description") ,align:"center" ,high:true },
{ key:"levelNum",title:this.l("levelNum") ,align:"center" ,high:true ,hide:true , },
{ key:"codeLength",title:this.l("codeLength") ,align:"center" ,high:true,hide:true , },
{ key:"materialCodeLength",title:this.l("materialCodeLength") ,align:"center" ,high:true,hide:true , },
{
title: '操作',
key: 'action',
......
......@@ -52,6 +52,7 @@ export default {
arr: [],
entity: {
code: 0,
status: 0,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
rootCategoryId: this.nodeInfo.rootCategoryId //左侧树点击的数据的最顶层id
......
import Api from '@/plugins/request'
export default {
index:`${systemUrl}/material/paged`,
lists:`${systemUrl}/actionlog/list`,
paged(params){
return Api.post(`${systemUrl}/material/paged`,params);
},
......@@ -19,5 +20,7 @@ export default {
delete(id) {
return Api.delete(`${systemUrl}/material/delete`,{params:{id:id}});
},
categoryList(params){
return Api.post(`${systemUrl}/actionlog/list`,params);
},
}
\ No newline at end of file
......@@ -16,18 +16,20 @@
</div>
</Sider>
<Content class="right-detail">
<div class="btn">
<Button type="primary">编辑</Button>
<div class="btn" v-show="showFrom">
<!-- <Button type="primary">编辑</Button> -->
<div class="new-detail">
<Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
<Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" name="状态:">
<State code="materail.category.status" :value="parseInt(entity.status)" />
</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述::">{{entity.description}}</Filed>
</Row>
<Divider />
<!-- <Divider />
<div class="title-h4">engineering</div>
<Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed>
......@@ -46,37 +48,62 @@
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
</Row>
</Row>-->
</div>
</div>
<div v-show="showTable">
<DataGrid :columns="columns" ref="grid" :action="action" :tool="false" :height="750"></DataGrid>
<!-- <Table border :columns="columns" :data="data1" :height="800"></Table> -->
</div>
</Content>
</Layout>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
data1: [],
action: Api.lists,
isactive: null,
showFrom: false,
showTable: false,
rowId: "",
entity: {},
easySearch: {
keys: { op: "title", value: "" },
table: { op: "Equal", value: "material" },
tId: {
op: "Equal",
value: this.$route.query.id
}
},
listData: [
{
lable: "属性"
},
{
lable: "图像"
},
{
lable: "图像"
},
lable: "历史记录"
}
],
columns: [
{
lable: "图像"
key: "name",
title: "名称",
align: "left"
},
{
lable: "图像"
key: "creationTime",
title: "名称",
align: "left"
}
]
};
},
created() {
this.rowId = this.$route.query.id;
},
methods: {
back() {
this.$router.push({
......@@ -85,6 +112,39 @@ export default {
},
everyItem(li, i) {
this.isactive = i;
if (li.lable == "属性") {
this.showFrom = true;
this.showTable = false;
Api.get({ id: this.rowId }).then(r => {
if (r.result) {
this.entity = r.result;
}
});
} else {
this.showFrom = false;
this.showTable = true;
this.$refs.grid.reload(this.easySearch);
// this.easySearch = {
// conditions: [
// {
// fieldName: "table",
// fieldValue: "material",
// conditionalType: "Equal"
// },
// {
// fieldName: "tId",
// fieldValue: this.rowId,
// conditionalType: "Equal"
// }
// ]
// };
// Api.categoryList(this.easySearch).then(r => {
// if (r.result) {
// this.data1 = r.result;
// }
// });
}
},
l(key) {
key = "routing_qc_card" + "." + key;
......
......@@ -46,12 +46,12 @@
<script>
import Api from "./api";
export default {
props: ["nodeInfo"],
props: ["nodeInfo",'eid'],
data() {
return {
arr: [],
entity: {
id: this.nodeInfo.id,
id: this.eid,
code: 0,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
......@@ -71,7 +71,7 @@ export default {
},
methods: {
get() {
Api.get({ id: this.nodeInfo.id }).then(r => {
Api.get({ id: this.eid }).then(r => {
if (r.result) {
this.entity = r.result;
}
......@@ -79,15 +79,16 @@ export default {
},
remove(index, row) {
if (row.add == 0) {
//新增的删除,直接删
this.checkList.splice(index, 1);
} else {
row.action = 2; //返回的默认删除,删除后保存在arr数组中,添加标识action = 2,然后点击保存的时候,一起传给后台
this.$set(this.checkList, index, row);
this.arr.push(row);
this.checkList.splice(index, 1);
}
// if (row.add == 0) {
// //新增的删除,直接删
// this.checkList.splice(index, 1);
// } else {
// row.action = 2; //返回的默认删除,删除后保存在arr数组中,添加标识action = 2,然后点击保存的时候,一起传给后台
// this.$set(this.checkList, index, row);
// this.arr.push(row);
// this.checkList.splice(index, 1);
// }
},
setRow(row, index) {
this.$set(this.checkList, index, row);
......
......@@ -4,9 +4,9 @@
<Sider width="300" v-if="showMenu">
<div class="p-list">
<h3>
零部件库
<Dictionary code="material.code.type" v-model="type" style="width:130px;float:left;"></Dictionary>
<div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small">
<ButtonGroup class="fr ddi" size="small">
<!-- <Button icon="md-add" title="新增顶级" @click="addNew"></Button> -->
<Button
:icon="expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
......@@ -34,7 +34,7 @@
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<MasterData ref="dataTable" :nodeInfo="nodeInfo" />
<MasterData ref="dataTable" :nodeInfo="nodeInfo" @on-ok="ok" />
</Content>
</Layout>
</div>
......@@ -50,12 +50,14 @@ export default {
name: "masterData",
data() {
return {
type: "",
keys: "",
expand: false,
list: [],
nodeInfo: {
categoryId: 0,
rootCategoryId: 0
rootCategoryId: 0,
ids: []
},
modal: false,
title: "新增",
......@@ -78,15 +80,15 @@ export default {
},
ok(row) {
this.loadTree();
this.modal = false;
this.curId = 0;
if (row) {
this.dataList.map((e, index) => {
if (e.id == row.id) {
this.$set(this.$refs.dataTable.dataColumns, index, row);
}
});
}
// this.modal = false;
// this.curId = 0;
// if (row) {
// this.dataList.map((e, index) => {
// if (e.id == row.id) {
// this.$set(this.$refs.dataTable.dataColumns, index, row);
// }
// });
// }
},
cancel() {
this.curId = 0;
......@@ -102,12 +104,15 @@ export default {
}
}
},
data.title
data.title +
"(" +
(data.totalMaterialCount == undefined
? "0"
: data.totalMaterialCount) +
")"
);
},
handleSelect(root, data) {
// console.log(root);
let pid = null; //定义最顶级id
let upId = data.upId;
let roots = root;
......@@ -124,7 +129,6 @@ export default {
});
}
addId(roots, upId);
this.nodeInfo.categoryId = data.id;
if (pid == null) {
this.nodeInfo.rootCategoryId = data.id;
......@@ -151,7 +155,22 @@ export default {
toggle() {
this.expand = !this.expand;
},
change(v, b) {},
change(v, b) {
let ids = [];
ids.push(b.value);
if (b.children) {
addId(b.children);
function addId(data) {
data.map(u => {
ids.push(u.value);
if (u.children) {
addId(u.children);
}
});
}
}
this.nodeInfo.ids = ids;
},
hide() {
this.showMenu = false;
}
......@@ -190,7 +209,7 @@ export default {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 87vh;
height: 88vh;
h4 {
height: 30px;
......@@ -209,6 +228,9 @@ export default {
background: rgba(245, 246, 250, 1);
opacity: 1;
padding-left: 10px;
.ddi {
margin-top: 3px;
}
}
.search {
height: 50px;
......@@ -256,7 +278,7 @@ export default {
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto;
padding: 10px;
height: 87vh;
height: 88vh;
overflow-y: hidden;
}
}
......
<template>
<div class="master-data">
<DataGrid :columns="columns" ref="grid" :action="action" :initsearch="sets" :high="false">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:initsearch="sets"
:high="false"
:height="750"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -47,6 +54,7 @@ export default {
data() {
return {
action: Api.index,
modal: false,
title: "新增",
curId: 0,
......@@ -56,15 +64,11 @@ export default {
v.rootCategoryId = this.nodeInfo.rootCategoryId;
},
easySearch: {
keys: { op: "Code,Name", value: null }
// categoryId: {
// op: "In",
// value: this.nodeInfo.categoryId
// },
// rootCategoryId: {
// op: "In",
// value: this.nodeInfo.rootCategoryId
// }
keys: { op: "code,name", value: null },
categoryId: {
op: "In",
value: this.nodeInfo.ids
}
},
columns: [
// {
......@@ -74,7 +78,7 @@ export default {
// width: 60
// },
{
key: "Code",
key: "code",
title: "编码",
align: "left",
render: (h, params) => {
......@@ -83,20 +87,20 @@ export default {
{
props: {},
on: {
click: () => this.details(params.row)
click: () => this.details(params.row.id)
}
},
params.row.Code
params.row.code
);
}
},
{
key: "Name",
key: "name",
title: "名称",
align: "left"
},
{
key: "Status",
key: "status",
title: "状态",
align: "left",
render: (h, params) => {
......@@ -104,18 +108,18 @@ export default {
props: {
code: "materail.category.status",
type: "text",
value: params.row.Status + ""
value: params.row.status + ""
}
});
}
},
{
key: "Version",
key: "version",
title: "版本",
align: "left"
},
{
key: "Description",
key: "description",
title: "描述",
align: "left"
},
......@@ -140,7 +144,7 @@ export default {
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
params.row.children == 0 ? "删除" : ""
"删除"
)
]);
}
......@@ -151,7 +155,10 @@ export default {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {},
created() {
// this.$refs.grid.reload(this.easySearch);
},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
......@@ -163,31 +170,45 @@ export default {
this.modal = true;
},
edit(row) {
this.nodeInfo.id = row.Id;
console.log(row);
this.curId = row.id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
this.$Modal.confirm({
title: "删除",
content: "<p>您确定要删除吗?</p>",
onOk: () => {
Api.delete(id).then(r => {
if (r.success) {
this.loadTree();
this.$Message.success("删除成功");
}
});
},
onCancel: () => {
this.$Message.success("取消删除");
alert(id);
Api.delete(id).then(r => {
if (r.success) {
this.$emit("on-ok");
this.$refs.grid.reload(this.easySearch);
this.$Message.success("删除成功");
}
});
// this.$Modal.confirm({
// title: "删除",
// content: "<p>您确定要删除吗?</p>",
// onOk: () => {
// alert(1);
// Api.delete({ id: this.eid }).then(r => {
// if (r.success) {
// this.$emit("on-ok");
// this.$Message.success("删除成功");
// }
// });
// },
// onCancel: () => {
// this.$Message.success("取消删除");
// }
// });
},
details() {
details(id) {
this.$router.push({
path: "/materiel/masterData/details"
path: "/materiel/masterData/details",
query: {
id: id
}
});
},
ok() {
......@@ -201,10 +222,15 @@ export default {
}
},
watch: {
"nodeInfo.categoryId"(v) {
if (v) {
this.$refs.grid.reload(this.easySearch);
}
nodeInfo: {
handler(newName, oldName) {
this.easySearch.categoryId.value = newName.ids;
if (newName.categoryId) {
this.$refs.grid.reload(this.easySearch);
}
},
immediate: true,
deep: true
}
}
};
......
......@@ -9,6 +9,10 @@ export default {
submitData(params) {
return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params);
},
// 质量判定获取不合格品送审编号
getshenliNo(params) {
return Api.post(`${PlanUrl}/orderexecutebadproduct/create`, params);
},
//工单联合信息
orderanddispatchinfos(params) {
return Api.get(`${PlanUrl}/orderexecutenew/orderanddispatchinfos`, params);
......@@ -46,8 +50,20 @@ export default {
getentryusers(params) {
return Api.get(`${PlanUrl}/orderexecutenew/entryusers`, params);
},
//工时分配--总工时待分配
//工时分配--工时列表
getentrylist(params) {
return Api.post(`${technologyUrl}workhours/list`, params);
},
//工时分配--总工时待分配workhours/
getallhours(params) {
return Api.post(`${technologyUrl}workhours/allhours`, params);
},
//工时分配--新增保存
subcreatehours(params) {
return Api.post(`${technologyUrl}workhours/createmore`, params);
},
//工时分配--删除一条
deletehours(params) {
return Api.delete(`${technologyUrl}workhours/delete?id=`+ params);
},
}
\ No newline at end of file
......@@ -86,7 +86,7 @@
<div class="list02">
<Tag
type="dot" class="tag_card02"
v-for="(item,index) in feilist" :key="index"
v-for="(item,index) in feilist" :key="item.id"
:name="item.id" :checkable="false"
closable @on-close="feiClose"
>{{item.prefix}}.{{ item.code}}</Tag>
......@@ -114,9 +114,9 @@
</Form>
</div>
</div>
<div class="futer flex fc-ev" v-if="ranglist.length>0||fanlist.length>0||feilist.length>0">
<div class="futer flex fc-ev" v-if="hegelist.length>0||ranglist.length>0||fanlist.length>0||feilist.length>0">
<Button class="button" size="large" type="primary" @click="sendOrder" v-if="feilist.length>0" >送审</Button>
<Button class="button" size="large" type="primary" @click="submit" v-else>提交</Button>
<Button class="button" size="large" type="primary" @click="submit" v-else>保存</Button>
<!-- :disabled="hegelist.length!=0&&fanlist.length!=0&&ranglist.length!=0" -->
<Button class="button" size="large" @click="toOrder">取消</Button>
</div>
......@@ -174,15 +174,16 @@ export default {
ranglist: [],
fanlist: [],
feilist: [],
titleCode: '',//送审单号
problemList: [
{ problem: "问题描述01" },
{ problem: "问题描述02" },
{ problem: "问题描述03" }
{ problem: "问题描述01",id:1 },
{ problem: "问题描述02",id:2 },
{ problem: "问题描述03",id:3 }
],
blameList: [
{ user: "责任人01" },
{ user: "责任人02" },
{ user: "责任人03" }
{ user: "责任人01",id:1 },
{ user: "责任人02",id:2 },
{ user: "责任人03",id:3 }
]
};
},
......@@ -219,7 +220,8 @@ export default {
}
if(u.productStatus==4){
this.fanlist.push(u)
}if(u.productStatus==0){
}
if(u.productStatus==0){
this.cardlist.push(u)
}
});
......@@ -331,19 +333,19 @@ export default {
okModal() {
let unmb = this.num;
if (unmb == 1) {
this.cansolhege();
this.cansolRang();
this.suModal = false;
}
if (unmb == 2) {
this.cansolfei();
this.cansolfan();
this.suModal = false;
}
if (unmb == 3) {
this.cansolRang();
this.cansolfei();
this.suModal = false;
}
if (unmb == 4) {
this.cansolfan();
if (unmb == 0) {
this.cansolhege();
this.suModal = false;
}
},
......@@ -544,6 +546,7 @@ export default {
}
}
}
// console.log(lists)
let parmes={
dispatchId: this.$route.query.id,
orderId: this.$route.query.orderId,
......@@ -551,50 +554,77 @@ export default {
};
Api.submitData(parmes).then(res=>{
if(res.success){
this.$Message.success("提交成功!");
this.$Message.success("保存成功!");
}else{
this.$Message.success("提交失败~");
this.$Message.success("保存失败~");
}
})
},
// 打开送审
sendOrder() {
let orderse = []
let orderIds = []
this.feilist.map(item=>{
orderse.push(item.prefix+'.'+item.code)
orderIds.push(item.id)
})
let strOder = orderse.join(",")// console.log(strOder)
let strOder = orderse.join(",")
this.entity.cause = this.orderForm.question;
this.entity.reporter = this.orderForm.useroption;
this.entity.strOder = strOder; // console.log(this.entity)
this.entity.strOder = strOder;
this.entity.orderIds = orderIds;
this.$refs["formValidate"].validate(valid => {
if (valid) {
this.submit()//提交状态改变
let parmeseData = this.entity// console.log(parmeseData) this.$Message.success("送审")
let parme = {
reason: this.entity.cause,
personLiableId: this.entity.reporter,
dispatchId: this.$route.query.id,
orderId: this.$route.query.orderId,
productIds: this.entity.orderIds,
}
Api.getshenliNo(parme).then(res=>{
if(res.success){
// this.$refs.orderSendReview.info.orderInfo.code = res.result.code
this.entity.code = res.result.code
this.entity.idlist = res.result.id
}else{
console.log("获取编号失败")
}
})
let parmeseData = this.entity// this.$Message.success("送审")
console.info(parmeseData)
this.ModalOrder = true;
this.$refs.orderSendReview.alertFun(parmeseData);
}
});
},
// 确定送审
orderSendOk() {
ahis.$Message.success("送审中...");
// let operatorIdList = this.$refs.orderSendReview.returnDataList();
// let itemCode = this.formdata.unqualified_order_code;
// this.dataListRetrunNew.code = itemCode;
// this.dataListRetrunNew.operatorIdList = operatorIdList;
// this.$http.order
// .batchOrderStart(this.dataListRetrunNew)
// .then(response => {
// if (response.success) {
// this.loadchangelist();
// this.$Message.info("送审成功!");
// this.dataListRetrunNew.idList = [];
// } else {
// this.$Message.error("送审失败!");
// }
// this.modalInfo = false;
// });
// console.log("old->",this.entity)
let orderids = []
orderids.push(this.entity.idlist)
console.log("new->",this.entity)
let parmese ={
schemaId: "c2e09c9b-02a9-4188-97a6-cdb68d50a64a",
idList: orderids,
code: this.entity.code,
operatorIdList: this.$refs.orderSendReview.returnDataList(),
}
this.$http.order
.batchOrderStart(parmese)
.then(response => {
if (response.success) {
this.loadchangelist();
this.$Message.info("送审成功!");
this.dataListRetrunNew.idList = [];
} else {
this.$Message.error("送审失败!");
}
this.modalInfo = false;
});
},
// 取消 返回工单列表
toOrder() {
......
......@@ -3,15 +3,18 @@
<Row>
<Filed :span="12" :name="l('productName')">{{info.orderInfo.productName}}</Filed>
<Filed :span="12" :name="l('drawnNumber')">{{info.orderInfo.drawnNumber}}</Filed>
<Filed :span="12" :name="l('status')">{{info.orderInfo.status}}</Filed>
<Filed :span="12" :name="l('status')">
<state code="plan.order.status" ref="state" :value="info.orderInfo.status" type="text" ></state>
</Filed>
<Filed :span="12" :name="l('mesCode')">{{info.orderInfo.mesCode}}</Filed>
<Filed :span="12" name="批次号">{{info.orderInfo.batchNumber}}</Filed>
<!-- <Filed :span="8" :name="l('batchNumber')">{{info.orderInfo.batchNumber}}</Filed> -->
<!-- <Filed :span="12" name="派工数量">{{info.orderInfo.dispatchQuantity}}</Filed> -->
<Filed :span="12" :name="l('quantity')">{{info.orderInfo.quantity}}</Filed>
<Filed :span="12" name="节点日期">{{info.orderInfo.demandFinishDate}}</Filed>
<Filed :span="12" name="工序名称">{{info.orderInfo.seqName}}</Filed>
<Filed :span="12" name="问题原因">{{info.orderInfo.cause}}</Filed>
<Filed :span="12" name="责任归属">{{info.orderInfo.reporter}}</Filed>
<Filed :span="12" name="不合格产品号">{{info.orderInfo.demandFinishDate}}</Filed>
<!-- <Filed :span="12" name="送审编号">{{info.orderInfo.code}}</Filed> -->
<Filed :span="24" name="不合格产品">{{info.orderInfo.strOder}}</Filed>
<!-- <Filed :span="8" :name="l('stage')">
<state code="plan.order.stage" :value="info.orderInfo.stage+''" type="text"></state>
......@@ -46,6 +49,12 @@ export default {
key = 'order_list' + '.' + key
return this.$t(key)
}
},
watch:{
info(n,o){
console.log(n)
console.log(o)
}
}
}
</script>
\ No newline at end of file
......@@ -15,6 +15,7 @@
</template>
<script>
// import Api from "../api";
import OrderInfos from './orderInfos'
import Process from '@/components/orderOperator/process'
export default {
......@@ -80,7 +81,7 @@ export default {
}
},
created() {
var theight = window.innerHeight - 630 + 'px'
var theight = window.innerHeight - 650 + 'px'
this.divHeight = theight
},
mounted() {
......@@ -88,7 +89,7 @@ export default {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.divHeight = window.screenHeight - 630 + 'px'
this.divHeight = window.screenHeight - 650 + 'px'
})()
}
},
......@@ -96,7 +97,23 @@ export default {
alertFun(parmeseData){
console.warn(parmeseData)
this.info.orderInfo = parmeseData
alert("加载数据")
// let parme = {
// reason: parmeseData.cause,
// personLiableId: parmeseData.reporter,
// dispatchId: this.$route.query.id,
// orderId: this.$route.query.orderId,
// productIds: parmeseData.orderIds,
// }
// Api.getshenliNo(parme).then(res=>{
// if(res.success){
// this.info.orderInfo.push(code = res.resoult.code)
// parmeseData.code = res.resoult.code
// this.$refs.orderSendReview.info.orderInfo.code = res.resoult.code
// this.entity.code = res.resoult.code
// }else{
// console.log("获取编号失败")
// }
// })
},
intData(data) {
console.warn(data)
......
......@@ -66,7 +66,7 @@
<Col span="24">
<FormItem label="分配工时" prop="setTime">
<!-- <InputNumber :max="30" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp; -->
<InputNumber :max="maxHour" :min="1" v-model="entity.workHour" @on-change="testChange"></InputNumber>工时 &nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="maxHour" :min="1" v-model="entity.workHour" @on-change="testChange"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp;工时
<!-- <InputNumber :max="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp; -->
</FormItem>
</Col>
......@@ -104,27 +104,27 @@ export default {
userName: "张珊珊1",
cardNo: "08965481",
id: 1
},
{
},{
checked: false,
userName: "张珊珊2",
cardNo: "08965482",
id: 2
},
{
checked: false,
userName: "张珊珊3",
cardNo: "08965483",
id: 3
}
]
};
},
created(){},
methods: {
handleSubmit() {
this.listMan.map(item=>{
if(item.checked){
this.entity.cardNo = item.cardNo
}
})
console.log(this.entity);
this.$emit("on-ok", this.entity);
this.showSelect = true
// this.entity={}
},
//单选框
radioChange(val) {
......@@ -132,6 +132,12 @@ export default {
},
handleClose() {
this.$emit("on-close");
this.entity={
cardNo: "",
oldUserse: null,
userse: null,
workHour: 1,
}
},
checkItem(i) {
if(this.userflag){
......@@ -153,10 +159,12 @@ export default {
});
oolist.map(u => {
if (u.checked) {
this.entity.oldUserse = u.userName;
this.entity.userName = u.userName;
this.entity.userId = u.id
this.showSelect = false
}else{
this.entity.oldUserse = '';
this.entity.userName = '';
this.entity.userId = ''
}
});
if(oolist.length==0){
......@@ -165,15 +173,24 @@ export default {
},
// 选择新增人员
changeUser(data){
console.log(data)
// console.log(data)
let alloterInfo = this.$refs.userSelected.getSelectItems();
if(data&&data!=undefined){
this.userflag = true
}
if(data==undefined){
this.userflag = false
}
let alloterInfo = this.$refs.userSelected.getSelectItems();
console.log(alloterInfo)
// if (!userInfo || userInfo.length == 0) {
// this.$Message.error("请选择人员!");
// return;
// }
// console.log(alloterInfo)
if(alloterInfo.length>0){
this.entity.cardNo = alloterInfo[0].cardNo
this.entity.userName = alloterInfo[0].userName
this.entity.userId = alloterInfo[0].id
}
},
testChange() {
// 该方法在input内容改变是就会触发进行检测
......
This diff is collapsed.
......@@ -6,23 +6,26 @@
ref="grid"
:batch="false"
:type="typeInfo"
:high="false"
:span="6"
:lazy="true"
:conditions="easySearch"
:action="action"
:gutter="40"
:high="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" v-width="260" />
<Input placeholder="请输入订单编号/产品名称/图号" v-model="easySearch.keys.value" v-width="260" clearable/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
</template>
......@@ -32,8 +35,12 @@
@click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status)"
>
<Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col>
<Col :span="10" class="order-code">
<Ellipsis :text="row.productName" :lines="1" tooltip transfer />
</Col>
<Col :span="10" class="order-code">
<Ellipsis :text="row.mesCode" :lines="1" tooltip transfer />
</Col>
<Col :span="4">
<div class="sanjiao" :style="tdStyle(row.status)"></div>
<div class="box">
......@@ -107,14 +114,18 @@
</template>
<script>
import Api from "./api";
import Search from "./search";
export default {
name: "starOrder",
components: {
Search,
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "mesCode,productName",
op: "mesCode,productName,drawnNumber",
value: null
}
},
......@@ -366,7 +377,7 @@ export default {
width: 0;
border-left: solid 50px transparent;
float: right;
margin-right:-1px;
margin-right: -1px;
}
.box {
color: white;
......
<template>
<Form ref="form" :model="condition" :label-width="100">
<Row>
<Col :span="12" v-if="condition.id.show">
<FormItem :label="l('id')" prop="id">
<Input v-model="condition.id.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.mesCode.show">
<FormItem :label="l('mesCode')" prop="mesCode">
<Input v-model="condition.mesCode.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.productName.show">
<FormItem :label="l('productName')" prop="productName">
<Input v-model="condition.productName.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.drawnNumber.show">
<FormItem :label="l('drawnNumber')" prop="drawnNumber">
<Input v-model="condition.drawnNumber.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.quantity.show">
<FormItem :label="l('quantity')" prop="quantity">
<Input v-model="condition.quantity.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="taskList.status" v-model="condition.status.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.beginTime.show">
<FormItem :label="l('beginTime')" prop="beginTime">
<DatePicker type="daterange" v-model="condition.beginTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" v-if="condition.endTime.show">
<FormItem :label="l('endTime')" prop="endTime">
<DatePicker type="endTime" v-model="condition.endTime.value"></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Search",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: false },
executeId: { op: "Equal", value: null, show: false },
drawnNumber: { op: "Equal", value: null, show: true },
mesCode: { op: "Equal", value: null, show: true },
orderId: { op: "Equal", value: null, show: false },
productId: { op: "Equal", value: null, show: false },
productName: { op: "Equal", value: null, show: true },
quantity: { op: "Equal", value: null, show: false },
routingHeaderId: { op: "Equal", value: null, show: false },
routingDetailId: { op: "Equal", value: null, show: false },
status: { op: "Equal", value: null, show: true },
beginTime: { op: "Range", value: null, show: false },
endTime: { op: "Range", value: null, show: false },
}
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
let vkey = "order_list" + "." + key;
return this.$t(vkey) || key;
}
}
};
</script>
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