|
|
|
|
@ -1,24 +1,23 @@
|
|
|
|
|
<template>
|
|
|
|
|
<lay-container fluid="true"
|
|
|
|
|
:style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')">
|
|
|
|
|
<lay-container fluid="true" :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')">
|
|
|
|
|
<lay-row space="10">
|
|
|
|
|
<lay-col span="24">
|
|
|
|
|
<lay-card>
|
|
|
|
|
<lay-form :model="searchObj" class="search-box">
|
|
|
|
|
<lay-row class="search-items">
|
|
|
|
|
<lay-form-item label="物料号" prop="FSaleCode">
|
|
|
|
|
<lay-input v-model="searchObj.FSaleCode"></lay-input>
|
|
|
|
|
<lay-form-item label="物料号" prop="FMaterialCode">
|
|
|
|
|
<lay-input v-model="searchObj.FMaterialCode"></lay-input>
|
|
|
|
|
</lay-form-item>
|
|
|
|
|
<lay-form-item label="当前流程" prop="FType">
|
|
|
|
|
<lay-select v-model="searchObj.FType">
|
|
|
|
|
<lay-form-item label="类型" prop="FTeamworkType">
|
|
|
|
|
<lay-select v-model="searchObj.FTeamworkType">
|
|
|
|
|
<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue"
|
|
|
|
|
:label="tIdv.FName"></lay-select-option>
|
|
|
|
|
:label="tIdv.FName"></lay-select-option>
|
|
|
|
|
</lay-select>
|
|
|
|
|
</lay-form-item>
|
|
|
|
|
<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState">
|
|
|
|
|
<lay-select v-model="searchObj.FState">
|
|
|
|
|
<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id"
|
|
|
|
|
:label="tv.name"></lay-select-option>
|
|
|
|
|
:label="tv.name"></lay-select-option>
|
|
|
|
|
</lay-select>
|
|
|
|
|
</lay-form-item>
|
|
|
|
|
<lay-form-item label="发起日期" prop="FDateRange">
|
|
|
|
|
@ -39,9 +38,13 @@
|
|
|
|
|
<lay-button size="sm" type="normal" @click="showEditMaterial(1)">新增</lay-button>
|
|
|
|
|
<lay-button size="sm" type="primary" @click="showEditMaterial(2)">修改</lay-button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:FStateName="{ data }">
|
|
|
|
|
<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span>
|
|
|
|
|
<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span>
|
|
|
|
|
<template v-slot:FTeamworkType="{ data }">
|
|
|
|
|
<span v-if="data.FTeamworkType==1" style="color:#5FB878">新增</span>
|
|
|
|
|
<span v-else style="color:#1E9FFF">修改</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:FState="{ data }">
|
|
|
|
|
<span v-if="data.FState==1" style="color:#5FB878">进行中</span>
|
|
|
|
|
<span v-else style="color:#1E9FFF">已完成</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }">
|
|
|
|
|
<lay-button size="xs" type="primary" @click="showEditMaterial(3)">视图</lay-button>
|
|
|
|
|
@ -84,22 +87,23 @@
|
|
|
|
|
},
|
|
|
|
|
setup() {
|
|
|
|
|
let dataColumn = [
|
|
|
|
|
{
|
|
|
|
|
title: "ID",
|
|
|
|
|
key: "FID",
|
|
|
|
|
width: "160px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
hide: false
|
|
|
|
|
},{
|
|
|
|
|
title: "物料号",
|
|
|
|
|
key: "FMdmCode",
|
|
|
|
|
width: "300px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
hide: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "ID",
|
|
|
|
|
key: "FID",
|
|
|
|
|
width: "80px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
hide: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "物料描述",
|
|
|
|
|
key: "FSaleCode",
|
|
|
|
|
key: "FMaterialName",
|
|
|
|
|
width: "300px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
hide: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "物料号",
|
|
|
|
|
key: "FMaterialCode",
|
|
|
|
|
width: "160px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
hide: false
|
|
|
|
|
@ -113,34 +117,35 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "产品分类",
|
|
|
|
|
key: "FDesc",
|
|
|
|
|
width: "400px",
|
|
|
|
|
key: "FMaterialType",
|
|
|
|
|
width: "200px",
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "发起时间",
|
|
|
|
|
key: "FAddDate",
|
|
|
|
|
width: "180px",
|
|
|
|
|
width: "200px",
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "发起人",
|
|
|
|
|
key: "FUserName",
|
|
|
|
|
width: "178px",
|
|
|
|
|
width: "160px",
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "类型",
|
|
|
|
|
key: "IsEdit",
|
|
|
|
|
width: "98px",
|
|
|
|
|
key: "FTeamworkType",
|
|
|
|
|
width: "100px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
customSlot: '',
|
|
|
|
|
customSlot: 'FTeamworkType',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "状态",
|
|
|
|
|
key: "FStateName",
|
|
|
|
|
width: "160px",
|
|
|
|
|
align: 'center'
|
|
|
|
|
key: "FState",
|
|
|
|
|
width: "100px",
|
|
|
|
|
align: 'center',
|
|
|
|
|
customSlot: 'FState',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "操作",
|
|
|
|
|
@ -234,44 +239,49 @@
|
|
|
|
|
this.showEditBox[i] = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async _getTypeList() {
|
|
|
|
|
this.typeList = await getBasicList(33) || [];
|
|
|
|
|
_getTypeList() {
|
|
|
|
|
this.typeList = [{
|
|
|
|
|
0: "全部",
|
|
|
|
|
1: "新增",
|
|
|
|
|
2: "修改"
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
//分页列表
|
|
|
|
|
async _getPageList(isFirst, showOk) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//this.dataList = [];
|
|
|
|
|
this.pageInfo.total = 0;
|
|
|
|
|
if (isFirst) {
|
|
|
|
|
this.pageInfo.current = 1;
|
|
|
|
|
this.pageInfo.total = 0;
|
|
|
|
|
}
|
|
|
|
|
if (this.dataInfoObj && this.dataInfoObj.FID) {
|
|
|
|
|
this.postData.FTeamID = this.dataInfoObj.FID;
|
|
|
|
|
this.postData.FIsUser = false;
|
|
|
|
|
|
|
|
|
|
// 物料号
|
|
|
|
|
if (this.searchObj && this.searchObj.FMaterialCode) {
|
|
|
|
|
this.postData.FMaterialCode = this.searchObj.FMaterialCode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 类型
|
|
|
|
|
if (this.searchObj && this.searchObj.FTeamworkType) {
|
|
|
|
|
this.postData.FTeamworkType = this.searchObj.FTeamworkType
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 事项状态
|
|
|
|
|
if (this.searchObj && this.searchObj.FState) {
|
|
|
|
|
this.postData.FState = this.searchObj.FState
|
|
|
|
|
}
|
|
|
|
|
if (this.pageTypeObj && this.pageTypeObj == 2) {
|
|
|
|
|
this.postData.FState = 99;
|
|
|
|
|
|
|
|
|
|
// 发起日期
|
|
|
|
|
if (this.searchObj && this.searchObj.FDateRange) {
|
|
|
|
|
this.postData.FDateRange = this.searchObj.FDateRange
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.postData.FPageIndex = this.pageInfo.current;
|
|
|
|
|
this.postData.FPageSize = this.pageInfo.limit;
|
|
|
|
|
let result = await getPageList(this.postData, "Task");
|
|
|
|
|
let result = await getPageList(this.postData, "MaterialTeamwork");
|
|
|
|
|
|
|
|
|
|
result.Data.List = result.Data.List || [];
|
|
|
|
|
result.Data.List.forEach((item) => {
|
|
|
|
|
let type = this.typeList.find(s => s.FValue === item.FType);
|
|
|
|
|
item.FTypeName = type == null ? "" : type.FName;
|
|
|
|
|
let state = this.stateList.find(s => s.id === item.FState)
|
|
|
|
|
item.FStateName = state == null ? "" : state.name;
|
|
|
|
|
item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate);
|
|
|
|
|
item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate);
|
|
|
|
|
item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate);
|
|
|
|
|
item["IsEdit"]=Math.floor(Math.random()*10)==0?"编辑":"新增";
|
|
|
|
|
});
|
|
|
|
|
this.pageInfo.total = result.Data.Total || 0;
|
|
|
|
|
debugger
|
|
|
|
|
this.pageInfo.total = result.Data.Total || 0;
|
|
|
|
|
this.dataList = result.Data.List;
|
|
|
|
|
console.log('this.dataList', this.dataList);
|
|
|
|
|
this.hasLoaded = true;
|
|
|
|
|
},
|
|
|
|
|
//日期处理
|
|
|
|
|
|