Commit 0d8e82ad authored by 仇晓婷's avatar 仇晓婷

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

parents dd6be9f7 41e88add
......@@ -18,45 +18,58 @@
ref="formValidate"
>
<Row>
<Col span="8">
<Col span="8" v-if="false">
<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>
</Col>
<Col span="8">
<Col span="6">
<FormItem label="生产准备" style="width:100%" prop="ProductingPreparationPeople">
<WorkShopSelect ref="userSelected" v-model="orderForm.ProductingPreparationPeople" style="width:240px"/>
</FormItem>
</Col>
<Col span="8">
<FormItem label="订单报价人员" style="width:100%" prop="QuotationPeople">
<UserSelect ref="userSelected" v-model="orderForm.QuotationPeople" style="width:240px"/>
<WorkShopSelect
ref="userSelected"
v-model="orderForm.ProductingPreparationPeople"
style="width:240px"
/>
</FormItem>
</Col>
<Col span="8">
<FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate">
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<DatePicker
v-model="orderForm.MainRoutingFinishDate"
v-model="orderForm.ProductingPreparationFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeMainRFD"
@on-change="getTimeProductPFD"
></DatePicker>
</FormItem>
</Col>
<Col span="8">
<FormItem label="完成时间" style="width:100%" prop="ProductingPreparationFinishDate">
<Col span="6">
<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
v-model="orderForm.ProductingPreparationFinishDate"
v-model="orderForm.MainRoutingFinishDate"
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getTimeProductPFD"
@on-change="getTimeMainRFD"
></DatePicker>
</FormItem>
</Col>
<Col span="8">
<Col span="6">
<FormItem label="完成时间" style="width:100%" prop="QuotationFinishDate">
<DatePicker
v-model="orderForm.QuotationFinishDate"
......@@ -91,69 +104,69 @@
</template>
<script>
import OrderInfos from '@/components/orderOperator/orderInfos'
var myDate = new Date()
import OrderInfos from "@/components/orderOperator/orderInfos";
var myDate = new Date();
export default {
name: 'orderSend',
name: "orderSend",
components: {
OrderInfos
},
data() {
return {
divHeight: '260px',
divHeight: "260px",
osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表
info: {
status: true,
orderInfo: []
},
roleTitle:'工艺员',
roleTitle: "工艺员",
orderForm: {
DistributeMainRouting: null, //主工艺人员
MainRoutingFinishDate: '', //主工艺人员完成时间
MainRoutingFinishDate: "", //主工艺人员完成时间
MajorRoutingPeople: null, //专业工艺人员
MajorRoutingFinishDate: '', //专业工艺人员完成时间
MajorRoutingFinishDate: "", //专业工艺人员完成时间
CheckUpPeople: 1, //校对人员 暂时不用
CheckUpFinishDate: '2019-12-19', //校对人员完成时间
CheckUpFinishDate: "2019-12-19", //校对人员完成时间
ProductingPreparationPeople: null, //生产准备人员
ProductingPreparationFinishDate: '', //生产准备完成时间
ProductingPreparationFinishDate: "", //生产准备完成时间
QuotationPeople: null, //订单报价人员
QuotationFinishDate: '' //订单报价完成时间
QuotationFinishDate: "" //订单报价完成时间
},
columns1: [
{
title: '订单编码',
key: 'mesCode',
title: "订单编码",
key: "mesCode",
width: 180,
tooltip: true
},
{
title: '任务类型',
key: 'taskType',
align: 'center',
title: "任务类型",
key: "taskType",
align: "center",
width: 100,
tooltip: true
},
{
title: '产品名称',
key: 'productName',
title: "产品名称",
key: "productName",
tooltip: true
},
{
title: '阶段',
key: 'stage',
title: "阶段",
key: "stage",
width: 80
},
{
title: '材料',
key: 'materialId',
title: "材料",
key: "materialId",
width: 100,
tooltip: true
},
{
title: '数量',
key: 'quantity',
align: 'right',
title: "数量",
key: "quantity",
align: "right",
width: 70
}
],
......@@ -161,21 +174,21 @@ export default {
dataListRetrun: [], //确定后返回数据
ruleValidate: {
DistributeMainRouting: [
{
required: true,
message: '请选择人员',
trigger: 'change',
type: 'number'
}
],
MainRoutingFinishDate: [
{
required: true,
message: '请选择时间',
trigger: 'change'
}
],
// DistributeMainRouting: [
// {
// required: true,
// message: '请选择人员',
// trigger: 'change',
// type: 'number'
// }
// ],
// MainRoutingFinishDate: [
// {
// required: true,
// message: '请选择时间',
// trigger: 'change'
// }
// ],
// MajorRoutingPeople: [
// {
// required: true,
......@@ -209,102 +222,102 @@ export default {
ProductingPreparationPeople: [
{
required: true,
message: '请选择人员',
trigger: 'change',
type: 'number'
message: "请选择人员",
trigger: "change",
type: "number"
}
],
ProductingPreparationFinishDate: [
{
required: true,
message: '请选择时间',
trigger: 'change'
message: "请选择时间",
trigger: "change"
}
],
QuotationPeople: [
{
required: true,
message: '请选择人员',
trigger: 'change',
type: 'number'
message: "请选择人员",
trigger: "change",
type: "number"
}
],
QuotationFinishDate: [
{
required: true,
message: '请选择时间',
trigger: 'change'
message: "请选择时间",
trigger: "change"
}
]
}
}
};
},
methods: {
intData(data) {
//打开modal层时给订单list赋值
this.orderInfo = []
this.dataList = []
this.dataList = data
this.osrOneList = false
this.osrMoreList = false
this.orderInfo = [];
this.dataList = [];
this.dataList = data;
this.osrOneList = false;
this.osrMoreList = false;
if (data.length == 1) {
this.info.status = true
this.info.orderInfo = data[0]
this.info.status = true;
this.info.orderInfo = data[0];
} else if (data.length > 1) {
this.osrMoreList = true
this.info.status = false
this.info.orderInfo = []
this.osrMoreList = true;
this.info.status = false;
this.info.orderInfo = [];
}
},
returnDataList() {
this.dataListRetrun = []
this.dataList.forEach((item) => {
let objStr = {}
objStr.id = item.id
objStr.mesCode = item.mesCode
objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting
objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate
objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople
objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate
objStr.CheckUpPeople = this.orderForm.CheckUpPeople
objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate
objStr.QuotationPeople = this.orderForm.QuotationPeople
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate
this.dataListRetrun.push(objStr)
})
this.dataListRetrun = [];
this.dataList.forEach(item => {
let objStr = {};
objStr.id = item.id;
objStr.mesCode = item.mesCode;
objStr.DistributeMainRouting = this.orderForm.DistributeMainRouting;
objStr.MainRoutingFinishDate = this.orderForm.MainRoutingFinishDate;
objStr.MajorRoutingPeople = this.orderForm.MajorRoutingPeople;
objStr.MajorRoutingFinishDate = this.orderForm.MajorRoutingFinishDate;
objStr.CheckUpPeople = this.orderForm.CheckUpPeople;
objStr.CheckUpFinishDate = this.orderForm.CheckUpFinishDate;
objStr.ProductingPreparationPeople = this.orderForm.ProductingPreparationPeople;
objStr.ProductingPreparationFinishDate = this.orderForm.ProductingPreparationFinishDate;
objStr.QuotationPeople = this.orderForm.QuotationPeople;
objStr.QuotationFinishDate = this.orderForm.QuotationFinishDate;
this.dataListRetrun.push(objStr);
});
//返回审批数据
return this.dataListRetrun
return this.dataListRetrun;
},
getTimeMainRFD(value) {
this.orderForm.MainRoutingFinishDate = value
this.orderForm.MainRoutingFinishDate = value;
},
getTimeMajorRFD(value) {
this.orderForm.MajorRoutingFinishDate = value
this.orderForm.MajorRoutingFinishDate = value;
},
getTimeCheckFD(value) {
this.orderForm.CheckUpFinishDate = value
this.orderForm.CheckUpFinishDate = value;
},
getTimeProductPFD(value) {
this.orderForm.ProductingPreparationFinishDate = value
this.orderForm.ProductingPreparationFinishDate = value;
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value
this.orderForm.QuotationFinishDate = value;
}
},
created() {
var theight = window.innerHeight - 400 + 'px'
this.divHeight = theight
var theight = window.innerHeight - 400 + "px";
this.divHeight = theight;
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.divHeight = window.screenHeight - 400 + 'px'
})()
}
window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 400 + "px";
})();
};
}
}
};
</script>
\ No newline at end of file
......@@ -21,39 +21,39 @@ export default {
},
//获取排产池数据列表
getall() {
return Api.get(`${aps}/Mes_part_task_plan_simulate/getall`);
return Api.get(`${apsUrl}/Mes_part_task_plan_simulate/getall`);
},
//点开排产池列表查看对应的工序
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) {
return Api.post(`${aps}/apspoolappservices/orderpriority`, params);
return Api.post(`${apsUrl}/apspoolappservices/orderpriority`, params);
},
//删除工序
removeoptasksimluate(params) {
return Api.post(`${aps}/apspoolappservices/removeoptasksimluate`, params);
return Api.post(`${apsUrl}/apspoolappservices/removeoptasksimluate`, params);
},
//恢复工艺
recoveryoptasksimluate(params) {
return Api.post(`${aps}/apspoolappservices/recoveryoptasksimluate`, params);
return Api.post(`${apsUrl}/apspoolappservices/recoveryoptasksimluate`, params);
},
//移出排产池
shiftoutapspool(params) {
return Api.post(`${aps}/apspoolappservices/shiftoutapspool`, params);
return Api.post(`${apsUrl}/apspoolappservices/shiftoutapspool`, params);
},
//排产计算
apsprepareandcalc(params) {
return Api.post(`${aps}/apspoolappservices/apsprepareandcalc`, params);
return Api.post(`${apsUrl}/apspoolappservices/apsprepareandcalc`, params);
},
//排产方案下发
processschemedispatch(params) {
return Api.post(`${aps}/apspoolappservices/processschemedispatch`, params);
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params);
},
//APS排产前数据合法性校验
recoveryoptasksimluate(params) {
return Api.post(`${aps}/apspoolappservices/apsdatachecked`, params);
return Api.post(`${apsUrl}/apspoolappservices/apsdatachecked`, params);
},
}
......@@ -455,44 +455,6 @@ export default {
this.data1 = res.result;
}
});
//加载数据
//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----
......
......@@ -61,48 +61,6 @@ export default {
deletelModal: false,
apsModal: false,
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,
columns: [
......@@ -271,7 +229,7 @@ export default {
}
},
mounted() {
console.log(this)
this.loadList()
},
async fetch({ store, params }) {
......@@ -284,7 +242,7 @@ export default {
Api.getall().then((res)=>{
if(res.success)
{
// this.list=res.result
this.list=res.result
}
})
},
......
import Api from '@/plugins/request'
export default {
getmesorder(params) {
return Api.get(`${aps}/aps/getmesorder`, params); //待排产订单数据
return Api.get(`${apsManualUrl}/aps/getmesorder`, params); //待排产订单数据
},
gettaskseqinfo(params) {
return Api.get(`${aps}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据
return Api.get(`${apsManualUrl}/aps/gettaskseqinfo`, 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) {
return Api.get(`${aps}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
},
getlistEquip(params) {
return Api.get(`${aps}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
return Api.get(`${apsManualUrl}/mes_equip_info/getlist`, 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
......@@ -2,20 +2,41 @@
<div>
<div class="contentRight" :style="{height:divHeihgt}">
<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>
<Col span="8">
<Input
search
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>
</Col>
</Row>
</div>
<div class="">
<div class>
<tree-grid :items="data" :columns="columns" @on-row-click="rowClick"></tree-grid>
</div>
</div>
<Modal v-model="modal0" title="添加/编辑产品" :width="800" :mask-closable="false" :loading="myloading"
ok-text="保存" cancel-text="取消" @on-ok="ok0('ProcuctformValidate')" @on-cancel='cancel0'>
<Modal
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>
<!-- <div slot="footer" style="text-align:center">
<Button type="primary" @click="ok0('ProcuctformValidate')">保存</Button>
......@@ -24,7 +45,7 @@
style="border-color: rgb(204, 204, 204);background-color:white;color:black"
@click="cancel0"
>取消</Button>
</div> -->
</div>-->
</Modal>
<Modal v-model="modal1" title="层级类型" :width="800" :mask-closable="false">
<div @click="cancelClick">
......@@ -36,10 +57,18 @@
<tree-grid :items="leveldata" :columns="levelcolumns" @on-row-click="levelrowClick"></tree-grid>
</div>
</div>
</Modal>
<Modal v-model="modal2" title="新增层级类型" :width="440" :mask-closable="false" :loading="myloading"
ok-text="保存" cancel-text="取消" @on-ok="ok('formValidate')" @on-cancel='cancel'>
<Modal
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>
<!-- <div slot="footer" style="text-align:center">
<Button type="primary" @click="ok('formValidate')">保存</Button>
......@@ -48,47 +77,49 @@
style="border-color: rgb(204, 204, 204);background-color:white;color:black"
@click="cancel"
>取消</Button>
</div> -->
</div>-->
</Modal>
<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="mysel1" v-on:confirmok="copyok" v-on:confirmcancel="copycancel">
<div slot="confimcon"><p>确认要复制此节点及其子节点吗?</p></div>
<div slot="confimcon">
<p>确认要复制此节点及其子节点吗?</p>
</div>
</myconfirm>
</div>
</template>
<script>
import treeGrid from '@/components/treeGrid'
import tb from '../../basicData/roleManagent/components/tb'
import add from './addclass'
import addProduct from './addproduct'
import myconfirm from './components/myconfirm'
import service from '@/plugins/request'
import treeGrid from "@/components/treeGrid";
import tb from "../../basicData/roleManagent/components/tb";
import add from "./addclass";
import addProduct from "./addproduct";
import myconfirm from "./components/myconfirm";
import service from "@/plugins/request";
export default {
components: { treeGrid,tb,add ,addProduct,myconfirm},
components: { treeGrid, tb, add, addProduct, myconfirm },
data() {
return {
myloading:true,
productName:'',
model1:'',
divHeihgt:"",
modal0:false,
isedit0:false,
modal1:false,
modal2:false,
modal3:false,
isedit:false,
formValidate0:{},
formValidate1:{},
pid:0,
lid:0,
delName:'',
cilckListRowData:{},
productClassType:-1,
upProductId:-1,
clickindex:-1,
clickindexLevel:-1,
clickindexLevelData:{},
myloading: true,
productName: "",
model1: "",
divHeihgt: "",
modal0: false,
isedit0: false,
modal1: false,
modal2: false,
modal3: false,
isedit: false,
formValidate0: {},
formValidate1: {},
pid: 0,
lid: 0,
delName: "",
cilckListRowData: {},
productClassType: -1,
upProductId: -1,
clickindex: -1,
clickindexLevel: -1,
clickindexLevelData: {},
//产品树列
columns: [
// {
......@@ -100,72 +131,74 @@ export default {
// hidden: true
// },
{
title: '产品分类/名称',
key: 'name'
title: "产品分类/名称",
key: "name"
},
{
title: '层级类型',
key: 'upName'
title: "层级类型",
key: "upName"
},
{
title: '产品图号',
key: 'drawingNo'
title: "产品图号",
key: "drawingNo"
},
{
title: '物料编号',
key: 'mmcode'
title: "物料编号",
key: "mmcode"
},
{
title: '主承制单位',
key: 'madeCompanyName'
title: "主承制单位",
key: "madeCompanyName"
},
{
title: '操作',
type: 'action',
width:150,
title: "操作",
type: "action",
width: 150,
actions: [
{
oprate: 'edit',
text: '编辑',
class: 'edit',
oprate: "edit",
text: "编辑",
class: "edit"
},
{
oprate: 'delete',
text: '删除',
class: 'remove',
oprate: "delete",
text: "删除",
class: "remove"
}
],
]
}
],
data: [],
//层级类型列
leveldata:[],
levelcolumns:[
leveldata: [],
levelcolumns: [
{
title: '类型名称',
key: 'name'
title: "类型名称",
key: "name"
},
{
title: '上级类型名称',
key: 'upName'
title: "上级类型名称",
key: "upName"
},
{
title: '操作',
type: 'action',
title: "操作",
type: "action",
width: 150,
actions: [{
oprate: 'detail',
text: '编辑',
class: 'edit',
}, {
oprate: 'delete',
text: '删除',
class: 'remove',
}],
actions: [
{
oprate: "detail",
text: "编辑",
class: "edit"
},
{
oprate: "delete",
text: "删除",
class: "remove"
}
],
]
}
]
// tbPro:{
// isBorder: true,
// stripe: true,
......@@ -216,343 +249,371 @@ export default {
// ],
// data: []
// }
}
};
},
methods: {
search(){
var name=this.productName
this.loadProduct(name)
search() {
var name = this.productName;
this.loadProduct(name);
},
//新增产品
add() {
this.isedit0=false;
this.$refs.addproduct.selectdata=[]
this.$refs.addproduct.list=[]
this.$refs.addproduct.$refs['ProcuctformValidate'].resetFields();
this.isedit0 = false;
this.$refs.addproduct.selectdata = [];
this.$refs.addproduct.list = [];
this.$refs.addproduct.$refs["ProcuctformValidate"].resetFields();
//如果是选中一行新增,判断是不是最下面的层级或者是产品
let bl=false;
this.upProductId=-1;
this.productClassType=-1;
let data=this.cilckListRowData;
console.log(data)
if(data.id)
{
this.$refs.addproduct.formValidate.classType=data.id
this.productClassType=data.id;
this.$refs.addproduct.list.push({label:data.name,value:data.id})
if(data.isProduct>0){
bl=true
this.upProductId=data.id
let bl = false;
this.upProductId = -1;
this.productClassType = -1;
let data = this.cilckListRowData;
console.log(data);
if (data.id) {
this.$refs.addproduct.formValidate.classType = data.id;
this.productClassType = data.id;
this.$refs.addproduct.list.push({ label: data.name, value: data.id });
if (data.isProduct > 0) {
bl = true;
this.upProductId = data.id;
//this.$refs.addproduct.formValidate.classType=-1
this.productClassType=-1;
}else{
if(data.children==null)
{
bl=true
this.upProductId=0
this.productClassType = -1;
} else {
if (data.children == null) {
bl = true;
this.upProductId = 0;
} else {
bl = this.checkProduct(data.children);
if (bl) {
this.upProductId = 0;
}
else{
bl=this.checkProduct(data.children)
if(bl){this.upProductId=0}
}
}
if(!bl){
this.$Message.error('请选择最下面的层级或产品')
if (!bl) {
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;
//新增产品时的层级树
var that=this;
var url=`${designUrl}/productlevel/getallselecttreenew`
service.get(`${url}`).then(response=>{
that.$refs.addproduct.data1=(response.result)
})
},
rowClick(data, event, index, txt){
this.cilckListRowData=data;
var that = this;
var url = `${designUrl}/productlevel/getallselecttreenew`;
service.get(`${url}`).then(response => {
that.$refs.addproduct.data1 = response.result;
});
},
rowClick(data, event, index, txt) {
this.cilckListRowData = data;
console.log(data)
if(txt=="编辑"){
if(data.isProduct>0){
this.isedit0=true;
this.modal0=true;
let {name,drawingNo,remark,mmcode,madeCompany,classType}=data
console.log(data);
if (txt == "编辑") {
if (data.isProduct > 0) {
this.isedit0 = true;
this.modal0 = true;
let {
name,
drawingNo,
remark,
mmcode,
madeCompany,
classType
} = data;
//let classType=data.levelName
this.$refs.addproduct.list=[]
this.$refs.addproduct.list.push({label:data.upName,value:classType})
this.$refs.addproduct.componaylist=[]
this.$refs.addproduct.componaylist.push({label:data.madeCompanyName,value:madeCompany})
this.$refs.addproduct.formValidate={classType: classType, name: name,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(data.isProduct>0){
this.$refs.addproduct.list = [];
this.$refs.addproduct.list.push({
label: data.upName,
value: classType
});
this.$refs.addproduct.componaylist = [];
this.$refs.addproduct.componaylist.push({
label: data.madeCompanyName,
value: madeCompany
});
this.$refs.addproduct.formValidate = {
classType: classType,
name: name,
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 (data.isProduct > 0) {
//this.$Message.error('暂时不能删除产品');
// return
this.modal3=true;
this.$refs.mysel.confirmmodal=this.modal3
this.pid=data.id
this.delName="产品"
}
else{
var i=data.children.length;
this.lid=data.id
this.delName="层级"
if(i>0){
this.$Message.error('层级下有子节点,请先删除子节点!')
this.modal3 = true;
this.$refs.mysel.confirmmodal = this.modal3;
this.pid = data.id;
this.delName = "产品";
} else {
var i = data.children.length;
this.lid = data.id;
this.delName = "层级";
if (i > 0) {
this.$Message.error("层级下有子节点,请先删除子节点!");
return;
}
this.modal3=true;
this.$refs.mysel.confirmmodal=this.modal3
this.modal3 = true;
this.$refs.mysel.confirmmodal = this.modal3;
}
}
if(txt=="复制"){
this.$refs.mysel1.confirmmodal=true
if (txt == "复制") {
this.$refs.mysel1.confirmmodal = true;
}
},
del() {},
//产品列表
loadProduct(seoName){
var url=`${designUrl}/productlevel/getproducttreenew`
service.get(`${url}`,{seoName: seoName}).then(response=>{
this.data=response.result
})
loadProduct(seoName) {
var url = `${designUrl}/productlevel/getproducttreenew`;
service.get(`${url}`, { seoName: seoName }).then(response => {
this.data = response.result;
});
},
//保存产品
checkProduct(data){
var j=0;
var bl=false;
data.forEach((item,i)=>{
if(item.isProduct==1){
j++
checkProduct(data) {
var j = 0;
var bl = false;
data.forEach((item, i) => {
if (item.isProduct == 1) {
j++;
}
})
if(data.length==j){
bl=true
});
if (data.length == j) {
bl = true;
}
return bl
return bl;
},
ok0(name){
this.$refs.addproduct.$refs[name].validate((valid) => {
ok0(name) {
this.$refs.addproduct.$refs[name].validate(valid => {
if (valid) {
if (this.isedit0) {
} else {
// console.log(1)
var bl=false
var bl1=false
var selectId=-1;
var sel=this.$refs.addproduct.selectdata
console.log(sel)
if(sel.length>0){
bl1=true
var bl = false;
var bl1 = false;
var selectId = -1;
var sel = this.$refs.addproduct.selectdata;
console.log(sel);
if (sel.length > 0) {
bl1 = true;
//是产品
if(sel[0].isProduct>0){
bl=true
selectId=sel[0].productId
this.$refs.addproduct.formValidate.classType=-1
}else{
if(sel[0].children==null)
{
bl=true
selectId=0
if (sel[0].isProduct > 0) {
bl = true;
selectId = sel[0].productId;
this.$refs.addproduct.formValidate.classType = -1;
} else {
if (sel[0].children == null) {
bl = true;
selectId = 0;
} else {
bl = this.checkProduct(sel[0].children);
if (bl) {
selectId = 0;
}
else{
bl=this.checkProduct(sel[0].children)
if(bl){selectId=0}
}
}
if(!bl){
this.$Message.error('请选择最下面的层级或产品')
if (!bl) {
this.$Message.error("请选择最下面的层级或产品");
return;
}
}
}
this.formValidate0 = this.$refs.addproduct.formValidate
if(!this.isedit0){
if(bl1){
this.formValidate0.upId=selectId
}
else{
this.formValidate0.upId=this.upProductId
console.log(this.formValidate0.upId)
console.log(this.formValidate0)
this.formValidate0.classType=this.productClassType
}
}
var url=`${designUrl}/productinfo/createorupdate`
service.post(`${url}`,JSON.stringify({ProductInfo:this.formValidate0})).then(response=>{
if(response.success){
this.$Message.success('保存成功')
this.loadProduct()
this.formValidate0 = this.$refs.addproduct.formValidate;
if (!this.isedit0) {
if (bl1) {
this.formValidate0.upId = selectId;
} else {
this.formValidate0.upId = this.upProductId;
console.log(this.formValidate0.upId);
console.log(this.formValidate0);
this.formValidate0.classType = this.productClassType;
}
}
var url = `${designUrl}/productinfo/createorupdate`;
service
.post(`${url}`, JSON.stringify({ ProductInfo: this.formValidate0 }))
.then(response => {
if (response.success) {
this.$Message.success("保存成功");
this.loadProduct();
//this.loadlevel()
this.modal0 = false
this.modal0 = false;
}
}).catch(error=>{
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
} else {
setTimeout(() => {
this.myloading = false
this.myloading = false;
this.$nextTick(() => {
this.myloading = true
})
}, 500)
this.$Message.error('请输入必填项')
this.myloading = true;
});
}, 500);
this.$Message.error("请输入必填项");
}
})
});
},
cancel0(){
this.modal0=false;
cancel0() {
this.modal0 = false;
},
// 删除产品/层级
ok3(bl){
var url=""
var that=this
ok3(bl) {
var url = "";
var that = this;
if(this.delName=="产品"){
url=`${designUrl}/productinfo/delete?id=${this.pid}`
if (this.delName == "产品") {
url = `${designUrl}/productinfo/delete?id=${this.pid}`;
}
if(this.delName=="层级"){
url=`${designUrl}/productlevel/delete?id=${this.lid}`
if (this.delName == "层级") {
url = `${designUrl}/productlevel/delete?id=${this.lid}`;
}
service.delete(`${url}`).then(response=>{
service
.delete(`${url}`)
.then(response => {
if (response.result.status) {
this.$Message.success('删除成功')
this.loadProduct()
this.loadlevel()
}
else{
this.$Message.error(response.result.message)
this.$Message.success("删除成功");
this.loadProduct();
this.loadlevel();
} else {
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){
this.$refs.mysel.confirmmodal=this.modal3=bl;
cancel3(bl) {
this.$refs.mysel.confirmmodal = this.modal3 = bl;
},
copyok(bl){
this.$refs.mysel1.confirmmodal=bl
copyok(bl) {
this.$refs.mysel1.confirmmodal = bl;
},
copycancel(bl){
this.$refs.mysel1.confirmmodal=bl
copycancel(bl) {
this.$refs.mysel1.confirmmodal = bl;
},
//层级列表
loadlevel(){
var url=`${designUrl}/productlevel/gettree`
service.get(`${url}`).then(response=>{
this.leveldata=response.result
})
},
cancelClick(){
this.clickindexLevelData={}
this.clickindexLevel=-1
this.$refs.addclass.formValidate.upid=0
this.$refs.addclass.list=[]
this.$refs.addclass.list.push({label: '根节点', value: 0 })
this.$refs.addclass.data=[]
},
levelrowClick(data, event, index, txt){
this.clickindexLevel=data.id
this.clickindexLevelData=data
loadlevel() {
var url = `${designUrl}/productlevel/gettree`;
service.get(`${url}`).then(response => {
this.leveldata = response.result;
});
},
cancelClick() {
this.clickindexLevelData = {};
this.clickindexLevel = -1;
this.$refs.addclass.formValidate.upid = 0;
this.$refs.addclass.list = [];
this.$refs.addclass.list.push({ label: "根节点", value: 0 });
this.$refs.addclass.data = [];
},
levelrowClick(data, event, index, txt) {
this.clickindexLevel = data.id;
this.clickindexLevelData = data;
event.stopPropagation();
if(txt=="编辑"){
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=="删除"){
this.lid=data.id
this.delName="层级"
var i=data.children.length;
if(i>0){
this.$Message.error('层级下有子节点,请先删除子节点!')
if (txt == "编辑") {
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 == "删除") {
this.lid = data.id;
this.delName = "层级";
var i = data.children.length;
if (i > 0) {
this.$Message.error("层级下有子节点,请先删除子节点!");
return;
}
this.modal3=true;
this.$refs.mysel.confirmmodal=this.modal3
this.modal3 = true;
this.$refs.mysel.confirmmodal = this.modal3;
}
},
//层级列表
addclass() {
this.loadlevel()
this.isEdit=false
this.modal1=true;
this.clickindexLevel=-1
this.clickindexLevelData={}
this.loadlevel();
this.isEdit = false;
this.modal1 = true;
this.clickindexLevel = -1;
this.clickindexLevelData = {};
},
//新增层级
addchild(event){
this.modal2=true;
addchild(event) {
this.modal2 = true;
//阻止冒泡
event.stopPropagation();
delete this.$refs.addclass.formValidate.id;
this.$refs.addclass.formValidate.disabled=false
this.$refs.addclass.list=[]
this.$refs.addclass.data=[]
if(this.clickindexLevel>0){
this.$refs.addclass.formValidate.upid=this.clickindexLevel
let {name}=this.clickindexLevelData
this.$refs.addclass.list.push({label: `${name}`, value: this.clickindexLevel})
var url=`${designUrl}/productlevel/getselecttree`
service.get(`${url}`, {id:this.clickindexLevel}).then(response=>{
this.$refs.addclass.data=response.result
})
}else {
this.$refs.addclass.formValidate.upid=0
this.$refs.addclass.list.push({label: '根节点', value: 0 })
this.$refs.addclass.data=[]
this.$refs.addclass.formValidate.disabled = false;
this.$refs.addclass.list = [];
this.$refs.addclass.data = [];
if (this.clickindexLevel > 0) {
this.$refs.addclass.formValidate.upid = this.clickindexLevel;
let { name } = this.clickindexLevelData;
this.$refs.addclass.list.push({
label: `${name}`,
value: this.clickindexLevel
});
var url = `${designUrl}/productlevel/getselecttree`;
service.get(`${url}`, { id: this.clickindexLevel }).then(response => {
this.$refs.addclass.data = response.result;
});
} 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();
},
edit1(data){
this.isEdit = true
this.modal2 = true
this.$refs.addclass.$refs['formValidate'].resetFields();
let {prename,name,isProduct}=data.row;
this.$refs.addclass.list=[];
this.$refs.addclass.list.push({label:prename,value:prename})
this.$refs.addclass.formValidate={name:name,prename:prename,isproduct:isProduct}
},
del1(){
this.$refs.mysel0.confirmmodal=true;
edit1(data) {
this.isEdit = true;
this.modal2 = true;
this.$refs.addclass.$refs["formValidate"].resetFields();
let { prename, name, isProduct } = data.row;
this.$refs.addclass.list = [];
this.$refs.addclass.list.push({ label: prename, value: prename });
this.$refs.addclass.formValidate = {
name: name,
prename: prename,
isproduct: isProduct
};
},
del1() {
this.$refs.mysel0.confirmmodal = true;
// this.$Modal.confirm({
// title: '提示',
// okText: '确定',
......@@ -564,63 +625,67 @@ export default {
// }
// })
},
myselok(bl){
this.$refs.mysel0.confirmmodal=bl;
myselok(bl) {
this.$refs.mysel0.confirmmodal = bl;
},
myselcancel(bl){
this.$refs.mysel0.confirmmodal=bl;
myselcancel(bl) {
this.$refs.mysel0.confirmmodal = bl;
},
ok(name){
var url=`${designUrl}/productlevel/createorupdate`
this.$refs.addclass.$refs[name].validate((valid) => {
ok(name) {
var url = `${designUrl}/productlevel/createorupdate`;
this.$refs.addclass.$refs[name].validate(valid => {
if (valid) {
//this.$Message.success('Success!');
if (this.isedit) {
} else {
}
this.formValidate1 = this.$refs.addclass.formValidate
service.post(`${url}`,JSON.stringify({ProductLevel:this.formValidate1})).then(response=>{
if(response.result.status){
this.$Message.success('保存成功')
this.loadlevel()
this.loadProduct()
this.modal2 = false
}
else{
this.$Message.error(response.result.message)
this.formValidate1 = this.$refs.addclass.formValidate;
service
.post(
`${url}`,
JSON.stringify({ ProductLevel: this.formValidate1 })
)
.then(response => {
if (response.result.status) {
this.$Message.success("保存成功");
this.loadlevel();
this.loadProduct();
this.modal2 = false;
} else {
this.$Message.error(response.result.message);
}
}).catch(error=>{
this.$Message.error('保存失败')
})
.catch(error => {
this.$Message.error("保存失败");
});
//this.modal2 = false
} else {
setTimeout(() => {
this.myloading = false
this.myloading = false;
this.$nextTick(() => {
this.myloading = true
})
}, 500)
this.$Message.error('请输入必填项')
this.myloading = true;
});
}, 500);
this.$Message.error("请输入必填项");
}
})
});
},
cancel(){
this.modal2=false
cancel() {
this.modal2 = false;
}
},
created(){
this.loadProduct()
this.divHeihgt= window.innerHeight - 130+"px";
created() {
this.loadProduct();
this.divHeihgt = window.innerHeight - 130 + "px";
},
mounted() {
window.onresize = () => {
return (() => {
this.divHeihgt = window.innerHeight - 130+"px";
})()
this.divHeihgt = window.innerHeight - 130 + "px";
})();
};
}
},
}
};
</script>
<style scoped>
</style>
......@@ -319,6 +319,23 @@ export default {
},
// 搜索
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 => {
this.mDatas = res.result.items
this.search.total = res.result.totalCount
});
},
searchModel(){
this.showModel = true;
......
......@@ -30,7 +30,7 @@ const systemApi = {
let hostAddress = "localhost"; //192.168.0.159
let filePath = '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;
//占位符自动替换:
window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
......@@ -47,7 +47,8 @@ const systemApi = {
window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api
window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理
window.iconImg = `http://${hostAddress}:3000/imgicon/`; //待办任务图标路径
window.aps = `http://${apsUrl}:10110/api/services/app`;//aps手工排产
window.apsUrl = `http://${apsAdress}:10110/api/services/app`;//aps排产
window.apsManualUrl = `http://${apsAdress}:10091/api/services/app`;//aps手工排产
//oidc配置:
window.authConfig = {
authority: `http://${address}:10010`,
......
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