Commit d74d48bb authored by 佟礼's avatar 佟礼

搜索

parents 115ceb40 d5ba0e3c
<template>
<Col :span="span" class="filed-col">
<label v-text="name" class="label"></label>
<span>
<div v-text="name" class="label"></div>
<p>
<slot></slot>
</span>
</p>
</Col>
</template>
<script>
export default {
name: 'filed',
name: "filed",
props: {
name: {
type: String
......@@ -18,29 +18,51 @@ export default {
default: 12
}
}
}
};
</script>
<style lang="less">
.detail {
display: table;
height: 100%;
border-collapse: collapse;
.ivu-row {
display: table-row;
border-top: 1px solid #ddd;
border-left: 1px solid #ddd;
border: 1px solid #ddd;
border-top: none;
height: 100%;
.filed-col {
display: table-cell;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
// margin: 0 0 -1px -1px;
line-height: 30px;
max-width: 970px;
border: 1px solid #ddd;
border-right: none;
margin: 0 -1px -1px -1px;
box-sizing: border-box;
line-height: 70px;
.label {
background: #e8eaf1;
display: inline-block;
width: 100px;
text-align: right;
padding: 0 5px;
line-height: 40px;
float: left;
height: 100%;
}
p {
max-width: 870px;
height: 100%;
word-break: break-all;
word-wrap: break-word;
margin: 0 10px 0 110px;
line-height: 20px;
padding-top: 10px;
}
}
.ivu-col-span-24 {
.label {
height: 100%;
padding: 0.5% 5px;
}
p {
padding-top: 1%;
}
}
}
......
......@@ -400,12 +400,14 @@ export default {
});
parmsOrderpriority.alls = arryIds;
// alert(JSON.stringify(parmsOrderpriority));
Api.orderpriority(parmsOrderpriority).then(res => {
Api.orderpriority(parmsOrderpriority)
.then(res => {
if (res.success) {
if (res.result) {
//this.$Message.success("排序成功");
//apsp排产前检查
Api.apsdatachecked().then(res1 => {
Api.apsdatachecked()
.then(res1 => {
if (res1.success) {
if (res1.result.res) {
// this.$Message.success("数据校验成功");
......@@ -413,7 +415,8 @@ export default {
let paramsTime = {
setTime: this.entity.setTime
};
Api.apsprepareandcalc(paramsTime).then(res2 => {
Api.apsprepareandcalc(paramsTime)
.then(res2 => {
if (res2.success) {
if (res2.result.res) {
this.$Message.success("排产计算成功");
......@@ -423,26 +426,50 @@ export default {
// params: { customerId: id }
});
} else {
this.circleModal = false;
this.$Message.error(res2.result.msg);
}
} else {
this.circleModal = false;
this.$Message.error("操作失败:排产计算");
}
});
})
.catch(
function(err) {
this.circleModal = false;
this.$Message.error("操作失败");
}.bind(this)
);
} else {
this.circleModal = false;
this.$Message.success("数据校验失败");
}
} else {
this.circleModal = false;
this.$Message.error("操作失败:数据校验");
}
});
})
.catch(
function(err) {
this.circleModal = false;
this.$Message.error("操作失败");
}.bind(this)
);
} else {
this.circleModal = false;
this.$Message.error("排序失败,请重新APS排产操作");
}
} else {
this.circleModal = false;
this.$Message.error("操作失败:排序");
}
});
})
.catch(
function(err) {
this.circleModal = false;
this.$Message.error("操作失败");
}.bind(this)
);
},
//打开设置参数
openAddModel(type, row) {
......
......@@ -175,6 +175,7 @@ export default {
if (r.success) {
this.$Message.success("清空列表成功");
this.orderlist();
this.data = [];
}
});
},
......@@ -192,6 +193,7 @@ export default {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
this.data = [];
} else {
this.$Message.success("下发失败");
}
......
......@@ -15,49 +15,50 @@
<Filed :span="12" :name="l('status')">
<state code="crm.customer.status" :value="entity.status" type="text"></state>
</Filed>
<Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed>
<Filed :span="12" :name="l('code')">{{entity.code}}</Filed>
<Filed :span="12" :name="l('trade')">{{entity.trade}}</Filed>
<Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed>
<Filed :span="24" :name="l('trade')">{{entity.trade}}</Filed>
</Row>
</div>
</template>
<script>
import Api from './api'
import Api from "./api";
export default {
name: 'Add',
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }]
}
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
props: {
eid: Number
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result
this.$emit('on-load')
})
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit('on-close')
this.$emit("on-close");
},
l(key) {
key = 'Customer' + '.' + key
return this.$t(key)
key = "Customer" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v)
this.load(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,9 @@ export default {
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
MaxResultCount: 10,
SkipCount: 0,
RoutingSetStatus: ""
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
formValidate: {
id: "",
......
......@@ -52,7 +52,7 @@
</template>
</template>
</div>
</template> -->
</template>-->
</Table>
<Page
class="mr15 mt10 fr"
......@@ -116,55 +116,129 @@
</FormItem>
</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%">
<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
code="plan.order.taskType"
v-model="orderSearchForm.TaskType"
v-model="orderSearchForm.taskType"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="阶段" style="width:100%">
<dictionary
code="plan.order.stage"
v-model="orderSearchForm.Stage"
v-model="orderSearchForm.stage"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="材料" style="width:100%">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.MaterialId"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<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>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.GuestName"
v-model="orderSearchForm.guestName"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input v-model="orderSearchForm.functionaryOffice" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="厂内责任主体部门" style="width:100%">
<dictionary
code="plan.order.mainDepartment"
v-model="orderSearchForm.mainDepartmentId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="任务节点要求" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方投产输入文件(编号)" style="width:100%">
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方技术输入文件(编号)" style="width:100%">
<Input
v-model="orderSearchForm.technologyDocmentCode"
placeholder
style="width:240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="外部图号/模型号" style="width:100%">
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="模型版本" style="width:100%">
<Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方任务号" style="width:100%">
<Input v-model="orderSearchForm.TaskCode" placeholder style="width:240px" />
<Input v-model="orderSearchForm.taskCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -185,9 +259,9 @@
</div>
</template>
<script>
import expandRow from './components/table-expand.vue'
import consume from './components/expend.vue'
import service from '@/plugins/request'
import expandRow from "./components/table-expand.vue";
import consume from "./components/expend.vue";
import service from "@/plugins/request";
export default {
components: { expandRow, consume },
data() {
......@@ -199,254 +273,275 @@ export default {
conditions: []
},
showPagesize: [10, 20, 40],
searchIterms: '', //搜索内容
searchIterms: "", //搜索内容
showModel: false, //高级搜索弹框
matchingModal: false, //配套确认弹框
rowData: null, //配套确认行暂存数据
list: [],
data1: [],
selectdata: [],
tbHeight: '', //表格高度
tbHeight: "", //表格高度
orderSearchForm: {
ProductId: '', //产品id
productName: '', //产品名称
Status: '', //订单状态
processcode: '', //工艺编号
processname: '', // 工艺名称
TaskType: '', //订单类型
Stage: '', //阶段
MaterialId: '', //材料
ProductId: "", //产品id
productName: "", //产品名称
Status: "", //订单状态
processcode: "", //工艺编号
processname: "", // 工艺名称
TaskType: "", //订单类型
Stage: "", //阶段
MaterialId: "", //材料
Quantity: null, //数量
GuestName: '', //甲方客户
TaskCode: '', //甲方任务号
GuestName: "", //甲方客户
TaskCode: "", //甲方任务号
SkipCount: 0,
MaxResultCount: 10,
DispatchStatus:1//排产状态
DispatchStatus: 1, //排产状态,
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
orderMaterial: [], //配套确认返回数组
mColumn: [
{
type: 'expand',
type: "expand",
width: 60,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row
}
})
});
}
},
{ title: '工艺编号', key: 'processcode' },
{ title: '工艺名称', key: 'processname' },
{ title: '料单板数', key: 'platesnum', width: '110' },
{ title: "工艺编号", key: "processcode" },
{ title: "工艺名称", key: "processname" },
{ title: "料单板数", key: "platesnum", width: "110" },
{
title: '状态',
key: 'status',
width: '120',
slot: 'status',
title: "状态",
key: "status",
width: "120",
slot: "status",
filters: this.getArry(
this.$store.getters.dictionaryByKey('Scheduling.production.status')
this.$store.getters.dictionaryByKey("Scheduling.production.status")
),
filterMultiple: false,
filterMethod(value, row) {
let statusChar = row.status + ''
return statusChar.indexOf(value) > -1
let statusChar = row.status + "";
return statusChar.indexOf(value) > -1;
}
},
// { title: '料单', width: '130', key: 'action', slot: 'ld' },
{ title: '操作', width: '120', key: 'action', slot: 'action' }
{ title: "操作", width: "120", key: "action", slot: "action" }
],
mDatas: [] //表格数据
}
};
},
created() {
this.laoed()
this.tbHeight = window.innerHeight - 280
this.laoed();
this.tbHeight = window.innerHeight - 280;
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
// 初始数据列表 ?SimpleSearch=`+ parmes;
laoed(parmes) {
if (parmes == undefined && parmes == null) {
parmes = ''
parmes = "";
}
let url = `${designUrl}/orderrouting/getwaitorderlist`
service.get(`${url}`, parmes).then((res) => {
this.mDatas = res.result.items
this.search.total = res.result.totalCount
})
let url = `${designUrl}/orderrouting/getwaitorderlist`;
service.get(`${url}`, parmes).then(res => {
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
});
},
initTree() {
var sumData = [] //暂存产品树数据
this.$http.order.getallselecttree().then((res) => {
var sumData = []; //暂存产品树数据
this.$http.order.getallselecttree().then(res => {
if (res.result) {
for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i])
sumData = sumData.concat(res.result[i]);
}
this.treeData = sumData
this.data1 = JSON.parse(JSON.stringify(sumData))
this.treeData = sumData;
this.data1 = JSON.parse(JSON.stringify(sumData));
} else {
this.$Message.error('加载产品树失败!')
this.$Message.error("加载产品树失败!");
}
})
});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
'span',
"span",
{
style: {
color: data.isProduct != '1' ? '#249E91' : '#333', //根据选中状态设置样式
cursor: 'pointer'
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = []
arrTree.push(data)
this.handleSelect(arrTree) //手动选择树节点
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
)
);
},
handleSelect(data) {
if (data.length > 0) {
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].id
this.orderSearchForm.productId = data[0].productId
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].id;
this.orderSearchForm.productId = data[0].productId;
} else {
this.$Message.error('此节点不是产品,请选择产品节点!')
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
},
//得到数据字典对应的label和value,用于table排序、筛选
getArry(arryList) {
let arry = []
arryList.forEach((data) => {
var that = this
let arryObj = {}
arryObj['label'] = data.name
arryObj['value'] = data.code
arry.push(arryObj)
})
return arry
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
},
// 搜索
tableSearch() {
let parmes = this.searchIterms
this.laoed(parmes)
let parmes = this.searchIterms;
this.laoed(parmes);
},
searchModel() {
this.showModel = true
this.showModel = true;
},
// 分页
pageChange(pageNum) {
let pageData = this.search
pageData.SkipCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount
let pageData = this.search;
pageData.SkipCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount;
pageData.MaxResultCount =
(pageNum - 1) * this.orderSearchForm.MaxResultCount
this.laoedPage(pageData)
(pageNum - 1) * this.orderSearchForm.MaxResultCount;
this.laoedPage(pageData);
},
pageSizeChange(val) {
let pageData = this.search
pageData.SkipCount = 0
pageData.MaxResultCount = val
let pageData = this.search;
pageData.SkipCount = 0;
pageData.MaxResultCount = val;
this.laoedPage(pageData)
this.laoedPage(pageData);
},
// 分页查询数据列表
laoedPage(pageData) {
let url =
`${designUrl}/orderrouting/getwaitorderlist?SkipCount=` +
pageData.SkipCount +
'&MaxResultCount=' +
pageData.MaxResultCount
service.get(`${url}`).then((res) => {
if(res.success){
this.mDatas = res.result.items
this.search.total = res.result.totalCount
}else{
this.$Message.error("查询失败")
"&MaxResultCount=" +
pageData.MaxResultCount;
service.get(`${url}`).then(res => {
if (res.success) {
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
} else {
this.$Message.error("查询失败");
}
})
});
},
columnChange(item, i) {
//列设置
item.hide = !item.hide
item.hide = !item.hide;
},
// 排产派工
openDetails(lemData) {
if (lemData.routing_type == 2) {
this.$router.push({
name: 'dispatched',
name: "dispatched",
params: { transmitData: lemData }
})
});
} else {
this.$router.push({
name: 'mainProcess',
name: "mainProcess",
params: { transmitData: lemData }
})
});
}
},
// 配套确认
openModels(data) {
let id = data.materialbillId
let url02 = `${designUrl}/ordermaterial/getbyid?id=` + id
service.get(`${url02}`).then((res) => {
this.orderMaterial = res.result.orderMaterialList
this.rowData = res.data
})
this.matchingModal = true
let id = data.materialbillId;
let url02 = `${designUrl}/ordermaterial/getbyid?id=` + id;
service.get(`${url02}`).then(res => {
this.orderMaterial = res.result.orderMaterialList;
this.rowData = res.data;
});
this.matchingModal = true;
},
// 配套确认--更改确认按钮
modalOk() {
let getnewData = this.$refs['consume'].orderMaterial
this.rowData.orderMaterialList = getnewData
let parmes = this.rowData
let url = `${designUrl}/ordermaterial/updateordermaterialactualquantity`
service.put(`${url}`, parmes).then((res) => {})
this.matchingModal = false
let getnewData = this.$refs["consume"].orderMaterial;
this.rowData.orderMaterialList = getnewData;
let parmes = this.rowData;
let url = `${designUrl}/ordermaterial/updateordermaterialactualquantity`;
service.put(`${url}`, parmes).then(res => {});
this.matchingModal = false;
},
Cancel() {
this.matchingModal = false
this.matchingModal = false;
},
close() {
this.showModel = false
this.showModel = false;
},
// 高级查询
complexSearch() {
let params = this.orderSearchForm
params.SkipCount = params.SkipCount || 0
params.MaxResultCount = params.MaxResultCount || 10
this.$http.order.getScheduling(params).then((res) => {
let params = this.orderSearchForm;
params.SkipCount = params.SkipCount || 0;
params.MaxResultCount = params.MaxResultCount || 10;
this.$http.order.getScheduling(params).then(res => {
if (res.result) {
this.mDatas = res.result.items
this.search.total = res.result.totalCount
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
} else {
this.$Message.error('查询失败...')
this.$Message.error("查询失败...");
}
})
this.close()
});
this.close();
}
},
mounted() {
this.initTree() //获取产品树
this.initTree(); //获取产品树
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
// window.screenHeight = window.innerHeight
this.tbHeight = window.innerHeight - 280
})()
this.tbHeight = window.innerHeight - 280;
})();
};
}
}
}
};
</script>
<style scoped>
.table_title {
......
<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">
<ordermaterial :style="{ height: tabHeight }" ref="ordermaterial"></ordermaterial>
</TabPane>
</Tabs>
</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:""
......
......@@ -62,65 +62,106 @@
<Row>
<Col span="12">
<FormItem label="工艺编号" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processcode"
placeholder="请输入工艺编号"
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="工艺名称" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processname"
placeholder="请输入工艺名称"
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="任务类型" style="width:100%">
<dictionary code='plan.order.taskType' v-model="orderSearchForm.taskType" style="width:240px"></dictionary>
<FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="阶段" style="width:100%">
<dictionary code='plan.order.stage' v-model="orderSearchForm.stage" style="width:240px"></dictionary>
<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.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<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%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
<FormItem label="任务类型" style="width:100%">
<dictionary
code="plan.order.taskType"
v-model="orderSearchForm.taskType"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary code='plan.order.guestName' v-model="orderSearchForm.guestName" style="width:240px"></dictionary>
<FormItem label="阶段" style="width:100%">
<dictionary
code="plan.order.stage"
v-model="orderSearchForm.stage"
style="width:240px"
></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 label="材料" style="width:100%">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input
v-model="orderSearchForm.functionaryOffice"
placeholder
<FormItem label="数量" style="width:100%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.guestName"
style="width:240px"
/>
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input v-model="orderSearchForm.functionaryOffice" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="厂内责任主体部门" style="width:100%">
<dictionary code='plan.order.mainDepartment' v-model="orderSearchForm.mainDepartmentId" style="width:240px"></dictionary>
</Select>
<dictionary
code="plan.order.mainDepartment"
v-model="orderSearchForm.mainDepartmentId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
......@@ -132,11 +173,7 @@
</Col>
<Col span="12">
<FormItem label="甲方投产输入文件(编号)" style="width:100%">
<Input
v-model="orderSearchForm.putintDocmentCode"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -152,11 +189,7 @@
</Col>
<Col span="12">
<FormItem label="外部图号/模型号" style="width:100%">
<Input
v-model="orderSearchForm.outerDrawnNumber"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -230,7 +263,11 @@ export default {
outer_Envelope_Size: '', //包装尺寸
demandStartDate: '', //开始时间
demandFinishDate: '', //完成时间
remark: '' //备注
remark: '', //备注,
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
mColumn:[
{ type: 'expand',width: 60,
......
......@@ -4,43 +4,41 @@
<div class="title_box mb10">
<div class="table_title">
<Input
search enter-button style="width:300px;"
v-model="orderSearchForm.SimpleSearch" placeholder="请输入查询条件"
@on-search="tableSearch" ></Input>
search
enter-button
style="width:300px;"
v-model="orderSearchForm.SimpleSearch"
placeholder="请输入查询条件"
@on-search="tableSearch"
></Input>
</div>
<Button type="primary" class="title_btn" @click='searchModel'>高级查询</Button>
<Button type="primary" class="title_btn" @click="searchModel">高级查询</Button>
</div>
<div class="tableBox mb10" :style="{height:tbHeight}">
<div class="table">
<div v-if="listTask.length==0" class="wu_data">暂无数据</div>
<Card class="card" v-for="(item,index) in listTask"
:key="index">
<h3 slot="title">
订单编号:{{item.mesCode}}
</h3>
<Card class="card" v-for="(item,index) in listTask" :key="index">
<h3 slot="title">订单编号:{{item.mesCode}}</h3>
<ul class="card_body01">
<li class="card_line">
产品名称:{{item.productName}}
</li>
<li class="card_line">
任务类型:{{item.equipment}}
</li>
<li class="card_line">产品名称:{{item.productName}}</li>
<li class="card_line">任务类型:{{item.equipment}}</li>
</ul>
<p class="footer01">
<a class="footer_btn" href="#" @click.event="reviewFn(item)">
追 溯
</a>
<a class="footer_btn" href="#" @click.event="reviewFn(item)">追 溯</a>
</p>
</Card>
</div>
<div v-show="noData" class="no_data">
<h3> 暂无数据</h3>
<h3>暂无数据</h3>
</div>
</div>
<Page
class="mr10 fr" id="pageComent"
show-total size="small"
show-elevator show-sizer
class="mr10 fr"
id="pageComent"
show-total
size="small"
show-elevator
show-sizer
:total="search.total"
:current="search.pageIndex"
:page-size="search.pageSize"
......@@ -54,11 +52,7 @@
<Row>
<Col span="12">
<FormItem label="产品名称" style="width:100%">
<Select
v-model="orderSearchForm.productName"
placeholder="请选择"
style="width:240px;"
>
<Select v-model="orderSearchForm.productName" placeholder="请选择" style="width:240px;">
<Option
v-for="(item,index) in list"
:key="index"
......@@ -71,7 +65,11 @@
</Col>
<Col span="12">
<FormItem label="状态" style="width:100%">
<dictionary code='plan.order.status' v-model="orderSearchForm.status" style="width:240px"></dictionary>
<dictionary
code="plan.order.status"
v-model="orderSearchForm.status"
style="width:240px"
></dictionary>
<Input v-model="orderSearchForm.productId" style="width:240px" v-if="false" />
</FormItem>
</Col>
......@@ -79,65 +77,106 @@
<Row>
<Col span="12">
<FormItem label="工艺编号" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processcode"
placeholder="请输入工艺编号"
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="工艺名称" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processname"
placeholder="请输入工艺名称"
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="任务类型" style="width:100%">
<dictionary code='plan.order.taskType' v-model="orderSearchForm.taskType" style="width:240px"></dictionary>
<FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="阶段" style="width:100%">
<dictionary code='plan.order.stage' v-model="orderSearchForm.stage" style="width:240px"></dictionary>
<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.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<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%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
<FormItem label="任务类型" style="width:100%">
<dictionary
code="plan.order.taskType"
v-model="orderSearchForm.taskType"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary code='plan.order.guestName' v-model="orderSearchForm.guestName" style="width:240px"></dictionary>
<FormItem label="阶段" style="width:100%">
<dictionary
code="plan.order.stage"
v-model="orderSearchForm.stage"
style="width:240px"
></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 label="材料" style="width:100%">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input
v-model="orderSearchForm.functionaryOffice"
placeholder
<FormItem label="数量" style="width:100%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.guestName"
style="width:240px"
/>
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input v-model="orderSearchForm.functionaryOffice" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="厂内责任主体部门" style="width:100%">
<dictionary code='plan.order.mainDepartment' v-model="orderSearchForm.mainDepartmentId" style="width:240px"></dictionary>
</Select>
<dictionary
code="plan.order.mainDepartment"
v-model="orderSearchForm.mainDepartmentId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
......@@ -149,11 +188,7 @@
</Col>
<Col span="12">
<FormItem label="甲方投产输入文件(编号)" style="width:100%">
<Input
v-model="orderSearchForm.putintDocmentCode"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -169,11 +204,7 @@
</Col>
<Col span="12">
<FormItem label="外部图号/模型号" style="width:100%">
<Input
v-model="orderSearchForm.outerDrawnNumber"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -190,15 +221,15 @@
</Col>
</Row>
</Form>
<div slot="footer" >
<div slot="footer">
<Button @click="close" style="margin-left:20px;">取消</Button>
<Button @click="complexSearch" type="primary" class="ml10">查询</Button>
</div>
</Modal>
<!-- 数据包追溯 -->
<Modal v-model="reviewModal" title="数据包追溯" :width="1280" :mask-closable="false">
<reviewCount ref='reviewCount' :basicData="itemData" :actValue="actValue"/>
<div slot="footer" >
<reviewCount ref="reviewCount" :basicData="itemData" :actValue="actValue" />
<div slot="footer">
<!-- <Button @click="close" style="margin-left:20px;">取消</Button> -->
<Button @click="reviewOk" type="primary" style="margin-left:10px;">确定</Button>
</div>
......@@ -206,20 +237,20 @@
</div>
</template>
<script>
import service from '@/plugins/request';
import reviewCount from './components/reviewCount.vue';
import service from "@/plugins/request";
import reviewCount from "./components/reviewCount.vue";
export default {
components:{reviewCount},
components: { reviewCount },
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data(){
data() {
return {
search: {
pageIndex: 1,//当前页数
pageSize: 20,//分页数
total:0,//总数
conditions: [],
pageIndex: 1, //当前页数
pageSize: 20, //分页数
total: 0, //总数
conditions: []
},
showPagesize: [20, 50, 100],
showModel: false,
......@@ -227,68 +258,75 @@ export default {
data1: [],
noData: false,
selectdata: [],
tbHeight:"550px",
itemData:{},//追溯传的数据
actValue:1,//追溯传的选中meniu
orderSearchForm: { //高级搜索字段内容
tbHeight: "550px",
itemData: {}, //追溯传的数据
actValue: 1, //追溯传的选中meniu
orderSearchForm: {
//高级搜索字段内容
MaxResultCount: 20,
SkipCount: 1,
SimpleSearch:'',//搜索框内容
SimpleSearch: "", //搜索框内容
productId: null, //产品id
productName: '', //产品名称
taskType: '', //任务类型
stage: '', //阶段
materialId: '', //材料
productName: "", //产品名称
taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: 0, //数量
guestName: '', //甲方客户
printSupply: '', //3D打印承制单位
functionaryOffice: '', //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID
taskRequire: '', //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号
modelVersion: '', //模型版本
taskCode: '', //甲方任务号
designer: '', //甲方设计人员
officeFunctionary: '', //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员
routing_Method: '', //工艺方法
outer_Envelope_Size: '', //包装尺寸
demandStartDate: '', //开始时间
demandFinishDate: '', //完成时间
remark: '' //备注
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
listTask:[],//card数据
reviewModal:false,//追溯弹框
}
listTask: [], //card数据
reviewModal: false //追溯弹框
};
},
created(){
created() {
this.laode();
this.tbHeight = window.innerHeight - 208 + 'px'
this.tbHeight = window.innerHeight - 208 + "px";
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
// 加载数据
laode(){
laode() {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service.post(`${url}`,{
"MaxResultCount": 20,
"SkipCount": 1,
}).then(res => {
service
.post(`${url}`, {
MaxResultCount: 20,
SkipCount: 1
})
.then(res => {
// console.log(res)
this.listTask = res.result.items
this.search.total = res.result.totalCount
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
},
reviewFn(item){ //追溯
reviewFn(item) {
//追溯
this.reviewModal = true;
this.itemData = item;
this.$refs.reviewCount.actNum = '1'
this.$refs.reviewCount.actNum = "1";
},
reviewOk(){
reviewOk() {
this.reviewModal = false;
// 手动更新选中的菜单
// menuChange(){
......@@ -297,23 +335,24 @@ export default {
// this.$refs.reviewCount.$refs.menus.updateActiveName();
// })
// }
this.$refs.reviewCount.actNum = ''
this.$refs.reviewCount.actNum = "";
},
// 分页
pageChange(pageNum) {
this.orderSearchForm.SkipCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount
this.laodePage(this.orderSearchForm)
this.orderSearchForm.SkipCount =
(pageNum - 1) * this.orderSearchForm.MaxResultCount;
this.laodePage(this.orderSearchForm);
},
pageSizeChange(val) {
this.orderSearchForm.SkipCount = 0
this.orderSearchForm.MaxResultCount = val
this.laodePage(this.orderSearchForm)
this.orderSearchForm.SkipCount = 0;
this.orderSearchForm.MaxResultCount = val;
this.laodePage(this.orderSearchForm);
},
laodePage(pageData){
laodePage(pageData) {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service.post(`${url}`,pageData).then(res => {
this.listTask = res.result.items
this.search.total = res.result.totalCount
service.post(`${url}`, pageData).then(res => {
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
},
......@@ -321,157 +360,160 @@ export default {
tableSearch(searchData) {
let MaxResultCount = this.orderSearchForm.MaxResultCount;
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service.post(`${url}`,{
"MaxResultCount": MaxResultCount,
"SkipCount": 0,
"SimpleSearch": searchData
}).then(res => {
this.listTask = res.result.items
this.search.total = res.result.totalCount
service
.post(`${url}`, {
MaxResultCount: MaxResultCount,
SkipCount: 0,
SimpleSearch: searchData
})
.then(res => {
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
},
searchModel(){
searchModel() {
this.showModel = true;
},
async openDetails(lemData){
this.$router.push({ name: 'qcimplement', params: { transmitData: lemData }})
async openDetails(lemData) {
this.$router.push({
name: "qcimplement",
params: { transmitData: lemData }
});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
'span',
"span",
{
style: {
color: data.isProduct != '1' ? '#249E91' : '#333', //根据选中状态设置样式
cursor: 'pointer'
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = []
arrTree.push(data)
this.handleSelect(arrTree) //手动选择树节点
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
)
);
},
handleSelect(data) {
if (data.length > 0) {
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].id
this.orderSearchForm.productId = data[0].productId
}
else
{
this.$Message.error('此节点不是产品,请选择产品节点!')
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].id;
this.orderSearchForm.productId = data[0].productId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
},
close(){
close() {
this.showModel = false;
},
complexSearch(){
complexSearch() {
// this.$emit('easySearch',this.orderSearchForm);
let parmes = this.orderSearchForm
parmes.SimpleSearch = ''
let parmes = this.orderSearchForm;
parmes.SimpleSearch = "";
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
// console.log(parmes)
service.post(`${url}`,parmes).then(res => {
service.post(`${url}`, parmes).then(res => {
// console.log(res)
this.listTask = res.result.items
this.search.total = res.result.totalCount
if(this.search.total == 0){
this.noData = true
}else{
this.noData = false
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
if (this.search.total == 0) {
this.noData = true;
} else {
this.noData = false;
}
});
this.close();
},
//得到数据字典对应的label和value,用于table排序、筛选
getArry(arryList) {
let arry = []
arryList.forEach((data) => {
var that = this
let arryObj = {}
arryObj['label'] = data.name
arryObj['value'] = data.code
arry.push(arryObj)
})
return arry
},
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
}
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.tbHeight = window.innerHeight - 208 + 'px'
})()
this.tbHeight = window.innerHeight - 208 + "px";
})();
};
}
},
}
};
</script>
<style scoped>
#pageComent .ivu-select-dropdown{
top: 0!important;
#pageComent .ivu-select-dropdown {
top: 0 !important;
bottom: 36px;
}
ul,li{
ul,
li {
list-style: none;
}
.table_title{
.table_title {
width: 320px;
float: left;
}
.title_btn{
.title_btn {
margin-top: 1px;
}
.tableBox{
}
.tableBox {
/* height: 582px; 笔记本高度*/
/* height: 778px; */
border: #ddd solid 1px;
overflow-y: scroll;
overflow-x: hidden;
}
.table{
.table {
margin: 10px 0 0 0;
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
}
.no_data{
.no_data {
height: 800px;
text-align: center;
line-height: 800px;
}
.card{
.card {
width: 375px;
margin: 10px 0 10px 20px;
}
.wu_data{
.wu_data {
margin: 200px auto;
font-size: 18px;
}
/* .card_body01{
margin: 0 0 10px 0;
} */
.card_line{
.card_line {
height: 30px;
line-height: 30px;
}
.footer01{
.footer01 {
text-align: center;
}
.footer_btn{
.footer_btn {
border-top: 1px solid #ccc;
display: block;
padding: 10px 0 0 0;
color: #0099FF;
color: #0099ff;
}
</style>
\ No newline at end of file
......@@ -4,16 +4,25 @@
<div class="title_box">
<div class="table_title">
<Input
search enter-button style="width:300px;"
v-model="searchIterms" placeholder="请输入查询条件"
@on-search="tableSearch" ></Input>
search
enter-button
style="width:300px;"
v-model="searchIterms"
placeholder="请输入查询条件"
@on-search="tableSearch"
></Input>
</div>
<Button type="primary" class="title_btn" v-show="false" @click='searchModel'>高级查询</Button>
<Button type="primary" class="title_btn" v-show="false" @click="searchModel">高级查询</Button>
</div>
<div class="table">
<Table
border class="tableCommon" :height="tbHeight"
ref="table" :columns="mColumn" :data="mDatas" >
border
class="tableCommon"
:height="tbHeight"
ref="table"
:columns="mColumn"
:data="mDatas"
>
<template slot-scope="{ row,index }" slot="status">
<state code="taskList.status" type="text" class="bold" :value="row.status"></state>
</template>
......@@ -21,8 +30,10 @@
<!-- @on-row-click="(row,index)=>clickRow(row,index)" -->
<Page
class="mr15 mt10 fr"
show-total size="small"
show-elevator show-sizer
show-total
size="small"
show-elevator
show-sizer
:total="search.total"
:current="search.pageIndex"
:page-size="search.pageSize"
......@@ -37,11 +48,7 @@
<Row>
<Col span="12">
<FormItem label="产品名称" style="width:100%">
<Select
v-model="orderSearchForm.productName"
placeholder="请选择"
style="width:240px;"
>
<Select v-model="orderSearchForm.productName" placeholder="请选择" style="width:240px;">
<Option
v-for="(item,index) in list"
:key="index"
......@@ -54,7 +61,11 @@
</Col>
<Col span="12">
<FormItem label="状态" style="width:100%">
<dictionary code='plan.order.status' v-model="orderSearchForm.status" style="width:240px"></dictionary>
<dictionary
code="plan.order.status"
v-model="orderSearchForm.status"
style="width:240px"
></dictionary>
<Input v-model="orderSearchForm.productId" style="width:240px" v-if="false" />
</FormItem>
</Col>
......@@ -62,65 +73,106 @@
<Row>
<Col span="12">
<FormItem label="工艺编号" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processcode"
placeholder="请输入工艺编号"
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="工艺名称" style="width:100%">
<dictionary code='plan.order.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<Input
v-model="orderSearchForm.processname"
placeholder="请输入工艺名称"
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="任务类型" style="width:100%">
<dictionary code='plan.order.taskType' v-model="orderSearchForm.taskType" style="width:240px"></dictionary>
<FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="阶段" style="width:100%">
<dictionary code='plan.order.stage' v-model="orderSearchForm.stage" style="width:240px"></dictionary>
<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.material' v-model="orderSearchForm.materialId" style="width:240px"></dictionary>
<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%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
<FormItem label="任务类型" style="width:100%">
<dictionary
code="plan.order.taskType"
v-model="orderSearchForm.taskType"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary code='plan.order.guestName' v-model="orderSearchForm.guestName" style="width:240px"></dictionary>
<FormItem label="阶段" style="width:100%">
<dictionary
code="plan.order.stage"
v-model="orderSearchForm.stage"
style="width:240px"
></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 label="材料" style="width:100%">
<dictionary
code="plan.order.material"
v-model="orderSearchForm.materialId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input
v-model="orderSearchForm.functionaryOffice"
placeholder
<FormItem label="数量" style="width:100%">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber>
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方客户" style="width:100%">
<dictionary
code="plan.order.guestName"
v-model="orderSearchForm.guestName"
style="width:240px"
/>
></dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="厂内责任机关" style="width:100%">
<Input v-model="orderSearchForm.functionaryOffice" placeholder style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="厂内责任主体部门" style="width:100%">
<dictionary code='plan.order.mainDepartment' v-model="orderSearchForm.mainDepartmentId" style="width:240px"></dictionary>
</Select>
<dictionary
code="plan.order.mainDepartment"
v-model="orderSearchForm.mainDepartmentId"
style="width:240px"
></dictionary>
</FormItem>
</Col>
</Row>
......@@ -132,11 +184,7 @@
</Col>
<Col span="12">
<FormItem label="甲方投产输入文件(编号)" style="width:100%">
<Input
v-model="orderSearchForm.putintDocmentCode"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -152,11 +200,7 @@
</Col>
<Col span="12">
<FormItem label="外部图号/模型号" style="width:100%">
<Input
v-model="orderSearchForm.outerDrawnNumber"
placeholder
style="width:240px"
/>
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -173,255 +217,271 @@
</Col>
</Row>
</Form>
<div slot="footer" >
<div slot="footer">
<Button @click="close" style="margin-left:20px;">取消</Button>
<Button @click="complexSearch" type="primary" style="margin-left:10px;">查询</Button>
</div>
</Modal>
<!-- 配套确认弹框-材料消耗单 -->
<Modal v-model="showModel02" title="材料消耗单" :width="1600" :mask-closable="false">
</Modal>
<Modal v-model="showModel02" title="材料消耗单" :width="1600" :mask-closable="false"></Modal>
</div>
</template>
<script>
import expandRow from '../../produce/components/table-list.vue';
import service from '@/plugins/request';
import expandRow from "../../produce/components/table-list.vue";
import service from "@/plugins/request";
export default {
components:{expandRow,},
data(){
components: { expandRow },
data() {
return {
search: {
pageIndex: 1,//当前页数
pageSize: 10,//分页数
total:0,//总数
pageIndex: 1, //当前页数
pageSize: 10, //分页数
total: 0, //总数
conditions: []
},
showPagesize: [10, 20, 40],
searchIterms:'',
searchIterms: "",
showModel: false,
showModel02: false,
list: [],
data1: [],
tbHeight: '',//表格高度
tbHeight: "", //表格高度
selectdata: [],
SkipCount: 1,
MaxResultCount: 10,
orderSearchForm: {
productId: null, //产品id
productName: '', //产品名称
taskType: '', //任务类型
stage: '', //阶段
materialId: '', //材料
productName: "", //产品名称
taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: 1, //数量
guestName: '', //甲方客户
printSupply: '', //3D打印承制单位
functionaryOffice: '', //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID
taskRequire: '', //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号
modelVersion: '', //模型版本
taskCode: '', //甲方任务号
designer: '', //甲方设计人员
officeFunctionary: '', //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员
routing_Method: '', //工艺方法
outer_Envelope_Size: '', //包装尺寸
demandStartDate: '', //开始时间
demandFinishDate: '', //完成时间
remark: '' //备注
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
mColumn:[
{ type: 'expand',width: 60,
render: (h, params)=>{
mColumn: [
{
type: "expand",
width: 60,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row
}
})
}},
{ title: '工艺编号', key: 'processcode', },
{ title: '工艺名称', key: 'processname', },
{ title: '状态', key: 'status', width:'120',
slot:"status",
filters:this.getArry(
this.$store.getters.dictionaryByKey(
'taskList.status'
)
});
}
},
{ title: "工艺编号", key: "processcode" },
{ title: "工艺名称", key: "processname" },
{
title: "状态",
key: "status",
width: "120",
slot: "status",
filters: this.getArry(
this.$store.getters.dictionaryByKey("taskList.status")
),
filterMultiple: false,
filterMethod(value, row) {
let statusChar = row.status + ''
return statusChar.indexOf(value) > -1
},
let statusChar = row.status + "";
return statusChar.indexOf(value) > -1;
}
},
{ title: '计划数量', key: 'quantity', width:'160',},
{ title: '操作', width:'100',
render:(h, params)=>{
return h('div', { class: 'action' },[
{ title: "计划数量", key: "quantity", width: "160" },
{
title: "操作",
width: "100",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
'op',
"op",
{
attrs:{
oprate:'detail'
} ,
on: { click: () => {this.openDetails(params.row)}}
attrs: {
oprate: "detail"
},
on: {
click: () => {
this.openDetails(params.row);
}
}
},
'检验'
"检验"
)
])
}},
],
mDatas:[],//表格数据
]);
}
}
],
mDatas: [] //表格数据
};
},
created(){
created() {
this.laode();
this.tbHeight = window.innerHeight - 200
this.tbHeight = window.innerHeight - 200;
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
// 加载数据
laode(){
laode() {
let url = `${PlanUrl}/ordercheck/waitexecuteorderlist`;
service.post(`${url}`,{
"status": 0,
"skipCount":0,
"maxResultCount": 10
}).then(res => {
this.mDatas = res.result.items
this.search.total = res.result.totalCount
service
.post(`${url}`, {
status: 0,
skipCount: 0,
maxResultCount: 10
})
.then(res => {
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
});
},
// 分页
pageChange(pageNum) {
let pageData = this.search;
pageData.SkipCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount
pageData.MaxResultCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount
pageData.SkipCount = (pageNum - 1) * this.orderSearchForm.MaxResultCount;
pageData.MaxResultCount =
(pageNum - 1) * this.orderSearchForm.MaxResultCount;
// pageData.pageIndex = pageNum
this.laodePage(pageData)
this.laodePage(pageData);
},
pageSizeChange(val) {
let pageData = this.search;
pageData.SkipCount = 0
pageData.MaxResultCount = val
this.laodePage(pageData)
pageData.SkipCount = 0;
pageData.MaxResultCount = val;
this.laodePage(pageData);
},
laodePage(pageData){
laodePage(pageData) {
let url = `${PlanUrl}/ordercheck/waitexecuteorderlist`;
service.post(`${url}`,pageData).then(res => {
this.mDatas = res.result.items
this.search.total = res.result.totalCount
service.post(`${url}`, pageData).then(res => {
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
});
},
// 搜索
tableSearch() {
console.warn("查询数据")
console.warn("查询数据");
let val = this.searchIterms;
console.log(val)
console.log(val);
let parmes = {
"status": 0,
"simpleSearch": val,
"skipCount":0,
"maxResultCount": 10
}
this.searchlaode(parmes)
status: 0,
simpleSearch: val,
skipCount: 0,
maxResultCount: 10
};
this.searchlaode(parmes);
},
searchlaode(parmes){
searchlaode(parmes) {
let url = `${PlanUrl}/ordercheck/waitexecuteorderlist`;
service.post(`${url}`,parmes).then(res => {
console.warn(res)
this.mDatas = res.result.items
this.search.total = res.result.totalCount
service.post(`${url}`, parmes).then(res => {
console.warn(res);
this.mDatas = res.result.items;
this.search.total = res.result.totalCount;
});
},
searchModel(){
searchModel() {
this.showModel = true;
},
async openDetails(lemData){
this.$router.push({ name: 'qcimplement', params: { transmitData: lemData }})
async openDetails(lemData) {
this.$router.push({
name: "qcimplement",
params: { transmitData: lemData }
});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
'span',
"span",
{
style: {
color: data.isProduct != '1' ? '#249E91' : '#333', //根据选中状态设置样式
cursor: 'pointer'
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = []
arrTree.push(data)
this.handleSelect(arrTree) //手动选择树节点
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
)
);
},
handleSelect(data) {
if (data.length > 0) {
this.selectdata = []
this.selectdata = data
this.list = []
this.list.push({ label: data[0].title, value: data[0].id })
this.selectdata = [];
this.selectdata = data;
this.list = [];
this.list.push({ label: data[0].title, value: data[0].id });
//this.formValidate.classType=data[0].id;
if (data[0].isProduct == '1') {
this.orderSearchForm.productName = data[0].id
this.orderSearchForm.productId = data[0].productId
}
else
{
this.$Message.error('此节点不是产品,请选择产品节点!')
if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].id;
this.orderSearchForm.productId = data[0].productId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
},
close(){
close() {
this.showModel = false;
},
complexSearch(){
complexSearch() {
// this.$emit('easySearch',this.orderSearchForm);
this.close();
},
//得到数据字典对应的label和value,用于table排序、筛选
getArry(arryList) {
let arry = []
arryList.forEach((data) => {
var that = this
let arryObj = {}
arryObj['label'] = data.name
arryObj['value'] = data.code
arry.push(arryObj)
})
return arry
},
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
}
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.tbHeight = window.screenHeight - 200
})()
window.screenHeight = window.innerHeight;
this.tbHeight = window.screenHeight - 200;
})();
};
}
},
}
};
</script>
<style scoped>
.table_title{
.table_title {
width: 320px;
/* float: left; */
}
.table{
.table {
margin: 10px 0 0 0;
}
.title_btn{
.title_btn {
margin-top: 1px;
}
</style>
\ No newline at end of file
......@@ -20,7 +20,7 @@
</Col>
<Col span="7">
<FormItem label="领料人" style="width:100%" prop="customerId">
<UserSelect ref="userSelected" v-model="resource.customerId" :type="1" />
<UserSelect ref="userSelected" v-model="resource.customerId" :type="0" />
</FormItem>
</Col>
</Row>
......
import createVuexAlong from 'vuex-along'
import Api from '@/plugins/request'
export const state=()=>({
counter:0,
dictionary: new Map(),//所有字典项
userMap:[],//所有用户缓存;
userInfo:{
userId:0,
userName:""
}
export const state = () => ({
counter: 0,
dictionary: new Map(), //所有字典项
userMap: [], //所有用户缓存;
userInfo: {
userId: 0,
userName: ""
},
cart:[],
count: 0,
})
export const getters={
export const getters = {
dictionaryByKey: (state) => (key) => {
let result = [];
let items = state.dictionary.get(key);
......@@ -19,7 +21,7 @@ export const getters={
}
return result;
},
getUser:state=>key=>{
getUser: state => key => {
// try{
// if(state.userMap.has(key)){
// return state.userMap.get(key);
......@@ -27,16 +29,18 @@ export const getters={
// }catch(e){
// console.log(e);
// }
let user=state.userMap.filter(u=>{return u.id==key});
if(user.length>0){
let user = state.userMap.filter(u => {
return u.id == key
});
if (user.length > 0) {
return user[0]
}else{
} else {
return null;
}
}
}
export const mutations={
increment(state){
export const mutations = {
increment(state) {
state.counter++
},
setUserInfo(state, userInfo) {
......@@ -44,24 +48,40 @@ export const mutations={
// sessionStorage.setItem("userInfo", JSON.stringify(userInfo));
// sessionStorage.setItem("token", userInfo.token);
},
addUser(state,user){
addUser(state, user) {
state.userMap.push(user);
},
setDictionary(state, dictionary) {
state.dictionary = dictionary;
},
setCart(state, cart) {
state.cart = cart;
},
setCartCount(state, count) {
state.count = count;
}
}
export const actions={
async loadUser({commit},key){
export const actions = {
async loadUser({
commit
}, key) {
let { result } = await this.$api.get(`${systemUrl}/user/getuser`,{id:key});
console.warn("result",result)
commit("addUser",result);
let {
result
} = await this.$api.get(`${systemUrl}/user/getuser`, {
id: key
});
console.warn("result", result)
commit("addUser", result);
},
async loadDictionary({ commit }) {
async loadDictionary({
commit
}) {
let url = `${systemUrl}/Dictionary/GetAll`
let { result } = await Api.get(url);
let {
result
} = await Api.get(url);
var map = new Map();
......@@ -74,7 +94,7 @@ export const actions={
}
}
export const plugins= [
export const plugins = [
createVuexAlong({
// 设置保存的集合名字,避免同站点下的多项目数据冲突
name: "hyhmes",
......@@ -88,6 +108,6 @@ export const plugins= [
list: ["hyhmes.session"],
},
}),
]
//设置 strict 为不严格模式,即可在actions中修改state
export const strict=false;
\ No newline at end of file
]
//设置 strict 为不严格模式,即可在actions中修改state
export const strict = false;
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