Commit b32e3427 authored by 周远喜's avatar 周远喜

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

parents 0adf3cc1 786d999c
...@@ -290,6 +290,15 @@ export default { ...@@ -290,6 +290,15 @@ export default {
title: '紧急程度', title: '紧急程度',
key: 'urgencyLevel', key: 'urgencyLevel',
width: 100, width: 100,
render: (h, params) => {
return h('state', {
props: {
code: 'plan.order.urgencyLevel',
type: 'text',
value: params.row.urgencyLevel + ''
}
})
}
}, },
// { // {
// title: '任务类型', // title: '任务类型',
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</Col>--> </Col>-->
<Col span="8"> <Col span="8">
<FormItem label="项目号" style="width:100%"> <FormItem label="项目号" style="width:100%">
<Input v-model="orderSearchForm.projectNumber" style="width:240px" /> <Input v-model="orderSearchForm.projectNumber" style="width:240px" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -128,7 +128,11 @@ ...@@ -128,7 +128,11 @@
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem label="紧急程度" style="width:100%"> <FormItem label="紧急程度" style="width:100%">
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel" ></dictionary> <dictionary
style="width:240px"
code="plan.order.urgencyLevel"
v-model="orderSearchForm.urgencyLevel"
></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col span="8"> <!-- <Col span="8">
...@@ -172,7 +176,7 @@ ...@@ -172,7 +176,7 @@
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" /> <Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" />
</FormItem> </FormItem>
</Col>--> </Col>-->
<!-- <Col span="8"> <!-- <Col span="8">
<FormItem label="模型版本" style="width:100%"> <FormItem label="模型版本" style="width:100%">
<Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" /> <Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" />
...@@ -184,7 +188,7 @@ ...@@ -184,7 +188,7 @@
<Input v-model="orderSearchForm.designer" placeholder style="width:240px" /> <Input v-model="orderSearchForm.designer" placeholder style="width:240px" />
</FormItem> </FormItem>
</Col>--> </Col>-->
<!-- <Col span="8"> <!-- <Col span="8">
<FormItem label="厂内机关负责人" style="width:100%"> <FormItem label="厂内机关负责人" style="width:100%">
<Input v-model="orderSearchForm.officeFunctionary" placeholder style="width:240px" /> <Input v-model="orderSearchForm.officeFunctionary" placeholder style="width:240px" />
...@@ -213,240 +217,243 @@ ...@@ -213,240 +217,243 @@
</div> </div>
</template> </template>
<script> <script>
var myDate = new Date() var myDate = new Date();
var dayTomorrow = new Date() var dayTomorrow = new Date();
dayTomorrow.setTime(dayTomorrow.getTime() + 24 * 60 * 60 * 1000) dayTomorrow.setTime(dayTomorrow.getTime() + 24 * 60 * 60 * 1000);
var nowDate = var nowDate =
myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate() myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate();
var tomorrowDate = var tomorrowDate =
dayTomorrow.getFullYear() + dayTomorrow.getFullYear() +
'-' + "-" +
(dayTomorrow.getMonth() + 1) + (dayTomorrow.getMonth() + 1) +
'-' + "-" +
dayTomorrow.getDate() dayTomorrow.getDate();
export default { export default {
name: 'createOrder', name: "createOrder",
data() { data() {
return { return {
divHeight: '260px', divHeight: "260px",
list: [], list: [],
data1: [], data1: [],
selectdata: [], selectdata: [],
placeholdeinfo: '请选择', placeholdeinfo: "请选择",
orderSearchForm: { orderSearchForm: {
id: null, id: null,
productId: null, //产品id productId: null, //产品id
productName: '', //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段 stage: null, //阶段
materialId: null, //材料 materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: '', //甲方客户 guestName: "", //甲方客户
printSupply: '', //3D打印承制单位 printSupply: "", //3D打印承制单位
functionaryOffice: '', //厂内责任机关 functionaryOffice: "", //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: '', //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号 putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号 technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号 outerDrawnNumber: "", //外部图号/模型号
modelVersion: '', //模型版本 modelVersion: "", //模型版本
taskCode: '', //甲方任务号 taskCode: "", //甲方任务号
designer: '', //甲方设计人员 designer: "", //甲方设计人员
officeFunctionary: '', //厂内机关负责人 officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员 mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法 routing_Method: null, //工艺方法
outer_Envelope_Size: '', //包装尺寸 outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间
remark: '', //备注 remark: "", //备注
projectNumber:'',//项目号 projectNumber: "", //项目号
batchNumber:'',//批次号 batchNumber: "", //批次号
urgencyLevel:null,//紧急程度 urgencyLevel: null //紧急程度
}, },
ruleValidate: { ruleValidate: {
productId: [ productId: [
{ {
required: true, required: true,
message: '请选择产品名称', message: "请选择产品名称",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
taskType: [ taskType: [
{ {
required: true, required: true,
message: '请选择任务类型', message: "请选择任务类型",
trigger: 'change', trigger: "change",
type: 'number' type: "number"
} }
], ],
stage: [ stage: [
{ {
required: true, required: true,
message: '请选择阶段', message: "请选择阶段",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
materialId: [ materialId: [
{ {
required: true, required: true,
message: '请选择材料', message: "请选择材料",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
quantity: [ quantity: [
{ {
required: true, required: true,
message: '请输入数量', message: "请输入数量",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
], ],
routing_Method: [ routing_Method: [
{ {
required: true, required: true,
message: '请选择工艺方法', message: "请选择工艺方法",
type: 'number', type: "number",
trigger: 'change' trigger: "change"
} }
] ]
} }
} };
}, },
methods: { methods: {
addOrderOk() { addOrderOk() {
return this.orderSearchForm return this.orderSearchForm;
}, },
handleSelect(data) { handleSelect(data) {
if (data.length > 0) { if (data.length > 0) {
this.selectdata = [] this.selectdata = [];
this.selectdata = data this.selectdata = data;
this.list = [] this.list = [];
this.list.push({ label: data[0].title, value: data[0].id }) this.list.push({ label: data[0].title, value: data[0].id });
if (data[0].isProduct == '1') { if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].title this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo this.orderSearchForm.drawnNumber = data[0].drawingNo;
} else { } else {
this.$Message.error('此节点不是产品,请选择产品节点!') this.$Message.error("此节点不是产品,请选择产品节点!");
} }
} }
}, },
resetFields() { resetFields() {
;(this.placeholdeinfo = '请选择'), (this.placeholdeinfo = "请选择"),
(this.orderSearchForm = { (this.orderSearchForm = {
productId: null, //产品id productId: null, //产品id
productName: '', //产品名称 productName: "", //产品名称
drawnNumber: null, //图号 drawnNumber: null, //图号
taskType: null, //任务类型 taskType: null, //任务类型
stage: null, //阶段 stage: null, //阶段
materialId: null, //材料 materialId: null, //材料
quantity: 1, //数量 quantity: 1, //数量
guestName: '', //甲方客户 guestName: "", //甲方客户
printSupply: '', //3D打印承制单位 printSupply: "", //3D打印承制单位
functionaryOffice: '', //厂内责任机关 functionaryOffice: "", //厂内责任机关
mainDepartmentId: '', //厂内责任主体部门ID mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: '', //任务接点要求 taskRequire: "", //任务接点要求
putintDocmentCode: '', //甲方投产输入文件编号 putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: '', //甲方技术输入文件编号 technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: '', //外部图号/模型号 outerDrawnNumber: "", //外部图号/模型号
modelVersion: '', //模型版本 modelVersion: "", //模型版本
taskCode: '', //甲方任务号 taskCode: "", //甲方任务号
designer: '', //甲方设计人员 designer: "", //甲方设计人员
officeFunctionary: '', //厂内机关负责人 officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: '', //厂内主工艺人员 mainRoutingPeople: "", //厂内主工艺人员
routing_Method: null, //工艺方法 routing_Method: null, //工艺方法
outer_Envelope_Size: '', //包装尺寸 outer_Envelope_Size: "", //包装尺寸
demandStartDate: this.getFormatDate(nowDate), //开始时间 demandStartDate: this.getFormatDate(nowDate), //开始时间
demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间 demandFinishDate: this.getFormatDate(tomorrowDate), //完成时间
remark: '' //备注 remark: "" //备注
}) });
}, },
inidate(data) { inidate(data) {
this.orderSearchForm = data this.orderSearchForm = data;
this.orderSearchForm.productId = parseInt(data.productId) this.orderSearchForm.productId = parseInt(data.productId);
this.orderSearchForm.taskType = parseInt(data.taskType) this.orderSearchForm.taskType = parseInt(data.taskType);
this.orderSearchForm.stage = parseInt(data.stage) this.orderSearchForm.stage = parseInt(data.stage);
this.orderSearchForm.materialId = parseInt(data.materialId) this.orderSearchForm.materialId = parseInt(data.materialId);
this.orderSearchForm.routing_Method = parseInt(data.routing_Method) this.orderSearchForm.routing_Method = parseInt(data.routing_Method);
this.orderSearchForm.guestName = parseInt(data.guestName) this.orderSearchForm.guestName = parseInt(data.guestName);
this.orderSearchForm.printSupply = parseInt(data.printSupply) this.orderSearchForm.printSupply = parseInt(data.printSupply);
this.orderSearchForm.mainDepartmentId = parseInt(data.mainDepartmentId) this.orderSearchForm.mainDepartmentId = parseInt(data.mainDepartmentId);
this.orderSearchForm.urgencyLevel = parseInt(data.urgencyLevel);
this.orderSearchForm.demandStartDate = this.getFormatDate( this.orderSearchForm.demandStartDate = this.getFormatDate(
data.demandStartDate data.demandStartDate
) );
this.orderSearchForm.demandFinishDate = this.getFormatDate( this.orderSearchForm.demandFinishDate = this.getFormatDate(
data.demandFinishDate data.demandFinishDate
) );
this.placeholdeinfo = data.productName this.placeholdeinfo = data.productName;
}, },
iniTree(data) { iniTree(data) {
this.data1 = data this.data1 = data;
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
//渲染树的样式 //渲染树的样式
return h( return h(
'span', "span",
{ {
style: { style: {
color: data.isProduct != '1' ? '#249E91' : '#333', //根据选中状态设置样式 color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: 'pointer' cursor: "pointer"
}, },
on: { on: {
click: () => { click: () => {
let arrTree = [] let arrTree = [];
arrTree.push(data) arrTree.push(data);
this.handleSelect(arrTree) //手动选择树节点 this.handleSelect(arrTree); //手动选择树节点
} }
} }
}, },
data.title data.title
) );
}, },
getStartDate(value) { getStartDate(value) {
if (value == '') { if (value == "") {
this.orderSearchForm.demandStartDate = this.getFormatDate(nowDate) this.orderSearchForm.demandStartDate = this.getFormatDate(nowDate);
} else { } else {
this.orderSearchForm.demandStartDate = this.getFormatDate(value) this.orderSearchForm.demandStartDate = this.getFormatDate(value);
} }
}, },
getFinishedDate(value) { getFinishedDate(value) {
if (value == '') { if (value == "") {
this.orderSearchForm.demandFinishDate = this.getFormatDate(tomorrowDate) this.orderSearchForm.demandFinishDate = this.getFormatDate(
tomorrowDate
);
} else { } else {
this.orderSearchForm.demandFinishDate = this.getFormatDate(value) this.orderSearchForm.demandFinishDate = this.getFormatDate(value);
} }
}, },
getFormatDate(dates) { getFormatDate(dates) {
const d = new Date(dates) const d = new Date(dates);
const resDate = const resDate =
d.getFullYear() + d.getFullYear() +
'-' + "-" +
this.p(d.getMonth() + 1) + this.p(d.getMonth() + 1) +
'-' + "-" +
this.p(d.getDate()) this.p(d.getDate());
return resDate return resDate;
}, },
p(s) { p(s) {
return s < 10 ? '0' + s : s return s < 10 ? "0" + s : s;
} }
}, },
created() { created() {
var theight = window.innerHeight - 400 + 'px' var theight = window.innerHeight - 400 + "px";
this.divHeight = theight this.divHeight = theight;
}, },
mounted() { mounted() {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
window.screenHeight = window.innerHeight window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + 'px' this.divHeight = window.screenHeight - 400 + "px";
})() })();
} };
} }
} };
</script> </script>
\ No newline at end of file
...@@ -18,45 +18,58 @@ ...@@ -18,45 +18,58 @@
ref="formValidate" ref="formValidate"
> >
<Row> <Row>
<Col span="8"> <Col span="8" v-if="false">
<FormItem label="主工艺人员" style="width:100%" prop="DistributeMainRouting"> <FormItem label="主工艺人员" style="width:100%" prop="DistributeMainRouting">
<UserSelect ref="userSelected" v-model="orderForm.DistributeMainRouting" style="width:240px" :roleTitle="roleTitle"/> <UserSelect
ref="userSelected"
v-model="orderForm.DistributeMainRouting"
style="width:240px"
:roleTitle="roleTitle"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="6">
<FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople"> <FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" style="width:240px"/> <WorkShopSelect
</FormItem> ref="userSelected"
</Col> v-model="orderForm.ProductingPreparationPeople"
style="width:240px"
<Col span="8"> />
<FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect ref="userSelected" v-model="orderForm.QuotationPeople" style="width:240px"/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="6">
<FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate"> <FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<DatePicker <DatePicker
v-model="orderForm.MainRoutingFinishDate" v-model="orderForm.ProductingPreparationFinishDate"
type="date" type="date"
placeholder="请选择日期" placeholder="请选择日期"
style="width:240px" style="width:240px"
@on-change="getTimeMainRFD" @on-change="getTimeProductPFD"
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="6">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate"> <FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect
ref="userSelected"
v-model="orderForm.QuotationPeople"
style="width:240px"
/>
</FormItem>
</Col>
<Col span="8" v-if="false">
<FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate">
<DatePicker <DatePicker
v-model="orderForm.ProductingPreparationFinishDate" v-model="orderForm.MainRoutingFinishDate"
type="date" type="date"
placeholder="请选择日期" placeholder="请选择日期"
style="width:240px" style="width:240px"
@on-change="getTimeProductPFD" @on-change="getTimeMainRFD"
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8">
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate"> <FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate">
<DatePicker <DatePicker
v-model="orderForm.QuotationFinishDate" v-model="orderForm.QuotationFinishDate"
...@@ -91,69 +104,69 @@ ...@@ -91,69 +104,69 @@
</template> </template>
<script> <script>
import OrderInfos from '@/components/orderOperator/orderInfos' import OrderInfos from "@/components/orderOperator/orderInfos";
var myDate = new Date() var myDate = new Date();
export default { export default {
name: 'orderSend', name: "orderSend",
components: { components: {
OrderInfos OrderInfos
}, },
data() { data() {
return { return {
divHeight: '260px', divHeight: "260px",
osrOneList: false, //一条数据显示详细 osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表 osrMoreList: false, //多条数据只显示列表
info: { info: {
status: true, status: true,
orderInfo: [] orderInfo: []
}, },
roleTitle:'工艺员', roleTitle: "工艺员",
orderForm: { orderForm: {
DistributeMainRouting: null, //主工艺人员 DistributeMainRouting: null, //主工艺人员
MainRoutingFinishDate: '', //主工艺人员完成时间 MainRoutingFinishDate: "", //主工艺人员完成时间
MajorRoutingPeople: null, //专业工艺人员 MajorRoutingPeople: null, //专业工艺人员
MajorRoutingFinishDate: '', //专业工艺人员完成时间 MajorRoutingFinishDate: "", //专业工艺人员完成时间
CheckUpPeople: 1, //校对人员 暂时不用 CheckUpPeople: 1, //校对人员 暂时不用
CheckUpFinishDate: '2019-12-19', //校对人员完成时间 CheckUpFinishDate: "2019-12-19", //校对人员完成时间
ProductingPreparationPeople: null, //生产准备人员 ProductingPreparationPeople: null, //生产准备人员
ProductingPreparationFinishDate: '', //生产准备完成时间 ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员 QuotationPeople: null, //订单报价人员
QuotationFinishDate: '' //订单报价完成时间 QuotationFinishDate: "" //订单报价完成时间
}, },
columns1: [ columns1: [
{ {
title: '订单编码', title: "订单编码",
key: 'mesCode', key: "mesCode",
width: 180, width: 180,
tooltip: true tooltip: true
}, },
{ {
title: '任务类型', title: "任务类型",
key: 'taskType', key: "taskType",
align: 'center', align: "center",
width: 100, width: 100,
tooltip: true tooltip: true
}, },
{ {
title: '产品名称', title: "产品名称",
key: 'productName', key: "productName",
tooltip: true tooltip: true
}, },
{ {
title: '阶段', title: "阶段",
key: 'stage', key: "stage",
width: 80 width: 80
}, },
{ {
title: '材料', title: "材料",
key: 'materialId', key: "materialId",
width: 100, width: 100,
tooltip: true tooltip: true
}, },
{ {
title: '数量', title: "数量",
key: 'quantity', key: "quantity",
align: 'right', align: "right",
width: 70 width: 70
} }
], ],
...@@ -161,21 +174,21 @@ export default { ...@@ -161,21 +174,21 @@ export default {
dataListRetrun: [], //确定后返回数据 dataListRetrun: [], //确定后返回数据
ruleValidate: { ruleValidate: {
DistributeMainRouting: [ // DistributeMainRouting: [
{ // {
required: true, // required: true,
message: '请选择人员', // message: '请选择人员',
trigger: 'change', // trigger: 'change',
type: 'number' // type: 'number'
} // }
], // ],
MainRoutingFinishDate: [ // MainRoutingFinishDate: [
{ // {
required: true, // required: true,
message: '请选择时间', // message: '请选择时间',
trigger: 'change' // trigger: 'change'
} // }
], // ],
// MajorRoutingPeople: [ // MajorRoutingPeople: [
// { // {
// required: true, // required: true,
...@@ -209,102 +222,102 @@ export default { ...@@ -209,102 +222,102 @@ export default {
ProductingPreparationPeople: [ ProductingPreparationPeople: [
{ {
required: true, required: true,
message: '请选择人员', message: "请选择人员",
trigger: 'change', trigger: "change",
type: 'number' type: "number"
} }
], ],
ProductingPreparationFinishDate: [ ProductingPreparationFinishDate: [
{ {
required: true, required: true,
message: '请选择时间', message: "请选择时间",
trigger: 'change' trigger: "change"
} }
], ],
QuotationPeople: [ QuotationPeople: [
{ {
required: true, required: true,
message: '请选择人员', message: "请选择人员",
trigger: 'change', trigger: "change",
type: 'number' type: "number"
} }
], ],
QuotationFinishDate: [ QuotationFinishDate: [
{ {
required: true, required: true,
message: '请选择时间', message: "请选择时间",
trigger: 'change' trigger: "change"
} }
] ]
} }
} };
}, },
methods: { methods: {
intData(data) { intData(data) {
//打开modal层时给订单list赋值 //打开modal层时给订单list赋值
this.orderInfo = [] this.orderInfo = [];
this.dataList = [] this.dataList = [];
this.dataList = data this.dataList = data;
this.osrOneList = false this.osrOneList = false;
this.osrMoreList = false this.osrMoreList = false;
if (data.length == 1) { if (data.length == 1) {
this.info.status = true this.info.status = true;
this.info.orderInfo = data[0] this.info.orderInfo = data[0];
} else if (data.length > 1) { } else if (data.length > 1) {
this.osrMoreList = true this.osrMoreList = true;
this.info.status = false this.info.status = false;
this.info.orderInfo = [] this.info.orderInfo = [];
} }
}, },
returnDataList() { returnDataList() {
this.dataListRetrun = [] this.dataListRetrun = [];
this.dataList.forEach((item) => { this.dataList.forEach(item => {
let objStr = {} let objStr = {};
objStr.id = item.id objStr.id = item.id;
objStr.mesCode = item.mesCode objStr.mesCode = item.mesCode;
objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting;
objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate;
objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople;
objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate;
objStr.CheckUpPeople = this.orderForm.CheckUpPeople objStr.CheckUpPeople = this.orderForm.CheckUpPeople;
objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate;
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
this.dataListRetrun.push(objStr) this.dataListRetrun.push(objStr);
}) });
//返回审批数据 //返回审批数据
return this.dataListRetrun return this.dataListRetrun;
}, },
getTimeMainRFD(value) { getTimeMainRFD(value) {
this.orderForm.MainRoutingFinishDate = value this.orderForm.MainRoutingFinishDate = value;
}, },
getTimeMajorRFD(value) { getTimeMajorRFD(value) {
this.orderForm.MajorRoutingFinishDate = value this.orderForm.MajorRoutingFinishDate = value;
}, },
getTimeCheckFD(value) { getTimeCheckFD(value) {
this.orderForm.CheckUpFinishDate = value this.orderForm.CheckUpFinishDate = value;
}, },
getTimeProductPFD(value) { getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = value this.orderForm.ProductingPreparationFinishDate = value;
}, },
getTimeQuotationFD(value) { getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value this.orderForm.QuotationFinishDate = value;
} }
}, },
created() { created() {
var theight = window.innerHeight - 400 + 'px' var theight = window.innerHeight - 400 + "px";
this.divHeight = theight this.divHeight = theight;
}, },
mounted() { mounted() {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
window.screenHeight = window.innerHeight window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + 'px' this.divHeight = window.screenHeight - 400 + "px";
})() })();
} };
} }
} };
</script> </script>
\ No newline at end of file
...@@ -496,6 +496,15 @@ export default { ...@@ -496,6 +496,15 @@ export default {
}) })
return cols return cols
} }
},
watch:{
"data.length"(){
this.list=this.data;
},
"height"()
{
this.tableHeight=this.height;
}
} }
} }
</script> </script>
......
...@@ -1019,9 +1019,13 @@ export default { ...@@ -1019,9 +1019,13 @@ export default {
}, },
mes_op_task_plan_simulate: { //参数设置的表 mes_op_task_plan_simulate: { //参数设置的表
id: '', id: '',
// partTaskPk: 订单ID,
// opTaskPk: 工单ID,
flog: 0,//参数应用
planMethod: "转序规则", // 平行 重叠
op_task_pk: '工单编号', op_task_pk: '工单编号',
part_task_pk: '计划编号', part_task_pk: '计划编号',
task_seq: '工序号', taskSeq: '工序号',
task_name: '工序名称', task_name: '工序名称',
put_into_qty: '投产数量', put_into_qty: '投产数量',
plan_start: '计划排产开始', plan_start: '计划排产开始',
...@@ -1030,21 +1034,23 @@ export default { ...@@ -1030,21 +1034,23 @@ export default {
run_time: '单件工时', run_time: '单件工时',
transport_time: '转运时间', transport_time: '转运时间',
check_time: '检验时间', check_time: '检验时间',
efficiency_value: '效率系数', efficiencyValue: '效率系数',
singleout: '单件产出', singleout: '单件产出',
first_equip: '设备编号', first_equip: '设备编号',
equip_type: '设备类型', equip_type: '设备类型',
cal_id: '连班策略', calId: '连班策略',
machine_rule: '设备优先规则', machine_rule: '设备优先规则',
plan_method: '重叠转序', plan_method: '重叠转序',
over_time: '六日加班', overTime: '六日加班',
isdiscrete: '是否离散', isDiscrete: '是否离散',
discrete_value: '离散值', discrete: '离散值',
multi_machine: '多台分配', multi_machine: '多台分配',
notes: '备注', notes: '备注',
insert_flag: '插单', insert_flag: '插单',
outside_time: '外协时间', outside_time: '外协时间',
discrete_percent: '离散百分比%', discrete_percent: '离散百分比%',
multipleEquip: "是否多台安排设备",// 否 是
multipleEquipIds: "设备id", //用英文逗号分隔
taskseq_des: '', taskseq_des: '',
workshopcode: '', workshopcode: '',
routing_detail_id: '', routing_detail_id: '',
...@@ -1052,44 +1058,44 @@ export default { ...@@ -1052,44 +1058,44 @@ export default {
comb_param: '', comb_param: '',
rule_qty: '', rule_qty: '',
}, },
routing_header:{ routing_header: {
id:'', id: '',
creationTime:'', creationTime: '',
creatorUserId:'', creatorUserId: '',
lastModificationTime:'', lastModificationTime: '',
lastModifierUserId:'', lastModifierUserId: '',
deleterUserId:'', deleterUserId: '',
deletionTime:'', deletionTime: '',
classId:'类id', classId: '类id',
unicode:'unicode', unicode: 'unicode',
name:'工艺名称', name: '工艺名称',
code:'工艺编号', code: '工艺编号',
productId:'产品id', productId: '产品id',
productName:'产品名称', productName: '产品名称',
productCode:'产品图号', productCode: '产品图号',
version:'工艺文件版本', version: '工艺文件版本',
author:'编制人', author: '编制人',
departmentId:'', departmentId: '',
isMain:'', isMain: '',
upId:'', upId: '',
upDetailId:'', upDetailId: '',
routingType:'工艺类型', routingType: '工艺类型',
status:'', status: '',
approvalStatus:'状态', approvalStatus: '状态',
remark:'工艺说明', remark: '工艺说明',
roufile:'多媒体附件', roufile: '多媒体附件',
approvalStatusRemark:'', approvalStatusRemark: '',
auditUserId1:'审核人', auditUserId1: '审核人',
auditUserId2:'审批人', auditUserId2: '审批人',
isDeleted:'', isDeleted: '',
platesnum:'', platesnum: '',
isEffect:'', isEffect: '',
developmentMode:'研制方式', developmentMode: '研制方式',
changeOrderCode:'更改单编号', changeOrderCode: '更改单编号',
changeOrderDate:'更改单日期', changeOrderDate: '更改单日期',
changeMethod:'更改办法', changeMethod: '更改办法',
taskType:'任务类型', taskType: '任务类型',
}, },
routing_detail: { routing_detail: {
id: '', id: '',
creationTime: '创建时间', creationTime: '创建时间',
...@@ -1174,30 +1180,30 @@ export default { ...@@ -1174,30 +1180,30 @@ export default {
stepContent: '工步内容', stepContent: '工步内容',
extend: '扩展字段', extend: '扩展字段',
}, },
routing_qc_card:{ routing_qc_card: {
id:'', id: '',
creationTime:'创建时间', creationTime: '创建时间',
creatorUserId:'创建人', creatorUserId: '创建人',
lastModificationTime:'修改时间', lastModificationTime: '修改时间',
lastModifierUserId:'修改人', lastModifierUserId: '修改人',
isDeleted:'是否删除', isDeleted: '是否删除',
deleterUserId:'删除人', deleterUserId: '删除人',
deletionTime:'删除时间', deletionTime: '删除时间',
routingHeaderId:'工艺', routingHeaderId: '工艺',
routingDetailId:'工序', routingDetailId: '工序',
routingStepId:'工步', routingStepId: '工步',
checkContent:'检验内容', checkContent: '检验内容',
checkType:'检验标记', checkType: '检验标记',
checkParams:'参数名称', checkParams: '参数名称',
measurementUnit:'单位', measurementUnit: '单位',
fillintype:'汇报类型', fillintype: '汇报类型',
qualityTemplate:'模板', qualityTemplate: '模板',
isphotograph:'是否拍照', isphotograph: '是否拍照',
status:'状态', status: '状态',
extend:'扩展字段', extend: '扩展字段',
remark:'备注', remark: '备注',
productionRequirement:'生产要求', productionRequirement: '生产要求',
standard:'标准指标', standard: '标准指标',
qualityTemplateName:'模板文件名称', qualityTemplateName: '模板文件名称',
} }
} }
\ No newline at end of file
...@@ -11,33 +11,36 @@ ...@@ -11,33 +11,36 @@
<span slot="close">Off</span> <span slot="close">Off</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem :label="l('cal_id')" prop="cal_id"> <FormItem :label="l('calId')" prop="calId">
<Select v-model="entity.cal_id" style="width:150px"> <Select v-model="entity.calId" style="width:150px">
<Option value="beijing">策略1</Option> <Option
<Option value="shanghai">策略2</Option> v-for="(item,index) in listCal"
<Option value="shenzhen">策略3</Option> :key="index"
:value="item.calid"
:label="item.calname"
></Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem :label="l('over_time')" prop="over_time"> <FormItem :label="l('overTime')" prop="overTime">
<i-switch v-model="entity.over_time" size="large"> <i-switch v-model="entity.overTime" size="large">
<span slot="open">On</span> <span slot="open">On</span>
<span slot="close">Off</span> <span slot="close">Off</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem :label="l('efficiency_value')" prop="efficiency_value"> <FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<Input v-model="entity.efficiency_value" style="width:150px"></Input> <Input v-model="entity.efficiencyValue" style="width:150px"></Input>
</FormItem> </FormItem>
<FormItem :label="l('run_time')" prop="run_time"> <FormItem :label="l('run_time')" prop="run_time">
<InputNumber v-model="entity.run_time"></InputNumber> <InputNumber v-model="entity.run_time"></InputNumber>
</FormItem> </FormItem>
<FormItem :label="l('isdiscrete')" prop="isdiscrete"> <FormItem :label="l('isDiscrete')" prop="isDiscrete">
<i-switch v-model="entity.isdiscrete" size="large"> <i-switch v-model="entity.isDiscrete" size="large">
<span slot="open">On</span> <span slot="open">On</span>
<span slot="close">Off</span> <span slot="close">Off</span>
</i-switch> </i-switch>
</FormItem> </FormItem>
<FormItem :label="l('discrete_value')" prop="discrete_value"> <FormItem :label="l('discrete')" prop="discrete">
<InputNumber v-model="entity.discrete_value"></InputNumber> <InputNumber v-model="entity.discrete"></InputNumber>
</FormItem> </FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent"> <FormItem :label="l('discrete_percent')" prop="discrete_percent">
<InputNumber v-model="entity.discrete_percent"></InputNumber> <InputNumber v-model="entity.discrete_percent"></InputNumber>
...@@ -150,40 +153,63 @@ ...@@ -150,40 +153,63 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "./api";
export default { export default {
data() { data() {
return { return {
entity: { entity: {
value1:100, value1: 100,
value2:100, value2: 100,
fruit: [] fruit: []
}, },
listCal: [],
visible: false, visible: false,
rules: { rules: {
businessName: [{ required: true, message: '必填', trigger: 'blur' }], businessName: [{ required: true, message: "必填", trigger: "blur" }],
businessCode: [{ required: true, message: '必填', trigger: 'blur' }] businessCode: [{ required: true, message: "必填", trigger: "blur" }]
} }
} };
},
mounted() {
this.getCal();
}, },
methods: { methods: {
handleSubmit() {}, getCal() {
Api.getallcal().then(res => {
if (res.success) {
this.listCal = res.result;
}
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
Api.apsschedulupdateparameter(this.entity).then(res => {
if (res.success) {
}
});
} else {
this.$Message.error("Fail!");
}
});
},
handleClose() { handleClose() {
this.$emit("on-close") this.$emit("on-close");
}, },
handleOpen() { handleOpen() {
this.visible = true this.visible = true;
}, },
handle() { handle() {
this.visible = false this.visible = false;
}, },
handleOk() {}, handleOk() {},
l(key) { l(key) {
let vkey = 'mes_op_task_plan_simulate' + '.' + key let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.parameter { .parameter {
...@@ -262,7 +288,7 @@ export default { ...@@ -262,7 +288,7 @@ export default {
color: #2680eb; color: #2680eb;
} }
.check-box { .check-box {
height: 300px; height: 348px;
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
padding: 15px; padding: 15px;
padding-left: 0; padding-left: 0;
...@@ -271,7 +297,7 @@ export default { ...@@ -271,7 +297,7 @@ export default {
} }
} }
.right-down { .right-down {
height: 100px; height: 92px;
} }
.click-btn { .click-btn {
text-align: right; text-align: right;
......
...@@ -21,39 +21,47 @@ export default { ...@@ -21,39 +21,47 @@ export default {
}, },
//获取排产池数据列表 //获取排产池数据列表
getall() { getall() {
return Api.get(`${aps}/Mes_part_task_plan_simulate/getall`); return Api.get(`${apsUrl}/Mes_part_task_plan_simulate/getall`);
}, },
//点开排产池列表查看对应的工序 //点开排产池列表查看对应的工序
getbyorderid(params) { getbyorderid(params) {
return Api.get(`${aps}/mes_op_task_plan_simulate/getbyorderid`, params); return Api.get(`${apsUrl}/mes_op_task_plan_simulate/getbyorderid`, params);
}, },
//订单优先级 //订单优先级
orderpriority(params) { orderpriority(params) {
return Api.post(`${aps}/apspoolappservices/orderpriority`, params); return Api.post(`${apsUrl}/apspoolappservices/orderpriority`, params);
}, },
//删除工序 //删除工序
removeoptasksimluate(params) { removeoptasksimluate(params) {
return Api.post(`${aps}/apspoolappservices/removeoptasksimluate`, params); return Api.post(`${apsUrl}/apspoolappservices/removeoptasksimluate`, params);
}, },
//恢复工艺 //恢复工艺
recoveryoptasksimluate(params) { recoveryoptasksimluate(params) {
return Api.post(`${aps}/apspoolappservices/recoveryoptasksimluate`, params); return Api.post(`${apsUrl}/apspoolappservices/recoveryoptasksimluate`, params);
}, },
//移出排产池 //移出排产池
shiftoutapspool(params) { shiftoutapspool(params) {
return Api.post(`${aps}/apspoolappservices/shiftoutapspool`, params); return Api.post(`${apsUrl}/apspoolappservices/shiftoutapspool`, params);
}, },
//排产计算 //排产计算
apsprepareandcalc(params) { apsprepareandcalc(params) {
return Api.post(`${aps}/apspoolappservices/apsprepareandcalc`, params); return Api.post(`${apsUrl}/apspoolappservices/apsprepareandcalc`, params);
}, },
//排产方案下发 //排产方案下发
processschemedispatch(params) { processschemedispatch(params) {
return Api.post(`${aps}/apspoolappservices/processschemedispatch`, params); return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params);
}, },
//APS排产前数据合法性校验 //APS排产前数据合法性校验
recoveryoptasksimluate(params) { apsdatachecked(params) {
return Api.post(`${aps}/apspoolappservices/apsdatachecked`, params); return Api.post(`${apsUrl}/apspoolappservices/apsdatachecked`, params);
},
//获取连班策略
getallcal(params) {
return Api.get(`${apsUrl}/mes_daily_work_sched/getallcal`, params);
},
//工序参数调整
apsschedulupdateparameter(params) {
return Api.post(`${apsUrl}/ser/apsschedulupdateparameter`, params);
}, },
} }
...@@ -4,21 +4,18 @@ ...@@ -4,21 +4,18 @@
style="margin-top:-25px;margin-bottom:-25px" style="margin-top:-25px;margin-bottom:-25px"
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:action="action"
:easy="false" :easy="false"
:high="false" :high="false"
:set="false" :set="false"
:border="false" :border="false"
:data="data1" :data="data1"
:page="false" :page="false"
:height="gridHeight"
></DataGrid> ></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :eid="curId" @on-close="cancel" /> <Edit :eid="curId" @on-close="cancel" />
</Modal> </Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
<Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel"> <Modal v-model="insertlModal" title="插单" @on-ok="insertOk" @on-cancel="cancel">
<p>确定进行 {{insertTItle}} 操作?</p> <p>确定进行 {{insertTItle}} 操作?</p>
</Modal> </Modal>
...@@ -52,10 +49,10 @@ export default { ...@@ -52,10 +49,10 @@ export default {
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
deletelModal: false,
insertlModal: false, insertlModal: false,
rowIndex: null, rowIndex: null,
curId: 0, curId: 0,
gridHeight: 45,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ title: " ", width: 130 }, { title: " ", width: 130 },
...@@ -302,6 +299,7 @@ export default { ...@@ -302,6 +299,7 @@ export default {
attrs: { attrs: {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
oprate: "detail",
title: "工序参数设置" title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row.id) }
...@@ -324,117 +322,15 @@ export default { ...@@ -324,117 +322,15 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?"
}, },
on: { click: () => this.remove(params.row.id, params.index) } on: { click: () => this.remove(params.row, params.index) }
}) })
]); ]);
} }
} }
], ],
data1: [ data1: [],
{ insertTItle: "插单",
id: "1", selectRoutingDetail: {} //需那种工序
op_task_pk: "001",
part_task_pk: "001",
task_seq: "1",
task_name: "测试工序1",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 1,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
},
{
id: "2",
op_task_pk: "002",
part_task_pk: "002",
task_seq: "2",
task_name: "测试工序2",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 0,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
},
{
id: "3",
op_task_pk: "003",
part_task_pk: "003",
task_seq: "3",
task_name: "测试工序3",
put_into_qty: "10",
plan_start: "04/05/2020",
plan_finish: "06/05/2020",
setup_time: "5",
run_time: "1",
transport_time: "1",
check_time: "1",
efficiency_value: "0.5",
singleout: "2",
first_equip: "NTY-0012",
equip_type: "加工设备",
cal_id: "日历id",
machine_rule: "优先",
plan_method: "是",
over_time: "1",
isdiscrete: "是",
discrete_value: "1.2",
multi_machine: "5",
notes: "暂无备注信息test",
insert_flag: 0,
outside_time: "04/06/2020",
taskseq_des: "",
workshopcode: "",
routing_detail_id: "",
routing_header_id: "",
comb_param: "",
rule_qty: ""
}
],
insertTItle: "插单"
}; };
}, },
mounted() { mounted() {
...@@ -448,51 +344,14 @@ export default { ...@@ -448,51 +344,14 @@ export default {
loadData(expendId) { loadData(expendId) {
let params = { let params = {
id: expendId id: expendId
} };
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then(res => {
if (res.sucess) { if (res.success) {
this.data1 = [];
this.data1 = res.result; this.data1 = res.result;
this.gridHeight = 45;
this.gridHeight = (res.result.length + 1) * 48;
} }
}); });
//加载数据
//alert(id);
// let arr1 = {
// id: '1',
// op_task_pk: '001',
// part_task_pk: '001',
// task_seq: '1',
// task_name: '测试工序1',
// put_into_qty: '10',
// plan_start: '04/05/2020',
// plan_finish: '06/05/2020',
// setup_time: '5',
// run_time: '1',
// transport_time: '1',
// check_time: '1',
// efficiency_value: '0.5',
// singleout: '2',
// first_equip: 'NTY-0012',
// equip_type: '加工设备',
// cal_id: '日历id',
// machine_rule: '优先',
// plan_method: '是',
// over_time: '1',
// isdiscrete: '是',
// discrete_value: '1.2',
// multi_machine: '5',
// notes: '暂无备注信息test',
// insert_flag: 1,
// outside_time: '04/06/2020',
// taskseq_des: '',
// workshopcode: '',
// routing_detail_id: '',
// routing_header_id: '',
// comb_param: '',
// rule_qty: ''
// }
// this.data1.push(arr1)
}, },
//插单事件start---- //插单事件start----
...@@ -535,25 +394,22 @@ export default { ...@@ -535,25 +394,22 @@ export default {
//编辑工序end---- //编辑工序end----
//删除工序事件start----- //删除工序事件start-----
remove(id, index) { remove(row, index) {
this.deletelModal = true; //this.curId = Number(id);
this.curId = Number(id);
this.rowIndex = index; this.rowIndex = index;
this.selectRoutingDetail = row;
let params = {
partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id
};
Api.removeoptasksimluate(params).then(r => {
if (r.success) {
this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1);
}
});
}, },
removeOk() {
alert(this.rowIndex);
this.data1.splice(this.rowIndex, 1);
// Api.delete({ id: this.curId }).then((r) => {
// if (r.success) {
// this.$refs.grid.load()
// this.deletelModal = false
// this.$Message.success('删除成功')
// }
// })
},
removeCancel() {
this.deletelModal = false;
},
//删除工序时间end----- //删除工序时间end-----
cancel() { cancel() {
this.curId = 0; this.curId = 0;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
:high="false" :high="false"
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
:page="false" :page="false"
@on-select="onSelect" @on-selection-change="onSelect"
:batch="true" :batch="true"
:border="false" :border="false"
:easy="false" :easy="false"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<Button type="primary" @click="apsModal=true">APS排产</Button> <Button type="primary" @click="apsModal=true">APS排产</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button type="primary" class="mr10 ml10">移出排产</Button> <Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Expand from './components/excute' import Expand from "./components/excute";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Expand Expand
...@@ -53,294 +53,274 @@ export default { ...@@ -53,294 +53,274 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: 'notes', value: null } keys: { op: "notes", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
deletelModal: false, deletelModal: false,
apsModal: false, apsModal: false,
list: [ list: [],
{
id: 1,
part_task_pk: '2092',
priority: '1',
plan_qty: '6',
spare_qty: '0',
plan_start: '13/03/2020',
plan_finish: '06/04/2020',
notes: '',
demand_start: '17/01/2020',
demand_finish: '24/01/2020',
insert_flag: 0,
badjustflag: '0'
},
{
id: 2,
part_task_pk: '2095',
priority: '2',
plan_qty: '7',
spare_qty: '0',
plan_start: '13/03/2020',
plan_finish: '09/04/2020',
notes: 'null',
demand_start: '17/01/2020',
demand_finish: '24/01/2020',
insert_flag: 1,
badjustflag: '0'
},
{
id: 3,
part_task_pk: '2096',
priority: '3',
plan_qty: '9',
spare_qty: '0',
plan_start: '13/03/2020',
plan_finish: '26/03/2020',
notes: 'null',
demand_start: '20/01/2020',
demand_finish: '24/01/2020',
insert_flag: 0,
badjustflag: '0'
}
],
curId: 0, curId: 0,
columns: [ columns: [
{ {
key: 'move', key: "move",
title: ' ', title: " ",
hide: false, hide: false,
align: 'center', align: "center",
width: 30, width: 30,
render: (h, params) => { render: (h, params) => {
return h('Icon', { return h("Icon", {
attrs: { attrs: {
type: 'md-more', type: "md-more",
size: 18 size: 18
}, },
class: 'drag' class: "drag"
}) });
} }
}, },
{ {
type: 'expand', type: "expand",
width: 50, width: 50,
render: (h, params) => { render: (h, params) => {
return h(Expand, { return h(Expand, {
props: { props: {
rowId: params.row.id rowId: params.row.part_task_pk
} }
}) });
} }
}, },
{ {
key: 'selection', key: "selection",
type: 'selection', type: "selection",
width: 50, width: 50,
align: 'center' align: "center"
}, },
{ {
key: 'id', key: "id",
title: this.l('id'), title: this.l("id"),
hide: true, hide: true,
align: 'left', align: "left",
sortable: true, sortable: true,
width: 50 width: 50
}, },
{ {
key: 'insert_flag', key: "insert_flag",
title: this.l('insert_flag'), title: this.l("insert_flag"),
align: 'center', align: "center",
width: 70, width: 70,
high: true, high: true,
code: 'aps.aps.insert_flag', code: "aps.aps.insert_flag",
category: 'icon' category: "icon"
}, },
{ {
key: 'part_task_pk', key: "part_task_pk",
title: this.l('part_task_pk'), title: this.l("part_task_pk"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'priority', key: "priority",
title: this.l('priority'), title: this.l("priority"),
align: 'left', align: "left",
high: true high: true,
render: (h, params) => {
return h("span", {
},params.index+1);
}
}, },
{ {
key: 'plan_qty', key: "plan_qty",
title: this.l('plan_qty'), title: this.l("plan_qty"),
align: 'left', align: "left",
high: true, high: true,
sortable: true sortable: true
}, },
{ {
key: 'spare_qty', key: "spare_qty",
title: this.l('spare_qty'), title: this.l("spare_qty"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'plan_start', key: "plan_start",
title: this.l('plan_start'), title: this.l("plan_start"),
align: 'center', align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'plan_finish', key: "plan_finish",
title: this.l('plan_finish'), title: this.l("plan_finish"),
align: 'center', align: "center",
high: true, high: true,
sortable: true, sortable: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'notes', key: "notes",
title: this.l('notes'), title: this.l("notes"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
}, },
{ {
key: 'demand_start', key: "demand_start",
title: this.l('demand_start'), title: this.l("demand_start"),
align: 'center', align: "center",
hide: true, hide: true,
resizable: true, resizable: true,
width: 100 width: 100
}, },
{ {
key: 'demand_finish', key: "demand_finish",
title: this.l('demand_finish'), title: this.l("demand_finish"),
align: 'center', align: "center",
high: true, high: true,
resizable: true, resizable: true,
width: 140 width: 140
}, },
{ {
key: 'badjustflag', key: "badjustflag",
title: this.l('badjustflag'), title: this.l("badjustflag"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
title: '操作', title: "操作",
key: 'action', key: "action",
width: 140, width: 140,
align: 'center', align: "center",
// fixed:"right", // fixed:"right",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-options', icon: "md-options",
type: 'icon', type: "icon",
title: '工序参数设置' title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row.id) }
}), }),
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-return-left', icon: "md-return-left",
type: 'icon', type: "icon",
title: '移出排产池', title: "移出排产池",
oprate: 'delete', oprate: "delete",
msg: '确认要移出排产吗?' msg: "确认要移出排产吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.part_task_pk) }
}), }),
h('op', { h("op", {
attrs: { attrs: {
icon: 'md-refresh', icon: "md-refresh",
type: 'icon', type: "icon",
title: '恢复工序', title: "恢复工序",
oprate: 'delete', oprate: "delete",
msg: '确认要恢复工序吗?' msg: "确认要恢复工序吗?"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.refresh(params.row.part_task_pk) }
}) })
]) ]);
} }
} }
] ],
} arrPartPkId:[]
};
}, },
mounted() { mounted() {
console.log(this) this.loadList();
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
//排产池加载数据列表 //排产池加载数据列表
loadList() loadList() {
{ Api.getall().then(res => {
Api.getall().then((res)=>{ if (res.success) {
if(res.success) this.list = res.result;
{
// this.list=res.result
} }
}) });
}, },
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.curId = 0 this.curId = 0;
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
refresh(partPkId) {//恢复工序
remove(id) { let params = {
this.deletelModal = true id: partPkId
this.curId = id };
Api.recoveryoptasksimluate(params).then(r => {
if (r.success) {
this.$Message.success("恢复成功");
}
});
}, },
onSelect(a, b) {}, remove(partPkId) {//移出排产池
removeOk() { let paramsArry = [];
Api.delete({ id: this.curId }).then((r) => { if (partPkId.constructor == Array) {
paramsArry = partPkId;
} else {
paramsArry.push(partPkId);
}
let params={
partPks:paramsArry
}
Api.shiftoutapspool(params).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$Message.success("移出排产池操作成功");
this.deletelModal = false
this.$Message.success('删除成功')
} }
}) });
},
onSelect(a, b) {//批量选择
let selectRows = a;
this.arrPartPkId = [];
selectRows.forEach(e => {
this.arrPartPkId.push(e.part_task_pk);
});
},
removeOk() {//批量选择移出排产池
this.remove(this.arrPartPkId);
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.deletedlModal = false this.deletedlModal = false;
this.apsModal = false this.apsModal = false;
}, },
onDragDrop(a, b) { onDragDrop(a, b) {
this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b])) this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b]));
}, },
openParms(id) { openParms(id) {
this.addModal = true this.addModal = true;
}, },
l(key) { l(key) {
let vkey = 'mes_part_task_plan_simulate' + '.' + key let vkey = "mes_part_task_plan_simulate" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.drag { .drag {
......
...@@ -158,7 +158,8 @@ export default { ...@@ -158,7 +158,8 @@ export default {
title: this.l("urgencyLevel"), title: this.l("urgencyLevel"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
code: "plan.order.urgencyLevel",
}, },
{ {
...@@ -456,10 +457,6 @@ export default { ...@@ -456,10 +457,6 @@ export default {
} }
} }
}); });
this.$router.push({
name: "aps-aps"
// params: { customerId: id }
});
}, },
addOk() { addOk() {
this.$refs.grid.load(); this.$refs.grid.load();
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
getmesorder(params) { getmesorder(params) {
return Api.get(`${aps}/aps/getmesorder`, params); //待排产订单数据 return Api.get(`${apsManualUrl}/aps/getmesorder`, params); //待排产订单数据
}, },
gettaskseqinfo(params) { gettaskseqinfo(params) {
return Api.get(`${aps}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据 return Api.get(`${apsManualUrl}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据
}, },
getlist(params) { getlist(params) {
return Api.get(`${aps}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息 return Api.get(`${apsManualUrl}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息
}, },
getbyshopid(params) { getbyshopid(params) {
return Api.get(`${aps}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息 return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
}, },
getlistEquip(params) { getlistEquip(params) {
return Api.get(`${aps}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备 return Api.get(`${apsManualUrl}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
}, },
getbyequippk(params) { getbyequippk(params) {
return Api.get(`${aps}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息 return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息
}, },
} }
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="addModal=true">新增</Button> <Button type="primary" @click="addModal=true">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="新增" width="800" footer-hide> <Modal v-model="addModal" title="新增" width="800" footer-hide>
<Add @on-close="cancel" @on-ok="addOk" /> <Add @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Edit from './edit' import Edit from "./edit";
import Detail from './detail' import Detail from "./detail";
import Search from './search' import Search from "./search";
import Set from './set' import Set from "./set";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Edit, Edit,
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: 'businessName', value: null } keys: { op: "businessName", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
...@@ -61,200 +61,204 @@ export default { ...@@ -61,200 +61,204 @@ export default {
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'businessName', title: "序号",
title: this.l('businessName'), type: "index",
align: 'left', width: 65,
align: "center"
},
{
key: "businessName",
title: this.l("businessName"),
align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'businessCode', key: "businessCode",
title: this.l('businessCode'), title: this.l("businessCode"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'prefix', key: "prefix",
title: this.l('prefix'), title: this.l("prefix"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'maxSerial', key: "maxSerial",
title: this.l('maxSerial'), title: this.l("maxSerial"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'day', key: "day",
title: this.l('day'), title: this.l("day"),
align: 'left', align: "left",
high: true, high: true,
code: 'mes_xingchi_system.business_code_config.day' code: "mes_xingchi_system.business_code_config.day"
}, },
{ {
key: 'remark', key: "remark",
title: this.l('remark'), title: this.l("remark"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'creationTime', key: "creationTime",
title: this.l('creationTime'), title: this.l("creationTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'creatorUserId', key: "creatorUserId",
title: this.l('creatorUserId'), title: this.l("creatorUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModificationTime', key: "lastModificationTime",
title: this.l('lastModificationTime'), title: this.l("lastModificationTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModifierUserId', key: "lastModifierUserId",
title: this.l('lastModifierUserId'), title: this.l("lastModifierUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'isDeleted', key: "isDeleted",
title: this.l('isDeleted'), title: this.l("isDeleted"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'deletionTime', key: "deletionTime",
title: this.l('deletionTime'), title: this.l("deletionTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'deleterUserId', key: "deleterUserId",
title: this.l('deleterUserId'), title: this.l("deleterUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
title: '操作', title: "操作",
key: 'id', key: "id",
width: 220, width: 220,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'set' oprate: "set"
}, },
on: { click: () => this.set(params.row.id) } on: { click: () => this.set(params.row.id) }
}, },
'设置' "设置"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'detail' oprate: "detail"
}, },
on: { click: () => this.detail(params.row.id) } on: { click: () => this.detail(params.row.id) }
}, },
'查看' "查看"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'detail', oprate: "detail",
class: 'edit' class: "edit"
}, },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}, },
'编辑' "编辑"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'delete', oprate: "delete",
class: 'remove' class: "remove"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}, },
'删除' "删除"
) )
]) ]);
} }
} }
] ]
} };
},
mounted() {
}, },
mounted() {},
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
await store.dispatch('loadDictionary') // 加载数据字典
}, },
methods: { methods: {
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.setModal = false this.setModal = false;
this.curId = 0 this.curId = 0;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
set(id) { set(id) {
this.setModal = true this.setModal = true;
this.curId = id this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true this.deletelModal = true;
this.curId = id this.curId = id;
}, },
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.deletedlModal = false this.deletedlModal = false;
this.setModal = false this.setModal = false;
}, },
l(key) { l(key) {
/* /*
...@@ -278,11 +282,11 @@ export default { ...@@ -278,11 +282,11 @@ export default {
deleterUserId:'', deleterUserId:'',
} }
*/ */
let vkey = 'business_code_config' + '.' + key let vkey = "business_code_config" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -451,7 +451,7 @@ export default { ...@@ -451,7 +451,7 @@ export default {
let parms = { let parms = {
userId: this.curId, userId: this.curId,
accountId: this.selectRow.accountId, accountId: this.selectRow.accountId,
tanantCode: this.$store.state.userInfo.tanantCode, tanantCode: util.cookies.get('tanantCode'),
isDeleted: true isDeleted: true
}; };
Api.authAccount(parms).then(res => { Api.authAccount(parms).then(res => {
...@@ -604,7 +604,8 @@ export default { ...@@ -604,7 +604,8 @@ export default {
userId: this.selectRow.id, userId: this.selectRow.id,
loginName: this.selectRow.phone, loginName: this.selectRow.phone,
status: this.selectRow.status, status: this.selectRow.status,
tanantCode: this.$store.state.userInfo.tanantCode tanantCode:util.cookies.get('tanantCode'),
//tanantCode: this.$store.state.userInfo.tanantCode
}; };
if (this.selectRow.phone && this.selectRow.phone != "") { if (this.selectRow.phone && this.selectRow.phone != "") {
Api.authAccount(parms).then(res => { Api.authAccount(parms).then(res => {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<Filed :span="12" :name="l('name')">{{entity.name}} </Filed> <Filed :span="12" :name="l('name')">{{entity.name}} </Filed>
<Filed :span="12" :name="l('userId')"><User :value="entity.userId" /></Filed> <Filed :span="12" :name="l('userId')"><User :value="entity.userId" /></Filed>
<Filed :span="12" :name="l('proceeds')">{{entity.proceeds}}</Filed> <Filed :span="12" :name="l('proceeds')">{{entity.proceeds}}</Filed>
<Filed :span="12" :name="l('status')"><state code="crm.contract.status" :value="entity.status" type="text"></state></Filed> <Filed :span="24" :name="l('status')"><state code="crm.contract.status" :value="entity.status" type="text"></state></Filed>
<Filed :span="24" :name="l('accessory')"><files ref="refFile" :parms="parms" unClosable style="display:inline" /></Filed> <Filed :span="24" :name="l('accessory')"><files ref="refFile" :parms="parms" unClosable style="display:inline" /></Filed>
<Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed> <Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed>
</Row> </Row>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<Filed :span="12" :name="l('status')"> <Filed :span="12" :name="l('status')">
<state code="crm.project.status" :value="entity.status" /> <state code="crm.project.status" :value="entity.status" />
</Filed> </Filed>
<Filed :span="12" :name="l('budget')">{{entity.budget}}</Filed> <Filed :span="24" :name="l('budget')">{{entity.budget}}</Filed>
<Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed> <Filed :span="24" :name="l('notes')">{{entity.notes}}</Filed>
</Row> </Row>
</div> </div>
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<Modal v-model="editModal" title="编辑" footer-hide> <Modal v-model="editModal" title="编辑" footer-hide>
<Edit :eid="curId" @on-close="cancel" @on-ok="addOk" /> <Edit :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="detailModal" title="详情"> <Modal v-model="detailModal" title="详情" footer-hide>
<Detail :eid="curId" /> <Detail :eid="curId" />
</Modal> </Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel"> <Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
......
...@@ -79,9 +79,9 @@ ...@@ -79,9 +79,9 @@
</Form> </Form>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
disabled: false, disabled: false,
...@@ -94,15 +94,15 @@ export default { ...@@ -94,15 +94,15 @@ export default {
stage: 1 stage: 1
}, },
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }] name: [{ required: true, message: "必填", trigger: "blur" }]
}, },
parms: { parms: {
app: 'Follow', app: "Follow",
eid: null, eid: null,
name: '', name: "",
field: '' field: ""
} }
} };
}, },
props: { props: {
v: Object, v: Object,
...@@ -113,67 +113,67 @@ export default { ...@@ -113,67 +113,67 @@ export default {
} }
}, },
mounted() { mounted() {
this.parms.eid = this.$u.guid() this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles() this.$refs.refFile.intFiles();
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.entity.accessory = '' this.entity.accessory = "";
if (this.$refs.refFile.nameList.length > 0) { if (this.$refs.refFile.nameList.length > 0) {
let nameList = this.$refs.refFile.nameList let nameList = this.$refs.refFile.nameList;
let names = [] let names = [];
nameList.forEach((e) => { nameList.forEach(e => {
names.push(e.fileName) names.push(e.fileName);
}) });
this.entity.accessory = JSON.stringify(names) this.entity.accessory = JSON.stringify(names)
.replace('[', '') .replace("[", "")
.replace(']', '') .replace("]", "")
.replace(/\"/g, '') //附件本地库暂存文件名称 .replace(/\"/g, ""); //附件本地库暂存文件名称
} }
this.disabled = true this.disabled = true;
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then(r => {
this.disabled = false this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.$emit('on-ok') this.$emit("on-ok");
} else { } else {
this.$Message.error('保存失败') this.$Message.error("保存失败");
} }
this.$refs.refFile.intFiles() this.$refs.refFile.intFiles();
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
}) })
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
} }
}) });
}, },
handleClose() { handleClose() {
this.$emit('on-close') this.$emit("on-close");
}, },
l(key) { l(key) {
key = 'Follow' + '.' + key key = "Follow" + "." + key;
return this.$t(key) return this.$t(key);
} }
}, },
watch: { watch: {
'addId.projectId'(v) { "addId.projectId"(v) {
if (v > 0) { if (v > 0) {
this.entity.projectId = v this.entity.projectId = v;
} }
}, },
'addId.customerId'(v) { "addId.customerId"(v) {
if (v > 0) { if (v > 0) {
this.entity.customerId = v this.entity.customerId = v;
} }
}, },
'addId.principal'(v) { "addId.principal"(v) {
this.entity.principal = v this.entity.principal = v;
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<Modal v-model="editModal" title="编辑" footer-hide> <Modal v-model="editModal" title="编辑" footer-hide>
<Edit :eid="curId" @on-close="cancel" @on-ok="addOk" /> <Edit :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="detailModal" title="详情"> <Modal v-model="detailModal" title="详情" footer-hide>
<Detail :eid="curId" /> <Detail :eid="curId" />
</Modal> </Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel"> <Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
...@@ -290,6 +290,7 @@ export default { ...@@ -290,6 +290,7 @@ export default {
}, },
watch: { watch: {
stage(v) { stage(v) {
this.isactive = null;
this.getList(v); this.getList(v);
}, },
"easySearch.projectId.value"(v) { "easySearch.projectId.value"(v) {
......
...@@ -212,9 +212,9 @@ export default { ...@@ -212,9 +212,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
orderExecuteMovie: this.datafrom orderExecuteMovie: this.datafrom
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -193,9 +193,9 @@ export default { ...@@ -193,9 +193,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
orderExecutePausecause: this.cardModeldata orderExecutePausecause: this.cardModeldata
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -185,9 +185,9 @@ export default { ...@@ -185,9 +185,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
orderExecuteQualityMovie: this.datafrom orderExecuteQualityMovie: this.datafrom
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -240,9 +240,9 @@ export default { ...@@ -240,9 +240,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
OrderExecuteQualityData: this.datafrom OrderExecuteQualityData: this.datafrom
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -202,9 +202,9 @@ export default { ...@@ -202,9 +202,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
OrderExecuteQualityData: this.datafrom OrderExecuteQualityData: this.datafrom
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -202,9 +202,9 @@ export default { ...@@ -202,9 +202,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
orderExecuteFiles: this.cardModeldata orderExecuteFiles: this.cardModeldata
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -499,11 +499,11 @@ export default { ...@@ -499,11 +499,11 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
dispatch_id: this.datasearch.entryID, dispatch_id: this.datasearch.entryID,
order_id: this.datasearch.order_id, order_id: this.datasearch.order_id,
list: datalist list: datalist
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
if (state) { if (state) {
var url = `${PlanUrl}/ordercheckresult/sendcheck` var url = `${PlanUrl}/ordercheckresult/sendcheck`
service service
.post(`${url}`, JSON.stringify(this.user)) .post(`${url}`, this.user)
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
} }
service service
.post(`${systemUrl}/user/list`, JSON.stringify(params)) .post(`${systemUrl}/user/list`, params)
.then((response) => { .then((response) => {
if (response.result.length > 0) { if (response.result.length > 0) {
this.user.user_name = response.result[0].userName this.user.user_name = response.result[0].userName
...@@ -139,10 +139,10 @@ export default { ...@@ -139,10 +139,10 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
user: this.user, user: this.user,
card: this.recordList card: this.recordList
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
} }
this.product_ID.push(fillModel.product_ID) this.product_ID.push(fillModel.product_ID)
console.log(fillModel.board_ID);
this.board_ID.push(fillModel.board_ID) this.board_ID.push(fillModel.board_ID)
if ( if (
fillModel.fill_in_user_type == 1 || fillModel.fill_in_user_type == 1 ||
...@@ -238,9 +238,10 @@ export default { ...@@ -238,9 +238,10 @@ export default {
}, },
getCurrentUser(e) { getCurrentUser(e) {
if (e) { if (e) {
let userInfo = this.$store.admin.user.info; let userInfo = this.$store.state.userInfo;
console.log(userInfo);
this.user.cardno = userInfo.login_id this.user.cardno = userInfo.login_id
this.user.user_name = localStorage.getItem('userName') this.user.user_name = userInfo.name
this.user.user_id = userInfo.userId this.user.user_id = userInfo.userId
} else { } else {
this.user.cardno = '' this.user.cardno = ''
......
...@@ -541,11 +541,11 @@ export default { ...@@ -541,11 +541,11 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
id: row.id, id: row.id,
orderid: this.data.orderIDs, orderid: this.data.orderIDs,
time: null time: null
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
...@@ -566,11 +566,11 @@ export default { ...@@ -566,11 +566,11 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
id: row.id, id: row.id,
orderid: this.data.orderIDs, orderid: this.data.orderIDs,
time: null time: null
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -65,6 +65,12 @@ export default { ...@@ -65,6 +65,12 @@ export default {
curId: 0, curId: 0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{
title: "序号",
type: "index",
width: 40,
align: "center"
},
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
...@@ -329,14 +335,12 @@ export default { ...@@ -329,14 +335,12 @@ export default {
{ {
key: "remark", key: "remark",
title: this.l("remark"), title: this.l("remark"),
align: "left", align: "center"
easy: true,
high: true
}, },
{ {
title: "暂停记录", title: "暂停记录",
key: "id", key: "zanting",
width: 140, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -353,7 +357,7 @@ export default { ...@@ -353,7 +357,7 @@ export default {
}, },
{ {
title: "操作", title: "操作",
key: "id", key: "caozuo",
width: 100, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
...@@ -385,7 +389,7 @@ export default { ...@@ -385,7 +389,7 @@ export default {
params.row.status == 6 ? "Button" : "", //订单状态执行中,暂停 params.row.status == 6 ? "Button" : "", //订单状态执行中,暂停
{ {
props: { props: {
type: "default", type: "success",
size: "small", size: "small",
icon: "ios-pause", icon: "ios-pause",
ghost: true ghost: true
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Detail from './detail' import Detail from "./detail";
export default { export default {
name: 'record', name: "record",
components: { components: {
Detail Detail
}, },
...@@ -19,24 +19,30 @@ export default { ...@@ -19,24 +19,30 @@ export default {
detailModal: false, detailModal: false,
action: Api.record, action: Api.record,
condition: { condition: {
orderId: { op: 'Equal', value: this.eid }, orderId: { op: "Equal", value: this.eid },
keys: { op: 'pauseCause,', value: null } keys: { op: "pauseCause,", value: null }
}, },
data: [], data: [],
curId: 0, curId: 0,
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'mesCode', title: "序号",
title: this.l('mesCode'), type: "index",
align: 'left', width: 60,
align: "center"
},
{
key: "mesCode",
title: this.l("mesCode"),
align: "left",
render: (h, params) => render: (h, params) =>
h( h(
'a', "a",
{ {
attrs: { attrs: {
oprate: 'detail' oprate: "detail"
}, },
on: { click: () => this.detail(params.row.id) } on: { click: () => this.detail(params.row.id) }
}, },
...@@ -44,9 +50,9 @@ export default { ...@@ -44,9 +50,9 @@ export default {
) )
}, },
{ {
key: 'productName', key: "productName",
title: this.l('productName'), title: this.l("productName"),
align: 'left' align: "left"
}, },
// { // {
// key: 'orderId', // key: 'orderId',
...@@ -55,92 +61,86 @@ export default { ...@@ -55,92 +61,86 @@ export default {
// hide: false // hide: false
// }, // },
{ {
key: 'pauseCause', key: "pauseCause",
title: this.l('pauseCause'), title: this.l("pauseCause"),
align: 'left', align: "left",
code: 'mes_xingchi_plan.order_material.pauseCause' code: "mes_xingchi_plan.order_material.pauseCause"
}, },
{ {
key: 'creationTime', key: "creationTime",
title: this.l('creationTime'), title: this.l("creationTime"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'creator', key: "creator",
title: this.l('creator'), title: this.l("creator"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'laster', key: "laster",
title: this.l('laster'), title: this.l("laster"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModificationTime', key: "lastModificationTime",
title: this.l('lastModificationTime'), title: this.l("lastModificationTime"),
easy: true, easy: true,
high: true, high: true,
align: 'left', align: "left",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
params.row.lastModificationTime == '0001-01-01 00:00:00' params.row.lastModificationTime == "0001-01-01 00:00:00"
? '' ? ""
: params.row.lastModificationTime : params.row.lastModificationTime
) );
} }
}, },
// {
// key: 'path',
// title: this.l('path'),
// easy: true,
// high: true,
// align: 'left'
// },
{ {
key: 'relatedPerson', key: "relatedPerson",
type: 'user', type: "user",
title: this.l('relatedPerson'), title: this.l("relatedPerson"),
align: 'left', align: "left",
high: true high: true
} }
] ]
} };
}, },
props: { props: {
eid: Number eid: Number
}, },
created() {}, created() {},
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
l(key) { l(key) {
let vkey = 'order_pause' + '.' + key let vkey = "order_pause" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
} }
}, },
watch: { watch: {
eid(v) { eid(v) {
this.condition.orderId.value = v this.condition.orderId.value = v;
this.$refs.grid.reload(this.condition) this.$refs.grid.reload(this.condition);
} }
} }
} };
</script> </script>
<style lang='less'> <style lang='less'>
</style> </style>
\ No newline at end of file
...@@ -4,125 +4,125 @@ ...@@ -4,125 +4,125 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: '', name: "",
data() { data() {
return { return {
columns: [ columns: [
{ {
key: 'detailId', key: "detailId",
title: this.l('detailId'), title: this.l("detailId"),
align: 'left' align: "center"
}, },
{ {
key: 'taskSeq', key: "taskSeq",
title: this.l('taskSeq'), title: this.l("taskSeq"),
align: 'left' align: "center"
}, },
{ {
key: 'detailName', key: "detailName",
title: this.l('detailName'), title: this.l("detailName"),
align: 'left' align: "left"
}, },
{ {
key: 'routingCode', key: "routingCode",
title: this.l('routingCode'), title: this.l("routingCode"),
align: 'left' align: "center"
}, },
{ {
key: 'userNames', key: "userNames",
title: this.l('userNames'), title: this.l("userNames"),
align: 'left' align: "center"
}, },
{ {
key: 'demandStartDate', key: "demandStartDate",
title: this.l('demandStartDate'), title: this.l("demandStartDate"),
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
this.sliceStr(params.row.demandStartDate + ' ', 0, 10), this.sliceStr(params.row.demandStartDate + " ", 0, 10),
params.row.demandStartDate params.row.demandStartDate
) );
} }
}, },
{ {
key: 'demandFinishDate', key: "demandFinishDate",
title: this.l('demandFinishDate'), title: this.l("demandFinishDate"),
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
this.sliceStr(params.row.demandFinishDate + ' ', 0, 10), this.sliceStr(params.row.demandFinishDate + " ", 0, 10),
params.row.demandFinishDate params.row.demandFinishDate
) );
} }
}, },
{ {
key: 'actualStartDate', key: "actualStartDate",
title: this.l('actualStartDate'), title: this.l("actualStartDate"),
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10), // this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params.row.actualStartDate == '0001-01-01 00:00:00' params.row.actualStartDate == "0001-01-01 00:00:00"
? '' ? ""
: params.row.actualStartDate : params.row.actualStartDate
) );
} }
}, },
{ {
key: 'actualFinishDate', key: "actualFinishDate",
title: this.l('actualFinishDate'), title: this.l("actualFinishDate"),
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10), // this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params.row.actualFinishDate == '0001-01-01 00:00:00' params.row.actualFinishDate == "0001-01-01 00:00:00"
? '' ? ""
: params.row.actualFinishDate : params.row.actualFinishDate
) );
} }
}, },
{ {
key: 'status', key: "status",
type: 'user', type: "user",
title: this.l('status'), title: this.l("status"),
code: 'plan.order.status', code: "plan.order.status",
align: 'left' align: "center"
} }
] ]
} };
}, },
props: { props: {
result: Array result: Array
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() {}, created() {},
methods: { methods: {
//截取字符串 //截取字符串
sliceStr(str, lenS, lenE) { sliceStr(str, lenS, lenE) {
return str.slice(lenS, lenE) return str.slice(lenS, lenE);
}, },
l(key) { l(key) {
let vkey = 'mes_order_watch' + '.' + key let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang='less'> <style lang='less'>
</style> </style>
\ No newline at end of file
...@@ -402,7 +402,7 @@ th.conciseContent .ivu-table-cell { ...@@ -402,7 +402,7 @@ th.conciseContent .ivu-table-cell {
padding: 0px !important; padding: 0px !important;
} }
.ivu-table-cell { .ivu-table-cell {
padding: 0px !important; /* padding: 0px !important; */
} }
</style>> </style>>
...@@ -458,7 +458,7 @@ export default { ...@@ -458,7 +458,7 @@ export default {
this.recordColumn = [ this.recordColumn = [
{ {
type: "index", type: "index",
width: 60, width: 65,
title: "序号", title: "序号",
align: "center" align: "center"
}, },
......
<template id="producttree"> <template id="producttree">
<div> <div>
<div class="contentRight" :style="{height:divHeihgt}"> <div class="contentRight" :style="{height:divHeihgt}">
<div class="clear"> <div class="clear">
<Row><Col span="8"> <Input search enter-button placeholder="产品名称" v-model="productName" @on-search="search" style="width:290px;" /></Col><Col span="16"> <Row>
<div style="float:right" class="paddingbtn"> <Col span="8">
<Button type="primary" @click="add">新增产品</Button> <Input
<Button type="primary" @click="addclass">层级类型</Button> search
<!-- <Button type="primary" @click="del">阶段</Button> --> enter-button
placeholder="产品名称"
v-model="productName"
@on-search="search"
style="width:290px;"
/>
</Col>
<Col span="16">
<div style="float:right" class="paddingbtn">
<Button type="primary" @click="add">新增产品</Button>
<Button type="primary" @click="addclass">层级类型</Button>
<!-- <Button type="primary" @click="del">阶段</Button> -->
</div>
</Col>
</Row>
</div>
<div class>
<tree-grid :items="data" :columns="columns" @on-row-click="rowClick"></tree-grid>
</div> </div>
</Col></Row>
</div>
<div class="">
<tree-grid :items="data" :columns="columns" @on-row-click="rowClick"></tree-grid>
</div>
</div> </div>
<Modal v-model="modal0" title="添加/编辑产品" :width="800" :mask-closable="false" :loading="myloading" <Modal
ok-text="保存" cancel-text="取消" @on-ok="ok0('ProcuctformValidate')" @on-cancel='cancel0'> v-model="modal0"
title="添加/编辑产品"
:width="800"
:mask-closable="false"
:loading="myloading"
ok-text="保存"
cancel-text="取消"
@on-ok="ok0('ProcuctformValidate')"
@on-cancel="cancel0"
>
<add-product ref="addproduct"></add-product> <add-product ref="addproduct"></add-product>
<!-- <div slot="footer" style="text-align:center"> <!-- <div slot="footer" style="text-align:center">
<Button type="primary" @click="ok0('ProcuctformValidate')">保存</Button> <Button type="primary" @click="ok0('ProcuctformValidate')">保存</Button>
...@@ -24,22 +45,30 @@ ...@@ -24,22 +45,30 @@
style="border-color: rgb(204, 204, 204);background-color:white;color:black" style="border-color: rgb(204, 204, 204);background-color:white;color:black"
@click="cancel0" @click="cancel0"
>取消</Button> >取消</Button>
</div> --> </div>-->
</Modal> </Modal>
<Modal v-model="modal1" title="层级类型" :width="800" :mask-closable="false"> <Modal v-model="modal1" title="层级类型" :width="800" :mask-closable="false">
<div @click="cancelClick"> <div @click="cancelClick">
<div class="clear"> <div class="clear">
<Button type="primary" @click="addchild" style="float:right">新增</Button> <Button type="primary" @click="addchild" style="float:right">新增</Button>
</div> </div>
<div class="martop10"> <div class="martop10">
<!-- <tb :tbPro="tbPro"></tb> --> <!-- <tb :tbPro="tbPro"></tb> -->
<tree-grid :items="leveldata" :columns="levelcolumns" @on-row-click="levelrowClick"></tree-grid> <tree-grid :items="leveldata" :columns="levelcolumns" @on-row-click="levelrowClick"></tree-grid>
</div> </div>
</div> </div>
</Modal> </Modal>
<Modal v-model="modal2" title="新增层级类型" :width="440" :mask-closable="false" :loading="myloading" <Modal
ok-text="保存" cancel-text="取消" @on-ok="ok('formValidate')" @on-cancel='cancel'> v-model="modal2"
title="新增层级类型"
:width="440"
:mask-closable="false"
:loading="myloading"
ok-text="保存"
cancel-text="取消"
@on-ok="ok('formValidate')"
@on-cancel="cancel"
>
<add ref="addclass"></add> <add ref="addclass"></add>
<!-- <div slot="footer" style="text-align:center"> <!-- <div slot="footer" style="text-align:center">
<Button type="primary" @click="ok('formValidate')">保存</Button> <Button type="primary" @click="ok('formValidate')">保存</Button>
...@@ -48,47 +77,49 @@ ...@@ -48,47 +77,49 @@
style="border-color: rgb(204, 204, 204);background-color:white;color:black" style="border-color: rgb(204, 204, 204);background-color:white;color:black"
@click="cancel" @click="cancel"
>取消</Button> >取消</Button>
</div> --> </div>-->
</Modal> </Modal>
<myconfirm ref="mysel0" v-on:confirmok="myselok" v-on:confirmcancel="myselcancel"></myconfirm> <myconfirm ref="mysel0" v-on:confirmok="myselok" v-on:confirmcancel="myselcancel"></myconfirm>
<myconfirm ref="mysel" v-on:confirmok="ok3" v-on:confirmcancel="cancel3"></myconfirm> <myconfirm ref="mysel" v-on:confirmok="ok3" v-on:confirmcancel="cancel3"></myconfirm>
<myconfirm ref="mysel1" v-on:confirmok="copyok" v-on:confirmcancel="copycancel"> <myconfirm ref="mysel1" v-on:confirmok="copyok" v-on:confirmcancel="copycancel">
<div slot="confimcon"><p>确认要复制此节点及其子节点吗?</p></div> <div slot="confimcon">
<p>确认要复制此节点及其子节点吗?</p>
</div>
</myconfirm> </myconfirm>
</div> </div>
</template> </template>
<script> <script>
import treeGrid from '@/components/treeGrid' import treeGrid from "@/components/treeGrid";
import tb from '../../basicData/roleManagent/components/tb' import tb from "../../basicData/roleManagent/components/tb";
import add from './addclass' import add from "./addclass";
import addProduct from './addproduct' import addProduct from "./addproduct";
import myconfirm from './components/myconfirm' import myconfirm from "./components/myconfirm";
import service from '@/plugins/request' import service from "@/plugins/request";
export default { export default {
components: { treeGrid,tb,add ,addProduct,myconfirm}, components: { treeGrid, tb, add, addProduct, myconfirm },
data() { data() {
return { return {
myloading:true, myloading: true,
productName:'', productName: "",
model1:'', model1: "",
divHeihgt:"", divHeihgt: "",
modal0:false, modal0: false,
isedit0:false, isedit0: false,
modal1:false, modal1: false,
modal2:false, modal2: false,
modal3:false, modal3: false,
isedit:false, isedit: false,
formValidate0:{}, formValidate0: {},
formValidate1:{}, formValidate1: {},
pid:0, pid: 0,
lid:0, lid: 0,
delName:'', delName: "",
cilckListRowData:{}, cilckListRowData: {},
productClassType:-1, productClassType: -1,
upProductId:-1, upProductId: -1,
clickindex:-1, clickindex: -1,
clickindexLevel:-1, clickindexLevel: -1,
clickindexLevelData:{}, clickindexLevelData: {},
//产品树列 //产品树列
columns: [ columns: [
// { // {
...@@ -100,72 +131,74 @@ export default { ...@@ -100,72 +131,74 @@ export default {
// hidden: true // hidden: true
// }, // },
{ {
title: '产品分类/名称', title: "产品分类/名称",
key: 'name' key: "name"
}, },
{ {
title: '层级类型', title: "层级类型",
key: 'upName' key: "upName"
}, },
{ {
title: '产品图号', title: "产品图号",
key: 'drawingNo' key: "drawingNo"
}, },
{ {
title: '物料编号', title: "物料编号",
key: 'mmcode' key: "mmcode"
}, },
{ {
title: '主承制单位', title: "主承制单位",
key: 'madeCompanyName' key: "madeCompanyName"
}, },
{ {
title: '操作', title: "操作",
type: 'action', type: "action",
width:150, width: 150,
actions: [ actions: [
{ {
oprate: 'edit', oprate: "edit",
text: '编辑', text: "编辑",
class: 'edit', class: "edit"
}, },
{ {
oprate: 'delete', oprate: "delete",
text: '删除', text: "删除",
class: 'remove', class: "remove"
} }
], ]
} }
], ],
data: [], data: [],
//层级类型列 //层级类型列
leveldata:[], leveldata: [],
levelcolumns:[ levelcolumns: [
{ {
title: '类型名称', title: "类型名称",
key: 'name' key: "name"
}, },
{ {
title: '上级类型名称', title: "上级类型名称",
key: 'upName' key: "upName"
}, },
{ {
title: '操作', title: "操作",
type: 'action', type: "action",
width: 150, width: 150,
actions: [{ actions: [
oprate: 'detail', {
text: '编辑', oprate: "detail",
class: 'edit', text: "编辑",
}, { class: "edit"
oprate: 'delete', },
text: '删除', {
class: 'remove', oprate: "delete",
}], text: "删除",
class: "remove"
}
]
} }
], ]
// tbPro:{ // tbPro:{
// isBorder: true, // isBorder: true,
// stripe: true, // stripe: true,
...@@ -216,343 +249,371 @@ export default { ...@@ -216,343 +249,371 @@ export default {
// ], // ],
// data: [] // data: []
// } // }
} };
}, },
methods: { methods: {
search(){ search() {
var name=this.productName var name = this.productName;
this.loadProduct(name) this.loadProduct(name);
}, },
//新增产品 //新增产品
add() { add() {
this.isedit0=false; this.isedit0 = false;
this.$refs.addproduct.selectdata=[] this.$refs.addproduct.selectdata = [];
this.$refs.addproduct.list=[] this.$refs.addproduct.list = [];
this.$refs.addproduct.$refs['ProcuctformValidate'].resetFields(); this.$refs.addproduct.$refs["ProcuctformValidate"].resetFields();
//如果是选中一行新增,判断是不是最下面的层级或者是产品 //如果是选中一行新增,判断是不是最下面的层级或者是产品
let bl=false; let bl = false;
this.upProductId=-1; this.upProductId = -1;
this.productClassType=-1; this.productClassType = -1;
let data=this.cilckListRowData; let data = this.cilckListRowData;
console.log(data) console.log(data);
if(data.id) if (data.id) {
{ this.$refs.addproduct.formValidate.classType = data.id;
this.$refs.addproduct.formValidate.classType=data.id this.productClassType = data.id;
this.productClassType=data.id; this.$refs.addproduct.list.push({ label: data.name, value: data.id });
this.$refs.addproduct.list.push({label:data.name,value:data.id}) if (data.isProduct > 0) {
if(data.isProduct>0){ bl = true;
bl=true this.upProductId = data.id;
this.upProductId=data.id //this.$refs.addproduct.formValidate.classType=-1
//this.$refs.addproduct.formValidate.classType=-1 this.productClassType = -1;
this.productClassType=-1; } else {
}else{ if (data.children == null) {
if(data.children==null) bl = true;
{ this.upProductId = 0;
bl=true } else {
this.upProductId=0 bl = this.checkProduct(data.children);
} if (bl) {
else{ this.upProductId = 0;
bl=this.checkProduct(data.children)
if(bl){this.upProductId=0}
} }
} }
if(!bl){ }
this.$Message.error('请选择最下面的层级或产品') if (!bl) {
return; this.$Message.error("请选择最下面的层级或产品");
} return;
}
} }
this.modal0=true; this.modal0 = true;
this.$refs.addproduct.formValidate.disabled=false this.$refs.addproduct.formValidate.disabled = false;
delete this.$refs.addproduct.formValidate.id; delete this.$refs.addproduct.formValidate.id;
//新增产品时的层级树 //新增产品时的层级树
var that=this; var that = this;
var url=`${designUrl}/productlevel/getallselecttreenew` var url = `${designUrl}/productlevel/getallselecttreenew`;
service.get(`${url}`).then(response=>{ service.get(`${url}`).then(response => {
that.$refs.addproduct.data1 = response.result;
that.$refs.addproduct.data1=(response.result) });
})
}, },
rowClick(data, event, index, txt){ rowClick(data, event, index, txt) {
this.cilckListRowData=data; this.cilckListRowData = data;
console.log(data) console.log(data);
if(txt=="编辑"){ if (txt == "编辑") {
if(data.isProduct>0){ if (data.isProduct > 0) {
this.isedit0=true; this.isedit0 = true;
this.modal0=true; this.modal0 = true;
let {name,drawingNo,remark,mmcode,madeCompany,classType}=data let {
name,
drawingNo,
remark,
mmcode,
madeCompany,
classType
} = data;
//let classType=data.levelName //let classType=data.levelName
this.$refs.addproduct.list=[] this.$refs.addproduct.list = [];
this.$refs.addproduct.list.push({label:data.upName,value:classType}) this.$refs.addproduct.list.push({
this.$refs.addproduct.componaylist=[] label: data.upName,
this.$refs.addproduct.componaylist.push({label:data.madeCompanyName,value:madeCompany}) value: classType
this.$refs.addproduct.formValidate={classType: classType, name: name,drawingNo:drawingNo, });
supportsum:1,madeCompany:madeCompany, remark:remark,mmcode:mmcode,disabled:true,id:data.id} this.$refs.addproduct.componaylist = [];
} this.$refs.addproduct.componaylist.push({
else{ label: data.madeCompanyName,
this.isedit=true value: madeCompany
this.modal2=true; });
let {name,upId,upName}=data this.$refs.addproduct.formValidate = {
this.$refs.addclass.list=[] classType: classType,
this.$refs.addclass.list.push({label:upName,value:upId}) name: name,
this.$refs.addclass.formValidate={name:name,upid:upId,upname:upName,id:data.id,disabled:true} drawingNo: drawingNo,
supportsum: 1,
madeCompany: madeCompany,
remark: remark,
mmcode: mmcode,
disabled: true,
id: data.id
};
} else {
this.isedit = true;
this.modal2 = true;
let { name, upId, upName } = data;
this.$refs.addclass.list = [];
this.$refs.addclass.list.push({ label: upName, value: upId });
this.$refs.addclass.formValidate = {
name: name,
upid: upId,
upname: upName,
id: data.id,
disabled: true
};
} }
} }
if(txt=="删除"){ if (txt == "删除") {
if(data.isProduct>0){ if (data.isProduct > 0) {
//this.$Message.error('暂时不能删除产品'); //this.$Message.error('暂时不能删除产品');
// return // return
this.modal3=true; this.modal3 = true;
this.$refs.mysel.confirmmodal=this.modal3 this.$refs.mysel.confirmmodal = this.modal3;
this.pid=data.id this.pid = data.id;
this.delName="产品" this.delName = "产品";
} } else {
else{ var i = data.children.length;
var i=data.children.length; this.lid = data.id;
this.lid=data.id this.delName = "层级";
this.delName="层级" if (i > 0) {
if(i>0){ this.$Message.error("层级下有子节点,请先删除子节点!");
this.$Message.error('层级下有子节点,请先删除子节点!') return;
return;
} }
this.modal3=true; this.modal3 = true;
this.$refs.mysel.confirmmodal=this.modal3 this.$refs.mysel.confirmmodal = this.modal3;
} }
} }
if(txt=="复制"){ if (txt == "复制") {
this.$refs.mysel1.confirmmodal=true this.$refs.mysel1.confirmmodal = true;
} }
}, },
del() {}, del() {},
//产品列表 //产品列表
loadProduct(seoName){ loadProduct(seoName) {
var url=`${designUrl}/productlevel/getproducttreenew` var url = `${designUrl}/productlevel/getproducttreenew`;
service.get(`${url}`,{seoName: seoName}).then(response=>{ service.get(`${url}`, { seoName: seoName }).then(response => {
this.data=response.result this.data = response.result;
}) });
}, },
//保存产品 //保存产品
checkProduct(data){ checkProduct(data) {
var j=0; var j = 0;
var bl=false; var bl = false;
data.forEach((item,i)=>{ data.forEach((item, i) => {
if(item.isProduct==1){ if (item.isProduct == 1) {
j++ j++;
} }
}) });
if(data.length==j){ if (data.length == j) {
bl=true bl = true;
} }
return bl return bl;
}, },
ok0(name){ ok0(name) {
this.$refs.addproduct.$refs[name].validate((valid) => { this.$refs.addproduct.$refs[name].validate(valid => {
if (valid) { if (valid) {
if (this.isedit0) { if (this.isedit0) {
} else { } else {
// console.log(1) // console.log(1)
var bl=false var bl = false;
var bl1=false var bl1 = false;
var selectId=-1; var selectId = -1;
var sel=this.$refs.addproduct.selectdata var sel = this.$refs.addproduct.selectdata;
console.log(sel) console.log(sel);
if(sel.length>0){ if (sel.length > 0) {
bl1=true bl1 = true;
//是产品 //是产品
if(sel[0].isProduct>0){ if (sel[0].isProduct > 0) {
bl=true bl = true;
selectId=sel[0].productId selectId = sel[0].productId;
this.$refs.addproduct.formValidate.classType=-1 this.$refs.addproduct.formValidate.classType = -1;
}else{ } else {
if(sel[0].children==null) if (sel[0].children == null) {
{ bl = true;
bl=true selectId = 0;
selectId=0 } else {
} bl = this.checkProduct(sel[0].children);
else{ if (bl) {
bl=this.checkProduct(sel[0].children) selectId = 0;
if(bl){selectId=0} }
} }
} }
if(!bl){ if (!bl) {
this.$Message.error('请选择最下面的层级或产品') this.$Message.error("请选择最下面的层级或产品");
return; return;
} }
} }
} }
this.formValidate0 = this.$refs.addproduct.formValidate this.formValidate0 = this.$refs.addproduct.formValidate;
if(!this.isedit0){ if (!this.isedit0) {
if(bl1){ if (bl1) {
this.formValidate0.upId=selectId this.formValidate0.upId = selectId;
} } else {
else{ this.formValidate0.upId = this.upProductId;
this.formValidate0.upId=this.upProductId console.log(this.formValidate0.upId);
console.log(this.formValidate0.upId) console.log(this.formValidate0);
console.log(this.formValidate0) this.formValidate0.classType = this.productClassType;
this.formValidate0.classType=this.productClassType
} }
} }
var url=`${designUrl}/productinfo/createorupdate` var url = `${designUrl}/productinfo/createorupdate`;
service.post(`${url}`,JSON.stringify({ProductInfo:this.formValidate0})).then(response=>{ service
if(response.success){ .post(`${url}`, JSON.stringify({ ProductInfo: this.formValidate0 }))
this.$Message.success('保存成功') .then(response => {
this.loadProduct() if (response.success) {
//this.loadlevel() this.$Message.success("保存成功");
this.modal0 = false this.loadProduct();
} //this.loadlevel()
}).catch(error=>{ this.modal0 = false;
this.$Message.error('保存失败') }
}) })
.catch(error => {
this.$Message.error("保存失败");
});
} else { } else {
setTimeout(() => { setTimeout(() => {
this.myloading = false this.myloading = false;
this.$nextTick(() => { this.$nextTick(() => {
this.myloading = true this.myloading = true;
}) });
}, 500) }, 500);
this.$Message.error('请输入必填项') this.$Message.error("请输入必填项");
} }
}) });
}, },
cancel0(){ cancel0() {
this.modal0=false; this.modal0 = false;
}, },
// 删除产品/层级 // 删除产品/层级
ok3(bl){ ok3(bl) {
var url="" var url = "";
var that=this var that = this;
if(this.delName=="产品"){ if (this.delName == "产品") {
url=`${designUrl}/productinfo/delete?id=${this.pid}` url = `${designUrl}/productinfo/delete?id=${this.pid}`;
} }
if(this.delName=="层级"){ if (this.delName == "层级") {
url = `${designUrl}/productlevel/delete?id=${this.lid}`;
url=`${designUrl}/productlevel/delete?id=${this.lid}` }
} service
service.delete(`${url}`).then(response=>{ .delete(`${url}`)
if (response.result.status) { .then(response => {
this.$Message.success('删除成功') if (response.result.status) {
this.loadProduct() this.$Message.success("删除成功");
this.loadlevel() this.loadProduct();
} this.loadlevel();
else{ } else {
this.$Message.error(response.result.message) this.$Message.error(response.result.message);
} }
}).catch((error) => {
this.$Message.error()
}) })
this.$refs.mysel.confirmmodal=this.modal3=bl; .catch(error => {
this.$Message.error();
});
this.$refs.mysel.confirmmodal = this.modal3 = bl;
}, },
cancel3(bl){ cancel3(bl) {
this.$refs.mysel.confirmmodal=this.modal3=bl; this.$refs.mysel.confirmmodal = this.modal3 = bl;
}, },
copyok(bl){ copyok(bl) {
this.$refs.mysel1.confirmmodal=bl this.$refs.mysel1.confirmmodal = bl;
}, },
copycancel(bl){ copycancel(bl) {
this.$refs.mysel1.confirmmodal=bl this.$refs.mysel1.confirmmodal = bl;
}, },
//层级列表 //层级列表
loadlevel(){ loadlevel() {
var url=`${designUrl}/productlevel/gettree` var url = `${designUrl}/productlevel/gettree`;
service.get(`${url}`).then(response=>{ service.get(`${url}`).then(response => {
this.leveldata=response.result this.leveldata = response.result;
}) });
}, },
cancelClick(){ cancelClick() {
this.clickindexLevelData={} this.clickindexLevelData = {};
this.clickindexLevel=-1 this.clickindexLevel = -1;
this.$refs.addclass.formValidate.upid=0 this.$refs.addclass.formValidate.upid = 0;
this.$refs.addclass.list=[] this.$refs.addclass.list = [];
this.$refs.addclass.list.push({label: '根节点', value: 0 }) this.$refs.addclass.list.push({ label: "根节点", value: 0 });
this.$refs.addclass.data=[] this.$refs.addclass.data = [];
}, },
levelrowClick(data, event, index, txt){ levelrowClick(data, event, index, txt) {
this.clickindexLevel=data.id this.clickindexLevel = data.id;
this.clickindexLevelData=data this.clickindexLevelData = data;
event.stopPropagation(); event.stopPropagation();
if(txt=="编辑"){ if (txt == "编辑") {
this.isedit=true this.isedit = true;
this.modal2=true; this.modal2 = true;
let {name,upId,upName}=data let { name, upId, upName } = data;
this.$refs.addclass.list=[] this.$refs.addclass.list = [];
this.$refs.addclass.list.push({label:upName,value:upId}) this.$refs.addclass.list.push({ label: upName, value: upId });
this.$refs.addclass.formValidate={name:name,upid:upId,upname:upName,id:data.id,disabled:true} this.$refs.addclass.formValidate = {
name: name,
upid: upId,
upname: upName,
id: data.id,
disabled: true
};
} }
if(txt=="删除"){ if (txt == "删除") {
this.lid = data.id;
this.lid=data.id this.delName = "层级";
this.delName="层级" var i = data.children.length;
var i=data.children.length; if (i > 0) {
if(i>0){ this.$Message.error("层级下有子节点,请先删除子节点!");
this.$Message.error('层级下有子节点,请先删除子节点!') return;
return;
} }
this.modal3=true; this.modal3 = true;
this.$refs.mysel.confirmmodal=this.modal3 this.$refs.mysel.confirmmodal = this.modal3;
} }
}, },
//层级列表 //层级列表
addclass() { addclass() {
this.loadlevel() this.loadlevel();
this.isEdit=false this.isEdit = false;
this.modal1=true; this.modal1 = true;
this.clickindexLevel=-1 this.clickindexLevel = -1;
this.clickindexLevelData={} this.clickindexLevelData = {};
}, },
//新增层级 //新增层级
addchild(event){ addchild(event) {
this.modal2=true; this.modal2 = true;
//阻止冒泡 //阻止冒泡
event.stopPropagation(); event.stopPropagation();
delete this.$refs.addclass.formValidate.id; delete this.$refs.addclass.formValidate.id;
this.$refs.addclass.formValidate.disabled=false this.$refs.addclass.formValidate.disabled = false;
this.$refs.addclass.list=[] this.$refs.addclass.list = [];
this.$refs.addclass.data=[] this.$refs.addclass.data = [];
if(this.clickindexLevel>0){ if (this.clickindexLevel > 0) {
this.$refs.addclass.formValidate.upid=this.clickindexLevel this.$refs.addclass.formValidate.upid = this.clickindexLevel;
let {name}=this.clickindexLevelData let { name } = this.clickindexLevelData;
this.$refs.addclass.list.push({label: `${name}`, value: this.clickindexLevel}) this.$refs.addclass.list.push({
var url=`${designUrl}/productlevel/getselecttree` label: `${name}`,
service.get(`${url}`, {id:this.clickindexLevel}).then(response=>{ value: this.clickindexLevel
this.$refs.addclass.data=response.result });
}) var url = `${designUrl}/productlevel/getselecttree`;
}else { service.get(`${url}`, { id: this.clickindexLevel }).then(response => {
this.$refs.addclass.formValidate.upid=0 this.$refs.addclass.data = response.result;
this.$refs.addclass.list.push({label: '根节点', value: 0 }) });
this.$refs.addclass.data=[] } else {
this.$refs.addclass.formValidate.upid = 0;
this.$refs.addclass.list.push({ label: "根节点", value: 0 });
this.$refs.addclass.data = [];
} }
this.$refs.addclass.formValidate.name="" this.$refs.addclass.formValidate.name = "";
//this.$refs.addclass.$refs['formValidate'].resetFields(); //this.$refs.addclass.$refs['formValidate'].resetFields();
}, },
edit1(data){ edit1(data) {
this.isEdit = true this.isEdit = true;
this.modal2 = true this.modal2 = true;
this.$refs.addclass.$refs['formValidate'].resetFields(); this.$refs.addclass.$refs["formValidate"].resetFields();
let {prename,name,isProduct}=data.row; let { prename, name, isProduct } = data.row;
this.$refs.addclass.list=[]; this.$refs.addclass.list = [];
this.$refs.addclass.list.push({label:prename,value:prename}) this.$refs.addclass.list.push({ label: prename, value: prename });
this.$refs.addclass.formValidate={name:name,prename:prename,isproduct:isProduct} this.$refs.addclass.formValidate = {
name: name,
prename: prename,
isproduct: isProduct
};
}, },
del1(){ del1() {
this.$refs.mysel0.confirmmodal=true; this.$refs.mysel0.confirmmodal = true;
// this.$Modal.confirm({ // this.$Modal.confirm({
// title: '提示', // title: '提示',
// okText: '确定', // okText: '确定',
...@@ -564,63 +625,67 @@ export default { ...@@ -564,63 +625,67 @@ export default {
// } // }
// }) // })
}, },
myselok(bl){ myselok(bl) {
this.$refs.mysel0.confirmmodal=bl; this.$refs.mysel0.confirmmodal = bl;
}, },
myselcancel(bl){ myselcancel(bl) {
this.$refs.mysel0.confirmmodal=bl; this.$refs.mysel0.confirmmodal = bl;
}, },
ok(name){ ok(name) {
var url=`${designUrl}/productlevel/createorupdate` var url = `${designUrl}/productlevel/createorupdate`;
this.$refs.addclass.$refs[name].validate((valid) => { this.$refs.addclass.$refs[name].validate(valid => {
if (valid) { if (valid) {
//this.$Message.success('Success!'); //this.$Message.success('Success!');
if (this.isedit) { if (this.isedit) {
} else { } else {
} }
this.formValidate1 = this.$refs.addclass.formValidate this.formValidate1 = this.$refs.addclass.formValidate;
service.post(`${url}`,JSON.stringify({ProductLevel:this.formValidate1})).then(response=>{ service
if(response.result.status){ .post(
this.$Message.success('保存成功') `${url}`,
this.loadlevel() JSON.stringify({ ProductLevel: this.formValidate1 })
this.loadProduct() )
this.modal2 = false .then(response => {
} if (response.result.status) {
else{ this.$Message.success("保存成功");
this.$Message.error(response.result.message) this.loadlevel();
} this.loadProduct();
}).catch(error=>{ this.modal2 = false;
this.$Message.error('保存失败') } else {
}) this.$Message.error(response.result.message);
}
})
.catch(error => {
this.$Message.error("保存失败");
});
//this.modal2 = false //this.modal2 = false
} else { } else {
setTimeout(() => { setTimeout(() => {
this.myloading = false this.myloading = false;
this.$nextTick(() => { this.$nextTick(() => {
this.myloading = true this.myloading = true;
}) });
}, 500) }, 500);
this.$Message.error('请输入必填项') this.$Message.error("请输入必填项");
} }
}) });
}, },
cancel(){ cancel() {
this.modal2=false this.modal2 = false;
} }
}, },
created(){ created() {
this.loadProduct() this.loadProduct();
this.divHeihgt= window.innerHeight - 130+"px"; this.divHeihgt = window.innerHeight - 130 + "px";
},
mounted() {
window.onresize = () => {
return (() => {
this.divHeihgt = window.innerHeight - 130+"px";
})()
}
}, },
} mounted() {
window.onresize = () => {
return (() => {
this.divHeihgt = window.innerHeight - 130 + "px";
})();
};
}
};
</script> </script>
<style scoped> <style scoped>
</style> </style>
...@@ -103,9 +103,9 @@ export default { ...@@ -103,9 +103,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingFile: dataValidate routingFile: dataValidate
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
doUpload: '/api/up/file', doUpload: '/api/up/file',
tableHeight: '', tableHeight: '',
myloading: true, myloading: true,
gymodaltitle: '创建工艺', gymodaltitle: '创建工艺',
processviewModal: false, processviewModal: false,
isview: false, isview: false,
issendAudit: false, issendAudit: false,
...@@ -672,10 +672,10 @@ export default { ...@@ -672,10 +672,10 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingHeaderEntity: a.formValidate, routingHeaderEntity: a.formValidate,
FileList: filelist FileList: filelist
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -544,9 +544,9 @@ export default { ...@@ -544,9 +544,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingDetail: this.formprocessValidate routingDetail: this.formprocessValidate
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -171,9 +171,9 @@ let isvalidate = false; ...@@ -171,9 +171,9 @@ let isvalidate = false;
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingStep: this.newModeldata routingStep: this.newModeldata
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -304,7 +304,7 @@ export default { ...@@ -304,7 +304,7 @@ export default {
var url = `${designUrl}/routingsupporting/createorupdate` var url = `${designUrl}/routingsupporting/createorupdate`
service service
.post(`${url}`, JSON.stringify(this.formprocessValidate)) .post(`${url}`, this.formprocessValidate)
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
......
...@@ -353,9 +353,9 @@ export default { ...@@ -353,9 +353,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingQcCard: this.cardModeldata routingQcCard: this.cardModeldata
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -389,7 +389,7 @@ export default { ...@@ -389,7 +389,7 @@ export default {
list: [], list: [],
data2: [], data2: [],
tabstatus: '1', //暂存tab状态()主工艺||专业工艺 tabstatus: '1', //暂存tab状态()主工艺||专业工艺
gymodaltitle: '创建工艺', gymodaltitle: '创建工艺',
selectdata: [], selectdata: [],
value1: false, value1: false,
drawerShow: false, drawerShow: false,
...@@ -557,7 +557,7 @@ export default { ...@@ -557,7 +557,7 @@ export default {
content = gh[0].name content = gh[0].name
editColor = gh[0].color editColor = gh[0].color
} }
if (this.tabstatus == '1') {
return h('div', [ return h('div', [
h( h(
'span', 'span',
...@@ -601,24 +601,7 @@ export default { ...@@ -601,24 +601,7 @@ export default {
content content
) )
]) ])
} else {
return h('div', [
h(
'span',
{
props: {
type: 'text',
ghost: true
},
style: {
color: editColor,
cursor: 'pointer'
}
},
content
)
])
}
} }
}, },
...@@ -1076,9 +1059,7 @@ export default { ...@@ -1076,9 +1059,7 @@ export default {
saveHeader(next) { saveHeader(next) {
var a = this.$refs.processMain var a = this.$refs.processMain
if (a.formValidate.routingType == 1) {
this.savebill()
}
var filelist = a.getfile() var filelist = a.getfile()
let isvalidate = false let isvalidate = false
...@@ -1107,10 +1088,10 @@ export default { ...@@ -1107,10 +1088,10 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
routingHeaderEntity: a.formValidate, routingHeaderEntity: a.formValidate,
FileList: filelist FileList: filelist
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
...@@ -1209,9 +1190,7 @@ export default { ...@@ -1209,9 +1190,7 @@ export default {
this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid this.$refs.processNew.formprocessValidate.routing_header_id = this.headerid
this.$refs.processNew.loaddata() this.$refs.processNew.loaddata()
} else { } else {
if (this.addpdefm.formValidate.routingType == 1) {
this.savebill()
}
var a = this.addpdefm var a = this.addpdefm
this.headerid = this.addpdefm.formValidate.id this.headerid = this.addpdefm.formValidate.id
...@@ -1231,9 +1210,9 @@ export default { ...@@ -1231,9 +1210,9 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
orderRouting: orderRoutingobj orderRouting: orderRoutingobj
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
...@@ -1296,15 +1275,12 @@ export default { ...@@ -1296,15 +1275,12 @@ export default {
modalShowCancel() { modalShowCancel() {
this.modalShow = false this.modalShow = false
}, },
savebill() {
this.$refs.modelTable.$refs.quotationBox2.saveData()
this.$refs.modelTable.$refs.quotationBox3.saveData()
},
saveOK() { saveOK() {
var url = `${PlanUrl}/OrderMaterial/createorupdate` var url = `${PlanUrl}/OrderMaterial/createorupdate`
// JSON.stringify({Process:this.formValidate}) // JSON.stringify({Process:this.formValidate})
service service
.post(`${url}`, JSON.stringify({ orderMaterial: this.formValidate })) .post(`${url}`, { orderMaterial: this.formValidate })
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
this.$Message.success('保存成功') this.$Message.success('保存成功')
...@@ -1334,7 +1310,7 @@ export default { ...@@ -1334,7 +1310,7 @@ export default {
let ordercombid = 0 let ordercombid = 0
this.createtype = 1 this.createtype = 1
if (routingType == 1) { if (routingType == 1) {
this.gymodaltitle = '设置工艺规程' this.gymodaltitle = '设置工艺规程'
for (let i = 0; i < this.data1.length; i++) { for (let i = 0; i < this.data1.length; i++) {
let obj1 = this.data1[i] let obj1 = this.data1[i]
...@@ -1346,24 +1322,14 @@ export default { ...@@ -1346,24 +1322,14 @@ export default {
} }
} }
this.$refs.modelTable.issetProcess1 = true
this.$refs.modelTable.selectFault = 'greateArt'
this.$refs.modelTable.$refs.quotationBox2.loadData(
orderids.toString(',')
)
this.$refs.modelTable.$refs.quotationBox3.loadData(
orderids.toString(',')
)
this.$refs.modelTable.$refs.quotationBox2.isview = this.isview
this.$refs.modelTable.$refs.quotationBox3.isview = this.isview
} else { } else {
this.$refs.modelTable.issetProcess1 = false
this.gymodaltitle = '设置专业工艺规程' this.gymodaltitle = '设置专业工艺规程'
ordercombid = params.row.specialtyOrderCombID ordercombid = params.row.specialtyOrderCombID
if (ordercombid != 0) { if (ordercombid != 0) {
this.$refs.modelTable.issetProcess1 = false
this.addpdefm.formValidate.ordercombid = ordercombid this.addpdefm.formValidate.ordercombid = ordercombid
for (let i = 0; i < this.data1.length; i++) { for (let i = 0; i < this.data1.length; i++) {
let obj = this.data1[i] let obj = this.data1[i]
...@@ -1431,12 +1397,11 @@ export default { ...@@ -1431,12 +1397,11 @@ export default {
this.addpdefm.setshow() this.addpdefm.setshow()
}, },
editProcessRow(params, RoutingID, routingType) { editProcessRow(params, RoutingID, routingType) {
let ordercombid = 0 let ordercombid = 0
if (routingType == 1) {
ordercombid = params.row.orderCombID ordercombid = params.row.orderCombID
} else {
ordercombid = params.row.specialtyOrderCombID
}
this.editProcess(ordercombid, RoutingID, routingType, null) this.editProcess(ordercombid, RoutingID, routingType, null)
}, },
editProcess(ordercombid, RoutingID, routingType, orders) { editProcess(ordercombid, RoutingID, routingType, orders) {
...@@ -1450,16 +1415,9 @@ export default { ...@@ -1450,16 +1415,9 @@ export default {
let orderids = new Array() let orderids = new Array()
let orderlist = new Array() let orderlist = new Array()
if (routingType == 1) {
// ordercombid = params.row.orderCombID
this.$refs.modelTable.issetProcess1 = true
this.$refs.modelTable.$refs.quotationBox2.isview = this.isview
this.$refs.modelTable.$refs.quotationBox3.isview = this.isview
} else {
// ordercombid = params.row.specialtyOrderCombID
this.$refs.modelTable.issetProcess1 = false
}
this.addpdefm.formValidate.ordercombid = ordercombid this.addpdefm.formValidate.ordercombid = ordercombid
if (orders == null) { if (orders == null) {
for (let i = 0; i < this.data1.length; i++) { for (let i = 0; i < this.data1.length; i++) {
...@@ -1492,15 +1450,7 @@ export default { ...@@ -1492,15 +1450,7 @@ export default {
} }
this.addpdefm.dataTop = orderlist this.addpdefm.dataTop = orderlist
if (routingType == 1) {
this.$refs.modelTable.$refs.quotationBox2.loadData(
orderids.toString(',')
)
this.$refs.modelTable.$refs.quotationBox3.loadData(
orderids.toString(',')
)
this.$refs.modelTable.selectFault = 'greateArt'
}
if (routingType == 1) { if (routingType == 1) {
this.gymodaltitle = '设置工艺规程' this.gymodaltitle = '设置工艺规程'
} else { } else {
...@@ -1539,13 +1489,9 @@ export default { ...@@ -1539,13 +1489,9 @@ export default {
let orderids = new Array() let orderids = new Array()
let orderlist = new Array() let orderlist = new Array()
let ordercombid = 0 let ordercombid = 0
if (routingType == 1) {
ordercombid = params.row.orderCombID ordercombid = params.row.orderCombID
this.$refs.modelTable.issetProcess1 = true
} else {
ordercombid = params.row.specialtyOrderCombID
this.$refs.modelTable.issetProcess1 = false
}
this.addpdefm.formValidate.ordercombid = ordercombid this.addpdefm.formValidate.ordercombid = ordercombid
for (let i = 0; i < this.data1.length; i++) { for (let i = 0; i < this.data1.length; i++) {
let obj = this.data1[i] let obj = this.data1[i]
...@@ -1568,22 +1514,10 @@ export default { ...@@ -1568,22 +1514,10 @@ export default {
} }
this.addpdefm.dataTop = orderlist this.addpdefm.dataTop = orderlist
if (routingType == 1) {
this.$refs.modelTable.$refs.quotationBox2.loadData(
orderids.toString(',')
)
this.$refs.modelTable.$refs.quotationBox3.loadData(
orderids.toString(',')
)
this.$refs.modelTable.selectFault = 'greateArt'
this.$refs.modelTable.$refs.quotationBox2.isview = this.isview
this.$refs.modelTable.$refs.quotationBox3.isview = this.isview
}
if (routingType == 1) {
this.gymodaltitle = '查看工艺规程'
} else {
this.gymodaltitle = '查看工艺规程' this.gymodaltitle = '查看工艺规程'
}
var url = `${designUrl}/routingheader/getbyid?id=` + RoutingID var url = `${designUrl}/routingheader/getbyid?id=` + RoutingID
service.get(`${url}`).then((response) => { service.get(`${url}`).then((response) => {
this.addpdefm.formValidate = response.result this.addpdefm.formValidate = response.result
...@@ -1613,9 +1547,7 @@ export default { ...@@ -1613,9 +1547,7 @@ export default {
this.addpdefm.formValidate = this.headerInfo this.addpdefm.formValidate = this.headerInfo
this.addpdefm.isview = this.isview this.addpdefm.isview = this.isview
this.$refs.modelTable.$refs.quotationBox2.isview = this.isview
this.$refs.modelTable.$refs.quotationBox3.isview = this.isview
this.addpdefm.ProductName = this.headerInfo.productName this.addpdefm.ProductName = this.headerInfo.productName
this.addpdefm.ProductCode = this.headerInfo.productCode this.addpdefm.ProductCode = this.headerInfo.productCode
......
...@@ -445,36 +445,7 @@ export default { ...@@ -445,36 +445,7 @@ export default {
this.$refs.refFile.routing_header_id = 0; this.$refs.refFile.routing_header_id = 0;
this.$refs.refFile.intFiles(); this.$refs.refFile.intFiles();
}, },
LoadprocessList() {
this.processList = [];
let url = `${designUrl}/routingheader/getlistbyids?` + this.Mianids,
that = this;
service.get(`${url}`).then(res => {
let selectdata = res.result;
selectdata.forEach(item => {
this.processList.push({
value: item.id,
name: item.code,
ver: item.version
});
});
this.formValidate.up_id = this.processList[0].value;
this.MianVer = this.processList[0].ver;
this.MianCode = this.processList[0].name;
});
},
MainProcess_selected(val) {
//这里的val默认拿到的是:value绑定的那个
this.formValidate.up_id = val;
this.processList.forEach(item => {
if (val == item.value) {
this.MianVer = item.ver;
}
});
},
quotationBox() { quotationBox() {
this.$refs.generateQuotation.modalShow = true; this.$refs.generateQuotation.modalShow = true;
}, },
...@@ -558,9 +529,10 @@ export default { ...@@ -558,9 +529,10 @@ export default {
}); });
}, },
setparentcreatetype(type, headerid) { setparentcreatetype(type, headerid) {
this.$parent.$parent.createtype = type
this.$parent.$parent.headerid = headerid
this.$parent.$parent.$parent.createtype = type;
this.$parent.$parent.$parent.headerid = headerid;
}, },
...@@ -575,11 +547,9 @@ export default { ...@@ -575,11 +547,9 @@ export default {
}); });
}, },
setshow() { setshow() {
if (this.formValidate.routingType == 2) {
this.isshow = true;
} else {
this.isshow = false; this.isshow = false;
}
if (this.formValidate.id != 0) { if (this.formValidate.id != 0) {
this.isedit = true; this.isedit = true;
...@@ -590,14 +560,11 @@ export default { ...@@ -590,14 +560,11 @@ export default {
this.Loadfile(0); this.Loadfile(0);
} }
if (this.Mianids != "") {
this.LoadprocessList();
}
this.createtype = "1"; this.createtype = "1";
this.selectpdefmid = 0; this.selectpdefmid = 0;
this.RoutingList = []; this.RoutingList = [];
this.calcplatesnum(); // this.calcplatesnum();
} }
} }
}; };
......
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
<style lang='less' scoped> <style lang='less' scoped>
.material_row{ .material_row{
.material_label{ .material_label{
color: #249E91 color: #2d8cf0
} }
.material_line { .material_line {
display: inline-block; display: inline-block;
......
...@@ -360,8 +360,7 @@ export default { ...@@ -360,8 +360,7 @@ export default {
}, },
// 分页查询数据列表 // 分页查询数据列表
laoedPage() { laoedPage() {
let params = this.orderSearchForm
let params = this.orderSearchForm
params.SkipCount = params.SkipCount || 0 params.SkipCount = params.SkipCount || 0
params.MaxResultCount = params.MaxResultCount || 10 params.MaxResultCount = params.MaxResultCount || 10
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
v-model="searchIterms" placeholder="请输入查询条件" v-model="searchIterms" placeholder="请输入查询条件"
@on-search="tableSearch" ></Input> @on-search="tableSearch" ></Input>
</div> </div>
<Button type="primary" class="title_btn" @click='searchModel'>高级查询</Button> <Button type="primary" class="title_btn" v-show="false" @click='searchModel'>高级查询</Button>
</div> </div>
<div class="table"> <div class="table">
<Table <Table
...@@ -319,6 +319,24 @@ export default { ...@@ -319,6 +319,24 @@ export default {
}, },
// 搜索 // 搜索
tableSearch() { tableSearch() {
console.warn("查询数据")
let val = this.searchIterms;
console.log(val)
let parmes = {
"status": 0,
"simpleSearch": val,
"skipCount":0,
"maxResultCount": 10
}
this.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
});
}, },
searchModel(){ searchModel(){
this.showModel = true; this.showModel = true;
...@@ -398,7 +416,7 @@ export default { ...@@ -398,7 +416,7 @@ export default {
<style scoped> <style scoped>
.table_title{ .table_title{
width: 320px; width: 320px;
float: left; /* float: left; */
} }
.table{ .table{
margin: 10px 0 0 0; margin: 10px 0 0 0;
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
if (state) { if (state) {
var url = `${PlanUrl}/ordercheckresult/savecheckresult` var url = `${PlanUrl}/ordercheckresult/savecheckresult`
service service
.post(`${url}`, JSON.stringify(this.mod)) .post(`${url}`, this.mod)
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
this.$Message.success('操作成功') this.$Message.success('操作成功')
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<div class="transmit_content"> <div class="transmit_content">
<div class="wuliao_left"> <div class="wuliao_left">
<div class="card_title" style="height:32px"> <div class="card_title" style="height:46px">
<a href="#" class="state" @click="showList"> <a href="#" class="state" @click="showList">
状态: 状态:
<Icon type="ios-arrow-down" v-if="iconModel" /> <Icon type="ios-arrow-down" v-if="iconModel" />
...@@ -388,11 +388,11 @@ export default { ...@@ -388,11 +388,11 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
id: row.id, id: row.id,
orderid: this.data.orderIDs, orderid: this.data.orderIDs,
time: null time: null
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
...@@ -413,11 +413,11 @@ export default { ...@@ -413,11 +413,11 @@ export default {
service service
.post( .post(
`${url}`, `${url}`,
JSON.stringify({ {
id: row.id, id: row.id,
orderid: this.data.orderIDs, orderid: this.data.orderIDs,
time: null time: null
}) }
) )
.then((response) => { .then((response) => {
if (response.success) { if (response.success) {
......
...@@ -30,7 +30,7 @@ const systemApi = { ...@@ -30,7 +30,7 @@ const systemApi = {
let hostAddress = "localhost"; //192.168.0.159 let hostAddress = "localhost"; //192.168.0.159
let filePath = '39.100.148.168'; //文件上传ip let filePath = '39.100.148.168'; //文件上传ip
let filePathDown = '39.100.148.168'; //文件上传ip let filePathDown = '39.100.148.168'; //文件上传ip
let apsUrl = '47.92.102.113' let apsAdress = '47.92.102.113'
let address = systemApi.cloudServer; let address = systemApi.cloudServer;
//占位符自动替换: //占位符自动替换:
window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据) window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
...@@ -47,13 +47,14 @@ const systemApi = { ...@@ -47,13 +47,14 @@ const systemApi = {
window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api
window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理 window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理
window.iconImg = `http://${hostAddress}:3000/imgicon/`; //待办任务图标路径 window.iconImg = `http://${hostAddress}:3000/imgicon/`; //待办任务图标路径
window.aps = `http://${apsUrl}:10110/api/services/app`;//aps手工排产 window.apsManualUrl = `http://${apsAdress}:10091/api/services/app`;//aps手工排产
window.apsUrl = `http://${apsAdress}:10110/api/services/app`;//aps排产
//oidc配置: //oidc配置:
window.authConfig = { window.authConfig = {
authority: `http://${address}:10010`, authority: `http://${address}:10010`,
client_id: 'js', client_id: 'js',
redirect_uri: `http://${hostAddress}:3006/callback`, redirect_uri: `http://${hostAddress}:3006/callback`,
response_type: 'code', response_type: 'code',
scope: 'openid profile system process plan resource qms bug workflow crm', scope: 'openid profile system process plan resource qms bug workflow crm aps',
post_logout_redirect_uri: `http://${hostAddress}:3006/` post_logout_redirect_uri: `http://${hostAddress}:3006/`
}; };
\ No newline at end of file
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