Commit 9d4ad4dc authored by kangzhenfei's avatar kangzhenfei

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

parents 25e37352 869ad06e
...@@ -314,7 +314,15 @@ div::-webkit-scrollbar-corner { ...@@ -314,7 +314,15 @@ div::-webkit-scrollbar-corner {
.pt10 { .pt10 {
padding: 10px 0px 0; padding: 10px 0px 0;
} }
.pb5 {
padding-bottom: 5px;
}
.pb10 {
padding-bottom: 10px;
}
.pb20 {
padding-bottom: 20px;
}
.ptb5 { .ptb5 {
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
...@@ -324,6 +332,7 @@ div::-webkit-scrollbar-corner { ...@@ -324,6 +332,7 @@ div::-webkit-scrollbar-corner {
padding: 10px; padding: 10px;
} }
.p10 { .p10 {
padding: 10px; padding: 10px;
} }
...@@ -335,6 +344,12 @@ div::-webkit-scrollbar-corner { ...@@ -335,6 +344,12 @@ div::-webkit-scrollbar-corner {
.pl30 { .pl30 {
padding-left: 30px padding-left: 30px
} }
.pl40 {
padding-left: 40px
}
.pl50 {
padding-left: 50px
}
.pl5 { .pl5 {
padding-left: 5px padding-left: 5px
......
...@@ -359,8 +359,8 @@ export default { ...@@ -359,8 +359,8 @@ export default {
productId: '产品id', productId: '产品id',
productName: '产品名称', productName: '产品名称',
quantity: '计划数量', quantity: '计划数量',
productQuantity: '合格数量', productQuantity: '合格数量',
qualifiedQuantity:'合格数量', qualifiedQuantity: '合格数量',
actualFinishDate: '完成时间', actualFinishDate: '完成时间',
productingPreparationPeople: '承制单位', productingPreparationPeople: '承制单位',
uncertificateQuantity: '待开具数量', uncertificateQuantity: '待开具数量',
...@@ -1569,9 +1569,54 @@ export default { ...@@ -1569,9 +1569,54 @@ export default {
unitPrice: '单价', unitPrice: '单价',
originalManufacturer: '原厂家', originalManufacturer: '原厂家',
remark: '备注', remark: '备注',
materialCode:'物料编码', materialCode: '物料编码',
}, },
stock_item:{ stock_item: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
name: '名称',
materialType: '类型',
brand: '牌号',
specifications: '规格',
originalManufacturer: '原厂家',
batch: '批次',
unitPrice: '单价',
certificateOfApproval: '合格证',
storeId: '',
storeTitle: '库位',
creator: '',
stockId: '物料库存主键',
total: '入库数量',
remark: '备注',
code: '入库编号',
materialId: '物料id',
materialCode: '物料编码',
nowTotal: '剩余数量',
},
support_main: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
orderId: '订单id',
productName: '产品名称',
drawnNumber: '图号',
count: '订单数量',
creator: '申请人',
status: '状态',
finishDate: '齐套时间',
orderCode: '订单编号',
code: '申请单号',
},
support_item:{
creationTime:'创建时间', creationTime:'创建时间',
creatorUserId:'创建人', creatorUserId:'创建人',
lastModificationTime:'更新时间', lastModificationTime:'更新时间',
...@@ -1579,23 +1624,22 @@ export default { ...@@ -1579,23 +1624,22 @@ export default {
isDeleted:'删除人', isDeleted:'删除人',
deletionTime:'删除时间', deletionTime:'删除时间',
deleterUserId:'删除人', deleterUserId:'删除人',
name:'名称', supportMainId:'主表id',
materialType:'类型', routingHeaderId:'工艺id',
brand:'牌号', routingDeatilId:'工序id',
specifications:'规格', routingDetailName:'工序',
originalManufacturer:'原厂家', routingDetailSeq:'工序号',
batch:'批次', routingDetailNo:'工序号',
unitPrice:'单价', count:'申请数量',
certificateOfApproval:'合格证', status:'状态',
storeId:'',
storeTitle:'库位',
creator:'',
stockId:'物料库存主键',
total:'入库数量',
remark:'备注',
code:'入库编号',
materialId:'物料id', materialId:'物料id',
materialCode:'物料编码', materialName:'物料名称',
nowTotal:'剩余数量', nameMaterial:'物料名称',
materialNumber:'物料编号',
needCount:'需要数量',
totalCount:'需要数量',
outStockNumber:'出库数量',
orderId:'',
remark:'备注',
} }
} }
...@@ -161,8 +161,8 @@ export default { ...@@ -161,8 +161,8 @@ export default {
taskSeq: "", taskSeq: "",
flog: 5, //参数应用范围 flog: 5, //参数应用范围
calId:"", calId:"",
planState: false, planState: true,
planMethod: "重叠", // 平行 重叠 planMethod: "平行", // 平行 重叠
over: false, over: false,
overTime: "不加班", //"六日加班", 不加班 加班 overTime: "不加班", //"六日加班", 不加班 加班
efficiencyValue: 11, // 效率系数, 必须大于 0 efficiencyValue: 11, // 效率系数, 必须大于 0
...@@ -387,6 +387,30 @@ export default { ...@@ -387,6 +387,30 @@ export default {
}, },
count(v, n) { count(v, n) {
this.entity.discrete = 1; this.entity.discrete = 1;
},
"entity.multiple"(v){
/*
planState: false,
planMethod: "重叠", // 平行 重叠
*/
if(v){
this.entity.planState=v;
}
},
"entity.planState"(v){
/*
planState: false,
planMethod: "重叠", // 平行 重叠
*/
if(!v){
this.entity.multiple=v;
}
// this.planMethod=!v?"重叠":"平行"
} }
} }
}; };
......
<template>
<div class="h100 table-content">
<p class="mb10">
订单编号:{{mesCodes}}
<span class="ml20">产品名称:{{productNames}}</span>
<span class="ml20">生产数量:{{counts}}</span>
</p>
<div class="mb20" v-for="(item,i) in datas" :key="i">
<p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p>
<Table
border
:columns="cols"
:data="item.suport"
:ref="'table'+item.routingHeaderId"
class="tableCommon"
@on-selection-change="selectionChange(i)"
@on-select-cancel="selectListCancel"
@on-select-all-cancel="selectAllCancel"
@on-select="selectList"
@on-select-all="selectListAll"
>
<template slot-scope="{ row, index }" slot="counts">
<InputNumber
:max="row.totalCount"
:min="0"
v-model="row.count"
@on-blur="inputChange1(i,row,index)"
/>
</template>
<template slot-scope="{ row, index }" slot="remarks">
<Input type="text" v-model="row.remark" @on-blur="inputChange1(i,row,index)" />
</template>
</Table>
</div>
<FooterToolbar v-show="footerToolbar" class="ftball">
<!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form :model="orderForm" :label-width="110" ref="formValidate" :rules="ruleValidate">
<FormItem label=" " prop="QuotationFinishDate">
<DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
style="color:black"
placeholder="请选择齐套日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem>
</Form>
<Button type="primary" class="mr10 ml10" @click="application">申请配套</Button>
<Button @click="cancelBatch" v-show="false">取消</Button>
</FooterToolbar>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "addAccessory",
data() {
return {
disabled: false,
deletelModal: false,
curId: 0,
editIndex: -1,
editNum: "",
cols: [
{
type: "selection",
width: 70,
align: "center",
},
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
},
{
key: "totalCount",
title: this.l("totalCount"),
align: "left",
},
{
key: "count",
title: this.l("count"),
align: "right",
slot: "counts",
width: 120,
},
{
key: "remark",
title: this.l("remark"),
align: "left",
slot: "remarks",
},
],
orderForm: {
QuotationFinishDate: "",
},
datas: [],
selectItems: [],
footerToolbar: true,
orderId: this.eid,
mesCodes: this.mesCode,
productNames: this.productName,
drawnNumbers: this.drawnNumber,
counts: this.count,
curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: {
QuotationFinishDate: [
{
required: true,
message: "_",
trigger: "change",
},
],
},
tempList: [],
cRow: null,
cArr: [],
};
},
props: {
eid: Number,
mesCode: String,
productName: String,
drawnNumber: String,
count: Number,
},
mounted() {
this.load(this.eid);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
load(v) {
Api.matchlist({ id: v }).then((r) => {
if (r.success) {
r.result.forEach((e) => {
let i = 0;
e.suport.forEach((el) => {
el.count = el.totalCount;
el._checked = true;
el._index = i++;
});
});
this.datas = r.result;
//----测试多个工艺start----
// let temre = this.$u.clone(r.result);
// temre.forEach((ele) => {
// ele.routingHeaderId = 281;
// ele.suport.forEach((eles) => {
// eles.routingHeaderId = 281;
// eles.id = eles.id + 20;
// eles.nameMaterial = eles.nameMaterial + "tttt";
// });
// });
// this.datas = r.result.concat(temre);
//----测试多个工艺end----
}
});
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate =
value != "" ? this.getFormatDateEnd(value) : value;
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate;
},
p(s) {
return s < 10 ? "0" + s : s;
},
selectionChange(v) {
if (this.curArr == 3) {
//单条取消选择
this.cRow._checked = false;
this.$set(this.datas[v].suport, this.cRow._index, this.cRow);
} else if (this.curArr == 1) {
//单条选择
this.cRow._checked = true;
this.$set(this.datas[v].suport, this.cRow._index, this.cRow);
} else if (this.curArr == 2) {
//多条选择
this.datas[v].suport.forEach((ele, index, array) => {
ele._checked = true;
this.$set(this.datas[v].suport, index, ele);
});
} else if (this.curArr == 4) {
//多条取消
this.datas[v].suport.forEach((ele, index, array) => {
ele._checked = false;
this.$set(this.datas[v].suport, index, ele);
});
}
},
selectList(items, row) {
this.curArr = 1;
this.cRow = row;
},
selectListAll(items) {
this.curArr = 2;
},
selectListCancel(items, row) {
this.curArr = 3;
this.cRow = row;
},
selectAllCancel(items) {
this.curArr = 4;
},
delById(arr, id) {
//取消删除某行数据
arr.forEach((element) => {
if (element.id == id) {
if (arr.indexOf(element) > -1) {
var i = arr.indexOf(element);
arr.splice(i, 1);
}
}
});
return arr;
},
delSame(arr) {
//数组根据id去重复
var newArr = [];
var arrId = [];
for (var item of arr) {
if (arrId.indexOf(item["id"]) == -1) {
arrId.push(item["id"]);
newArr.push(item);
}
}
return newArr;
},
delByHeadId(arr, id) {
//根据工艺规程id进行去除过滤
let arrs = arr.filter((item, i) => {
return item.routingHeaderId != id;
});
return arrs;
},
inputChange1(i, row, index) {
//输入数量
this.$set(this.datas[i].suport, index, row);
},
application() {
//申请配套操作
this.$refs["formValidate"].validate((valid) => {
if (valid) {
let temItems = [];
let temSelectItems = this.$u.clone(this.datas);
temSelectItems.forEach((e) => {
e.suport.forEach((ele) => {
if (ele._checked && ele.count > 0) {
let temObj = {
routingHeaderId: ele.routingHeaderId,
routingDeatilId: ele.routingDetailId,
routingDetailName: ele.routingDetailName,
routingDetailSeq: ele.routingDetailNo,
materialId: ele.materialId,
materialName: ele.nameMaterial,
materialNumber: ele.materialNumber,
needCount: ele.totalCount,
count: ele.count, //
remark: ele.remark ? ele.remark : "",
};
temItems.push(temObj);
}
});
});
let parms = {
main: {
orderId: this.orderId,
productName: this.productNames,
drawnNumber: this.drawnNumbers,
count: this.counts,
creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate,
},
items: temItems,
};
if (parms.items.length == 0) {
this.$Message.error("请输入申请数量");
} else {
Api.supportmainCreate(parms).then((res) => {
if (res.success) {
this.$Message.success("申请成功");
//this.$emit("cancel");
this.$emit("on-ok");
}
});
}
}
});
},
cancelBatch() {
//取消选择
this.selectItems = [];
let temd = this.$u.clone(this.datas);
temd.forEach((res) => {
this.$refs["table" + res.routingHeaderId][0].selectAll(false);
});
this.footerToolbar = false;
},
l(key) {
let vkey = "support_item" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
...@@ -36,5 +36,26 @@ export default { ...@@ -36,5 +36,26 @@ export default {
}, },
moveintoai(){////跳转进入智能排产池前判断 moveintoai(){////跳转进入智能排产池前判断
return Api.post(`${PlanUrl}/messchedule/moveintoai`); return Api.post(`${PlanUrl}/messchedule/moveintoai`);
} },
//配套相关
matchlist(params){//申请配套列表
return Api.get(`${technologyUrl}materiallist/matchlist`, params);
},
supportmainPaged(params){////配套记录
return Api.post(`${technologyUrl}supportmain/paged`, params);
},
supportmainCreate(params){////保存配套
return Api.post(`${technologyUrl}supportmain/create`, params);
},
groupitemlist(params){//申请单列表
return Api.post(`${technologyUrl}supportmain/groupitemlist`, params);
},
batchdelete(params){//批量撤回
return Api.post(`${technologyUrl}supportitem/batchdelete`, params);
},
matchdetaillist(params){//配套审核单列表
return Api.get(`${technologyUrl}materiallist/matchdetaillist`, params);
},
} }
\ No newline at end of file
<template>
<div class="h100 table-content">
<p class="mb10">
订单编号:{{mesCodes}}
<span class="ml20">产品名称:{{productNames}}</span>
<span class="ml20">生产数量:{{counts}}</span>
</p>
<Layout>
<Content>
<div class="mb20" v-for="(item,index) in datas" :key="index">
<p class="fwBold" :id="'item'+index">
齐套日期:{{item.finishDate}}
<span class="ml20">申请人:{{item.creator}}</span>
<span class="ml20">申请时间:{{item.applyTime}}</span>
</p>
<Table border :columns="cols" :data="item.children" class="tableCommon"></Table>
<Button type="primary" class="mt10" @click="application(1,item.children)" size="large">撤回</Button>
</div>
</Content>
<Sider hide-trigger style="background:#fff;color:black;" width="300">
<Collapse value="1" class="mt20 ml20" style="position:fixed;width:260px">
<Panel name="1">
申请记录
<div slot="content" class="pl20 pb10 lh25">
<p v-for="(items,i) in datas" :key="i">
<a :href="'#item'+i">
<span>{{items.applyTime}}</span>
<span class="fr mr10">{{items.creator}}</span>
</a>
</p>
</div>
</Panel>
</Collapse>
</Sider>
</Layout>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "detailAccessory",
data() {
return {
disabled: false,
deletelModal: false,
curId: 0,
editIndex: -1,
editNum: "",
cols: [
{
key: "materialName",
title: this.l("materialName"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
},
{
key: "needCount",
title: this.l("needCount"),
align: "right",
},
{
key: "count",
title: this.l("count"),
align: "right",
width: 120,
},
{
key: "status",
title: this.l("status"),
align: "center",
width: 120,
},
{
key: "remark",
title: this.l("remark"),
align: "left",
},
{
key: "action",
title: "操作",
width: 120,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: {
oprate: "detail",
},
on: {
click: () => this.application(0, params.row),
},
},
"撤回"
),
]);
},
},
],
datas: [],
selectItems: [],
footerToolbar: false,
orderId: this.eid,
mesCodes: this.mesCode,
productNames: this.productName,
drawnNumbers: this.drawnNumber,
counts: this.count,
};
},
props: {
eid: Number,
mesCode: String,
productName: String,
drawnNumber: String,
count: Number,
},
mounted() {
this.load(this.eid);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
load(v) {
Api.groupitemlist({ id: v }).then((r) => {
if (r.success) {
this.datas = r.result;
}
});
},
application(type, arr) {//撤回配套申请 type:0 单条 1 全部
let parms = [];
if (type == 0) {
parms.push(arr.id);
} else {
arr.forEach((ele) => {
parms.push(ele.id);
});
}
Api.batchdelete(parms).then(res=>{
if(res.success&&res.result)
{
this.$Message.success("撤销成功");
this.load(this.eid);
this.$emit('on-ok')
}
})
},
l(key) {
let vkey = "support_item" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
This diff is collapsed.
...@@ -98,16 +98,16 @@ ...@@ -98,16 +98,16 @@
--> -->
<RadioGroup v-model="scheduleType" class="radioList" @on-change="onchangeScheduleType"> <RadioGroup v-model="scheduleType" class="radioList" @on-change="onchangeScheduleType">
<Radio :label="1" border :disabled="this.$store.state.countAi>0"> <Radio :label="1" border :disabled="this.$store.state.countAi>0">
<span >Aps排产</span> <span>Aps排产</span>
</Radio> </Radio>
<Radio :label="4" border :disabled="this.$store.state.countAps>0"> <Radio :label="4" border :disabled="this.$store.state.countAps>0">
<span >智能排产</span> <span>智能排产</span>
</Radio> </Radio>
<Radio :label="2" border> <Radio :label="2" border>
<span >整机排产</span> <span>整机排产</span>
</Radio> </Radio>
<Radio :label="3" border> <Radio :label="3" border>
<span >流水排产</span> <span>流水排产</span>
</Radio> </Radio>
</RadioGroup> </RadioGroup>
<p class="pl30 pt10" v-show="scheduleType!=null"> <p class="pl30 pt10" v-show="scheduleType!=null">
...@@ -125,6 +125,18 @@ ...@@ -125,6 +125,18 @@
<Modal v-model="orderSupportModal" title="配套下发" footer-hide width="1300"> <Modal v-model="orderSupportModal" title="配套下发" footer-hide width="1300">
<orderSupport ref="orderSupport"></orderSupport> <orderSupport ref="orderSupport"></orderSupport>
</Modal> </Modal>
<Modal v-model="modalAccessory" :title="title" fullscreen footer-hide>
<component
:is="details"
:eid="orderId"
:mesCode="mesCode"
:productName="productName"
:drawnNumber="drawnNumber"
:count="count"
@on-close="cancel"
@on-ok="addOk"
/>
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -162,6 +174,20 @@ export default { ...@@ -162,6 +174,20 @@ export default {
scheduleModal: false, scheduleModal: false,
orderSupportModal: false, orderSupportModal: false,
curId: 0, curId: 0,
statuList:
this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
name: "",
items: null,
title: "",
details: null,
uId: "",
hid: 0,
orderId: 0,
mesCode: "",
productName: "",
drawnNumber: "",
count: 0,
modalAccessory: false,
columns: [ columns: [
{ {
key: "selection", key: "selection",
...@@ -203,8 +229,23 @@ export default { ...@@ -203,8 +229,23 @@ export default {
key: "isSupportingFinish", key: "isSupportingFinish",
title: this.l("isSupportingFinish"), title: this.l("isSupportingFinish"),
align: "center", align: "center",
high: true, render: (h, params) => {
code: "aps.plan.supportingStatus", return h(
"op",
{
attrs: {
oprate: "detail",
},
style: {
color: this.setName(params.row.isSupportingFinish).color,
},
on: {
click: () => this.openAccessory(params.row),
},
},
this.setName(params.row.isSupportingFinish).name
)
}
}, },
{ {
key: "projectNumber", key: "projectNumber",
...@@ -611,6 +652,7 @@ export default { ...@@ -611,6 +652,7 @@ export default {
this.listBatchIds = []; this.listBatchIds = [];
this.listBatchIds1 = []; this.listBatchIds1 = [];
this.canselFooter(); this.canselFooter();
this.modalAccessory = false;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
...@@ -623,7 +665,6 @@ export default { ...@@ -623,7 +665,6 @@ export default {
this.editModal = true; this.editModal = true;
this.curId = id; this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true; this.deletelModal = true;
this.curId = id; this.curId = id;
...@@ -649,6 +690,7 @@ export default { ...@@ -649,6 +690,7 @@ export default {
//aps //aps
this.dispatchModal = false; this.dispatchModal = false;
this.scheduleModal = false; this.scheduleModal = false;
this.modalAccessory = false;
// this.listBatchIds = [] // this.listBatchIds = []
// this.listBatchIds1 = [] // this.listBatchIds1 = []
// this.canselFooter() // this.canselFooter()
...@@ -742,6 +784,49 @@ export default { ...@@ -742,6 +784,49 @@ export default {
this.$Message.error("获取排产模型数量失败"); this.$Message.error("获取排产模型数量失败");
}); });
}, },
//配套申请
setName(v) {
let outPar = {
name: "",
color: "",
};
if ((v + "").indexOf(",") == -1) {
var item;
this.statuList.map((u) => {
if (u.code == v) {
item = u;
}
});
if (item) {
//this.items = item;
outPar = {
name: item.name,
color: item.color,
};
}
}
return outPar
},
openAccessory(row) {
this.orderId = row.id;
this.mesCode = row.mesCode;
this.productName = row.productName;
this.drawnNumber = row.drawnNumber;
this.count = row.quantity;
if (row.isSupportingFinish == 0) {
this.title = "申请配套";
this.details = () => import("./addAccessory");
} else {
this.title = "配套清单";
this.details = () => import("./editAccessory");
}
this.modalAccessory = true;
},
ok() {
this.modalAccessory = false;
this.curId = 0;
},
}, },
}; };
</script> </script>
......
...@@ -7,32 +7,11 @@ export default { ...@@ -7,32 +7,11 @@ export default {
index1: `${technologyUrl}routingheader/paged`, index1: `${technologyUrl}routingheader/paged`,
paged1(params) { paged1(params) {
return Api.post(`${technologyUrl}routingheader/paged`, params); return Api.post(`${technologyUrl}routingheader/paged`, params);
}, },
routingset(params) { routingset(params) {
return Api.post(`${technologyUrl}orderrouting/routingset`, params); return Api.post(`${technologyUrl}orderrouting/routingset`, params);
}, },
// create(params) { ordersetroutingids(params) {
// return Api.post(`${technologyUrl}routingheader/create`, params); return Api.post(`${technologyUrl}orderrouting/ordersetroutingids`, params);
// }, },
// update(params) {
// return Api.put(`${technologyUrl}routingheader/update`, params);
// },
// getCloneHeader(params){
// return Api.post(`${technologyUrl}routingheader/cloneheader`,params);
// },
// getCodeNumber(params){
// return Api.post(`${systemUrl}/cache/generate_serialcode`,params);
// },
// delete(id) {
// return Api.delete(`${technologyUrl}routingheader/delete`, {
// params: {
// id: id
// }
// });
// },
// deletes(params) {
// return Api.post(`${technologyUrl}routingheader/batchdelete`, params);
// }
} }
<template>
<div class="datails">
<Table border ref="selection" :columns="columns" :data="data1"></Table>
</div>
</template>
<script>
import Api from "./api";
export default {
props: {
eid: {
ids: Array,
},
},
data() {
return {
data1: [],
columns: [
{
title: "#",
type: "index",
width: 50,
align: "center",
},
{
key: "code",
title: this.l("code"),
align: "left",
},
{
key: "name",
title: this.l("name"),
align: "left",
tooltip: true,
},
{
key: "phase",
title: this.l("phase"),
align: "center",
width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.phase,
code: "Process.Routing.phase",
},
});
},
},
{
key: "versionid",
title: this.l("version"),
align: "center",
width: 100,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.versionid,
code: "Process.Routing.version",
},
});
},
},
{
title: this.l("approvalStatus"),
key: "approvalStatus",
align: "center",
width: 120,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.approvalStatus,
code: "process.RoutingStatus",
},
});
},
},
{
key: "routingType",
title: this.l("routingType"),
align: "center",
width: 120,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.routingType,
code: "Process.Routing.routingType",
},
});
},
},
{
key: "drawingNo",
title: this.l("drawingNo"),
align: "left",
width: 120,
},
{
key: "productName",
title: this.l("productName"),
align: "left",
tooltip: true,
},
{
key: "departmentName",
title: this.l("departmentName"),
align: "left",
tooltip: true,
},
{
key: "isEffect",
title: this.l("isEffect"),
align: "center",
width: 80,
render: (h, params) => {
return h("state", {
attrs: {
value: params.row.isEffect,
code: "Process.Status",
},
});
},
},
],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.getData();
},
methods: {
getData() {
// console.log(this.eid.ids);
let ids = this.eid.ids;
let conditions = [
{
conditionalType: "In",
fieldName: "id",
fieldValue: ids.join(","),
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
},
l(key) {
let vkey = "routingHeader" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
...@@ -60,11 +60,10 @@ export default { ...@@ -60,11 +60,10 @@ export default {
curId: 0, curId: 0,
productingPreparationPeople: 0, productingPreparationPeople: 0,
orderIds: 0, orderIds: 0,
ids: [],
}, },
detail: null, detail: null,
modal: false, modal: false,
easySearch: { easySearch: {
keys: { op: "mescode,productName", value: null }, keys: { op: "mescode,productName", value: null },
productingpreparationpeople: { op: "Equal", value: null }, productingpreparationpeople: { op: "Equal", value: null },
...@@ -73,8 +72,8 @@ export default { ...@@ -73,8 +72,8 @@ export default {
// { type: "selection", width: 70, align: "center" }, // { type: "selection", width: 70, align: "center" },
{ {
title: "序号", title: "序号",
key: "id", // key: "id",
// type: "index", type: "index",
width: 80, width: 80,
align: "center", align: "center",
}, },
...@@ -102,31 +101,26 @@ export default { ...@@ -102,31 +101,26 @@ export default {
title: "工艺规程", title: "工艺规程",
key: "mainRoutingStatus", key: "mainRoutingStatus",
render: (h, params) => { render: (h, params) => {
return h("a", [ return h(
h("state", { params.row.mainRoutingStatus == 1 ||
props: { params.row.mainRoutingStatus == -1
code: "process.RoutingStatus", ? "a"
type: "text", : "div",
value: params.row.mainRoutingStatus, [
}, h("state", {
nativeOn: { props: {
click: () => { code: "process.RoutingStatus",
this.record(params.row); type: "text",
value: params.row.mainRoutingStatus,
}, },
}, nativeOn: {
}), click: () => {
// h( this.record(params.row);
// "a", },
// { },
// on: { }),
// click: () => { ]
// this.record(params.row); );
// },
// },
// },
// params.row.mainRoutingStatus == 4 ? "未设置" : ""
// ),
]);
}, },
}, },
// { // {
...@@ -143,16 +137,24 @@ export default { ...@@ -143,16 +137,24 @@ export default {
methods: { methods: {
record(row) { record(row) {
if (row.mainRoutingStatus == -1) { if (row.mainRoutingStatus == -1) {
//未设置 //未设置-1
this.child.curId = row.productId; this.child.curId = row.productId;
this.child.productingPreparationPeople = this.child.productingPreparationPeople =
row.productingPreparationPeople; row.productingPreparationPeople;
this.child.orderIds = row.id; this.child.orderIds = row.id;
this.title = "设置"; this.title = "工艺列表";
this.detail = () => import("./set"); this.detail = () => import("./set");
this.modal = true; this.modal = true;
} else if (row.mainRoutingStatus == 1) { } else if (row.mainRoutingStatus == 1) {
//受控中,查看 //受控中,查看
this.title = "查看工艺";
this.detail = () => import("./details");
this.modal = true;
Api.ordersetroutingids({ id: row.id }).then((r) => {
if (r.result) {
this.child.ids = r.result;
}
});
} }
}, },
onHide() { onHide() {
......
...@@ -2,24 +2,18 @@ ...@@ -2,24 +2,18 @@
<div class="set"> <div class="set">
<!-- {{eid.curId}} --> <!-- {{eid.curId}} -->
<Layout> <Layout>
<Sider v-if="showMenu" width="300"> <Sider v-show="showMenu" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" /> <ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider> </Sider>
<div v-if="!showMenu" class="show_menu"> <div v-show="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开"> <a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" /> <Icon type="ios-arrow-forward" size="24" />
</a> </a>
</div> </div>
<Content :class="!showMenu?'con_bord':''"> <Content :class="!showMenu?'con_bord':''">
<div class="row-form"> <div class="row-form">
<Input <Input placeholder="请输入产品名称/工艺名称/工艺编号" v-model="value" v-width="300" clearable />
search <Button type="primary" @click="search">查询</Button>
enter-button
placeholder="请输入产品名称/工艺名称/工艺编号"
v-model="value"
v-width="300"
@on-search="search"
/>
</div> </div>
<Table <Table
border border
...@@ -75,7 +69,7 @@ export default { ...@@ -75,7 +69,7 @@ export default {
{ {
title: "#", title: "#",
type: "index", type: "index",
width: 50, width: 70,
align: "center", align: "center",
}, },
{ {
...@@ -122,7 +116,7 @@ export default { ...@@ -122,7 +116,7 @@ export default {
title: this.l("approvalStatus"), title: this.l("approvalStatus"),
key: "approvalStatus", key: "approvalStatus",
align: "center", align: "center",
width: "120", width: 120,
render: (h, params) => { render: (h, params) => {
return h("state", { return h("state", {
attrs: { attrs: {
...@@ -136,7 +130,7 @@ export default { ...@@ -136,7 +130,7 @@ export default {
key: "routingType", key: "routingType",
title: this.l("routingType"), title: this.l("routingType"),
align: "center", align: "center",
width: 100, width: 120,
render: (h, params) => { render: (h, params) => {
return h("state", { return h("state", {
attrs: { attrs: {
...@@ -150,7 +144,7 @@ export default { ...@@ -150,7 +144,7 @@ export default {
key: "drawingNo", key: "drawingNo",
title: this.l("drawingNo"), title: this.l("drawingNo"),
align: "left", align: "left",
width: 100, width: 120,
}, },
{ {
key: "productName", key: "productName",
...@@ -169,7 +163,14 @@ export default { ...@@ -169,7 +163,14 @@ export default {
title: this.l("isEffect"), title: this.l("isEffect"),
align: "center", align: "center",
width: 80, width: 80,
code: "Process.Status", render: (h, params) => {
return h("state", {
attrs: {
value: params.row.isEffect,
code: "Process.Status",
},
});
},
}, },
], ],
}; };
...@@ -178,14 +179,21 @@ export default { ...@@ -178,14 +179,21 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
// let where = { productId: { op: "In", value: this.eid.curId } };
// this.$refs.grid.reload(where);
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
let conditions = []; let conditions = [
Api.paged1({ conditions: conditions }).then((r) => { {
conditionalType: "In",
fieldName: "productId",
fieldValue: this.eid.curId,
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items; this.data1 = r.result.items;
}); });
}, },
...@@ -196,8 +204,21 @@ export default { ...@@ -196,8 +204,21 @@ export default {
this.showMenu = true; this.showMenu = true;
}, },
productSearch(id, item, ids) { productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } }; // let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where); // this.$refs.grid.reload(where);
let conditions = [
{
conditionalType: "In",
fieldName: "productId",
fieldValue: ids.join(","),
},
];
let data = {
conditions: conditions,
};
Api.paged1(data).then((r) => {
this.data1 = r.result.items;
});
}, },
search() { search() {
let conditions = [ let conditions = [
...@@ -215,7 +236,7 @@ export default { ...@@ -215,7 +236,7 @@ export default {
}); });
}, },
selectInfo(value) { selectInfo(value) {
console.log(value); // console.log(value);
if (value.length > 0) { if (value.length > 0) {
this.footerBar = true; this.footerBar = true;
} else { } else {
......
...@@ -242,6 +242,15 @@ div::-webkit-scrollbar-corner { ...@@ -242,6 +242,15 @@ div::-webkit-scrollbar-corner {
.pt10 { .pt10 {
padding: 10px 0px 0; padding: 10px 0px 0;
} }
.pb5 {
padding-bottom: 5px;
}
.pb10 {
padding-bottom: 10px;
}
.pb20 {
padding-bottom: 20px;
}
.ptb5 { .ptb5 {
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
...@@ -258,6 +267,12 @@ div::-webkit-scrollbar-corner { ...@@ -258,6 +267,12 @@ div::-webkit-scrollbar-corner {
.pl30 { .pl30 {
padding-left: 30px; padding-left: 30px;
} }
.pl40 {
padding-left: 40px;
}
.pl50 {
padding-left: 50px;
}
.pl5 { .pl5 {
padding-left: 5px; padding-left: 5px;
} }
......
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