Commit 372ea4f2 authored by 张海景's avatar 张海景

update:修改排产数量改成任务数量

parent af17e432
......@@ -24,13 +24,12 @@
<u-form-item name="allowProduce" label-width="80px" label="当前可加工">
<uni-data-checkbox v-model="tableParams.allowProduce" @change="getTaskList" :localdata="allowProduceLocal"></uni-data-checkbox>
</u-form-item>
<u-form-item name="allowProduce" >
<u-form-item name="allowProduce">
<u-button @click="getTaskList" type="primary" size="medium">搜索</u-button>
</u-form-item>
</u-form>
</view>
<view class="prod-body-left-task">
<zb-table
ref="zbtable"
:columns="tableColumn"
......@@ -42,8 +41,7 @@
@toggleAllSelection="toggleAllSelection"
:border="true"
:data="tableData"
>
</zb-table>
></zb-table>
</view>
<view class="prod-body-left-num">可选订单数:{{ tableData.length }}</view>
<!-- <view class="prod-body-left-bom"> -->
......@@ -114,8 +112,8 @@
width="1800rpx"
>
<view>
<scroll-view style="max-height:600px;" scroll-y="true" class="scroll-Y">
<view class="feedback-card" v-for="(feedback,i) in feedbackForms" :key="i">
<scroll-view style="max-height: 600px" scroll-y="true" class="scroll-Y">
<view class="feedback-card" v-for="(feedback, i) in feedbackForms" :key="i">
<u-form label-width="80px" :model="feedback" :rules="rules" labelAlign="right">
<u-row>
<u-col span="6">
......@@ -138,11 +136,7 @@
<u-col span="6">
<u-form-item label="报工人:" prop="nickName">
<u-input v-model="feedback.nickName"></u-input>
<u-button
@tap="getCode(feedback)"
type="success"
size="mini"
>报工人员</u-button>
<u-button @tap="getCode(feedback)" type="success" size="mini">报工人员</u-button>
</u-form-item>
</u-col>
</u-row>
......@@ -155,8 +149,7 @@
</u-col>
<u-col span="6">
<u-form-item label="生产工单:" prop="workorderId">
<uni-data-select v-model="feedback.workorderId"
:localdata="feedback.workorderOption" @change="workorderSelect($event, i)"></uni-data-select>
<uni-data-select v-model="feedback.workorderId" :localdata="feedback.workorderOption" @change="workorderSelect($event, i)"></uni-data-select>
</u-form-item>
</u-col>
</u-row>
......@@ -184,8 +177,8 @@
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item v-if="feedback.whether=='1'" label="打印内容:" prop="printContents">
{{feedback.printContents}}
<u-form-item v-if="feedback.whether == '1'" label="打印内容:" prop="printContents">
{{ feedback.printContents }}
<!-- <u-input v-model="feedback."></u-input> -->
</u-form-item>
</u-col>
......@@ -217,12 +210,7 @@
<u-col span="6">
<u-form-item label="打印模板:" prop="printTemplate">
<u-input v-model="feedback.printTemplate" placeholder="请选择打印模板"></u-input>
<u-button
@tap="getPrintTemplate(feedback)"
type="success"
style="margin-left:20rpx;"
size="mini"
>选择打印模板</u-button>
<u-button @tap="getPrintTemplate(feedback)" type="success" style="margin-left: 20rpx" size="mini">选择打印模板</u-button>
</u-form-item>
</u-col>
</u-row>
......@@ -278,7 +266,7 @@
</u-col>
</u-row>
</u-form> -->
<dModelList :data="dModelData" @action="upDownGetList"/>
<dModelList :data="dModelData" @action="upDownGetList" />
</u-modal>
<!-- //生产报工报工人员 -->
<u-modal
......@@ -324,7 +312,7 @@
width="1300rpx"
>
<view class="feedback-card">
<u-form label-width="70px" labelAlign ="right" :model="ExceptionForms" :rules="rules">
<u-form label-width="70px" labelAlign="right" :model="ExceptionForms" :rules="rules">
<!-- <u-form-item label="异常时间" prop="abnormalTime">
<u-input :border="true" v-model="ExceptionForms.abnormalTime"></u-input>
<uni-datetime-picker class="times" type="date" :clear-icon="false" v-model="ExceptionForms.abnormalTime" />
......@@ -685,11 +673,7 @@
</u-form-item>
<u-form-item label="工作单元">
<u-input disabled v-model="jobAssignmentForm.workunitName" placeholder="选择工作单元"></u-input>
<u-button
@tap="workunitVisible = true"
type="success"
size="mini"
>选择工作单元</u-button>
<u-button @tap="workunitVisible = true" type="success" size="mini">选择工作单元</u-button>
</u-form-item>
</u-form>
</view>
......@@ -717,7 +701,7 @@ import userPersonnel from './components/userPersonnel.vue';
import printTemplate from './components/printTemplate.vue';
import workunitList from './components/workunitList.vue';
import UButton from '../../../uview-ui/components/u-button/u-button.vue';
import { handleError } from "vue";
import { handleError } from 'vue';
export default {
name: 'ProdReport',
components: {
......@@ -739,7 +723,8 @@ export default {
listTabPro: [
{
name: '指令列表'
}, {
},
{
name: 'SIZE列表'
}
],
......@@ -806,7 +791,7 @@ export default {
{
value: 'DEVI',
text: '设备异常'
},
}
],
stopReason: '',
stopReasonVisible: false,
......@@ -884,7 +869,7 @@ export default {
label: '编排单号',
width: 85,
cellFun: (row, index) => {
console.log(row, index)
console.log(row, index);
this.tableDataDetail = row.proWorkorderList;
this.showRowDeatilFlag = true;
}
......@@ -892,7 +877,7 @@ export default {
{
name: 'scheduleStartDateStr',
label: '计划开始时间',
width: 95,
width: 95
},
{
name: 'scheduleEndDateStr',
......@@ -901,8 +886,8 @@ export default {
},
{
name: 'quantity',
label: '排产数量',
width: 70,
label: '任务数量',
width: 70
},
{
name: 'quantityWait',
......@@ -919,7 +904,7 @@ export default {
ERROR_STOP: '异常停工',
FINISH: '完工'
},
width: 65,
width: 65
},
// {
// name: 'date',
......@@ -953,13 +938,13 @@ export default {
{
name: 'quantityQualify',
label: '合格数量',
width: 70,
width: 70
},
{
name: 'quantityUnqualify',
label: '不合格数量',
width: 80,
},
width: 80
}
// {
// name: 'clientName',
// label: '作业人员',
......@@ -972,7 +957,7 @@ export default {
feedbackForms: [],
ExceptionForms: {
abnormalType: null,
abnormalReason:null
abnormalReason: null
},
viewSopPicture: [],
viewSop: [],
......@@ -1122,7 +1107,7 @@ export default {
},
methods: {
handleChangeTabPro(index, row) {
row.currentTabPro = index
row.currentTabPro = index;
},
onPreviewTap(url) {
uni.previewImage({
......@@ -1139,30 +1124,26 @@ export default {
// }
// },
iconClickArrangeCode() {
uni.scanCode(
{
success:(res)=> {
console.log(res, 'res')
this.getTaskList({arrangeCode: res.result})
uni.scanCode({
success: (res) => {
console.log(res, 'res');
this.getTaskList({ arrangeCode: res.result });
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
fail: () => {
this.$u.toast('扫码失败,请重新扫描');
}
}
)
});
},
iconClickWorkorderCode(data) {
uni.scanCode(
{
success:(res)=> {
console.log(res, 'res')
this.getTaskList({workorderCode: res.result})
uni.scanCode({
success: (res) => {
console.log(res, 'res');
this.getTaskList({ workorderCode: res.result });
},
fail: ()=> {
this.$u.toast('扫码失败,请重新扫描')
fail: () => {
this.$u.toast('扫码失败,请重新扫描');
}
}
)
});
},
numclik(...arg) {
console.log('99999999', arg);
......@@ -1175,7 +1156,7 @@ export default {
// console.log(row, i, 999)
var oDate1 = new Date();
var oDate2 = new Date(row.scheduleEndDate);
if(oDate1.getTime() > oDate2.getTime()){
if (oDate1.getTime() > oDate2.getTime()) {
return true; //第一个大
} else {
return false; //第二个大
......@@ -1198,8 +1179,8 @@ export default {
} else {
this.$u.api.changeCheckMachineTool({
taskWorkunitId: item.taskWorkunitId
})
this.changeStatus(item.taskId, item.taskWorkunitId,'BEGINNING',item.workunitId, false);
});
this.changeStatus(item.taskId, item.taskWorkunitId, 'BEGINNING', item.workunitId, false);
}
});
if (status) {
......@@ -1214,7 +1195,7 @@ export default {
break;
case 'FinshTask':
this.tableSelectData.forEach((item) => {
this.changeStatus(item.taskId, item.taskWorkunitId,'FINISHED',item.workunitId);
this.changeStatus(item.taskId, item.taskWorkunitId, 'FINISHED', item.workunitId);
});
break;
case 'Prod':
......@@ -1259,22 +1240,22 @@ export default {
this.jobAssignmentForm = {
quantity: 1,
workunitName: null
}
this.jobAssignmentVisible = true
};
this.jobAssignmentVisible = true;
},
handleSubmitWorkunit() {
this.jobAssignmentForm.workunitId = this.$refs.workunitRef.tableSelectData[0].workunitId
this.jobAssignmentForm.workunitName = this.$refs.workunitRef.tableSelectData[0].workunitName
this.jobAssignmentForm.workunitId = this.$refs.workunitRef.tableSelectData[0].workunitId;
this.jobAssignmentForm.workunitName = this.$refs.workunitRef.tableSelectData[0].workunitName;
},
handleSubmitJobAssignment() {
let datas = Object.assign({}, this.tableSelectData[0])
datas.taskWorkunit = this.jobAssignmentForm
delete datas.proWorkorderList
let datas = Object.assign({}, this.tableSelectData[0]);
datas.taskWorkunit = this.jobAssignmentForm;
delete datas.proWorkorderList;
this.$u.api.putProtaskSplit(datas).then((res) => {
// console.log(res, 'res333')
if (res.code === 200) {
this.jobAssignmentVisible = false
this.getTaskList()
this.jobAssignmentVisible = false;
this.getTaskList();
}
});
},
......@@ -1352,13 +1333,13 @@ export default {
});
},
rowClick(row, index) {
this.$refs.zbtable.toggleRowSelection(row)
this.$refs.zbtable.toggleRowSelection(row);
this.curTaskInfo = row;
this.getMaterialUsageRecordList();
},
getCode(row){
this.usePersonData = row
this.userTempVisible=true;
getCode(row) {
this.usePersonData = row;
this.userTempVisible = true;
},
toggleAllSelection(checked, arr) {
// console.log(arr, 'this.tableSelectData');
......@@ -1371,14 +1352,14 @@ export default {
knifeTemp() {
// this.$u.toast('刀具校验通过!');
},
userDetermine(){
console.log(this.$refs.userPersonnelRef.tableSelectData, 'this.$refs.userPersonnelRef.tableSelectData')
this.usePersonData.nickName=this.$refs.userPersonnelRef.tableSelectData[0].nickName
this.usePersonData.userName = this.$refs.userPersonnelRef.tableSelectData[0]?.userName
userDetermine() {
console.log(this.$refs.userPersonnelRef.tableSelectData, 'this.$refs.userPersonnelRef.tableSelectData');
this.usePersonData.nickName = this.$refs.userPersonnelRef.tableSelectData[0].nickName;
this.usePersonData.userName = this.$refs.userPersonnelRef.tableSelectData[0]?.userName;
},
stopReasonSubmit() {
this.tableSelectData.forEach((item) => {
this.changeStop(item.taskId, item.taskWorkunitId,'PAUSE', item.workunitId);
this.changeStop(item.taskId, item.taskWorkunitId, 'PAUSE', item.workunitId);
});
this.getTaskList();
},
......@@ -1386,22 +1367,22 @@ export default {
this.stopReason += e;
},
workorderSelect(id, index) {
console.log(id, '9999')
console.log(id, '9999');
const row = this.feedbackForms[index];
if(!id){
if (!id) {
row.sizeList = [];
row.directiveList = [];
row.workorderSoSizeItemId = '';
row.printContents = row.arrangeCode
row.printContents = row.arrangeCode;
row.workorderSoDirectiveId = '';
row.tableDirectiveData = []
row.tableSizeColumn = []
row.tableSizeData = []
row.tableDirectiveData = [];
row.tableSizeColumn = [];
row.tableSizeData = [];
return;
} else {
if (row.isLastProcess) {
this.getWorkorderDirectiveList(id, index)
this.getWorkorderSizeList(id, index)
this.getWorkorderDirectiveList(id, index);
this.getWorkorderSizeList(id, index);
}
}
row.workorderId = id;
......@@ -1409,7 +1390,7 @@ export default {
row.workorderCode = items.workorderCode;
row.printName = items.workorderCode;
//row.printContents =row.arrangeCode+row.workorderCode
row.printContents =row.workorderCode
row.printContents = row.workorderCode;
row.sizeList = row.sizeData[id];
row.directiveList = row.directiveData[id];
row.packByDirective = items.packByDirective;
......@@ -1439,7 +1420,7 @@ export default {
.detail({
pageNum: 1,
pageSize: 10,
abnormalType:'WORK'
abnormalType: 'WORK'
})
.then((res) => {
this.causeList = res.rows.map((item) => {
......@@ -1460,48 +1441,48 @@ export default {
.then((res) => {
item.workorderList = res.rows;
//如果只关联一个订单,默认选中
if(res.rows.length==1){
item.printContents = res.rows[0].workorderCode
if (res.rows.length == 1) {
item.printContents = res.rows[0].workorderCode;
item.workorderId = res.rows[0].workorderId;
item.workorderCode = res.rows[0].workorderCode;
if (item.isLastProcess) {
this.getWorkorderDirectiveList(res.rows[0].workorderId, index)
this.getWorkorderSizeList(res.rows[0].workorderId, index)
this.getWorkorderDirectiveList(res.rows[0].workorderId, index);
this.getWorkorderSizeList(res.rows[0].workorderId, index);
}
if(res.rows[0].sizeList2!=null){
item.sizeList = res.rows[0].sizeList2.map(temp2=>{
if (res.rows[0].sizeList2 != null) {
item.sizeList = res.rows[0].sizeList2.map((temp2) => {
return {
value: temp2.workorderSoSizeItemId,
text: temp2.standardSize
}
};
});
}
if(res.rows[0].saleDirectiveList!=null){
item.directiveList = res.rows[0].saleDirectiveList.map(temp2=>{
if (res.rows[0].saleDirectiveList != null) {
item.directiveList = res.rows[0].saleDirectiveList.map((temp2) => {
return {
value: temp2.workorderSoDirectiveId,
text: temp2.clientCmd
}
};
});
}
item.packByDirective = res.rows[0].packByDirective;
item.packBySize = res.rows[0].packBySize;
}
item.workorderOption = res.rows.map((temp) => {
if(temp.saleDirectiveList!=null){
item.directiveData[temp.workorderId] = temp.saleDirectiveList.map(temp2=>{
if (temp.saleDirectiveList != null) {
item.directiveData[temp.workorderId] = temp.saleDirectiveList.map((temp2) => {
return {
value: temp2.workorderSoDirectiveId,
text: temp2.clientCmd
}
};
});
}
if(temp.sizeList2!=null){
item.sizeData[temp.workorderId] = temp.sizeList2.map(temp2=>{
if (temp.sizeList2 != null) {
item.sizeData[temp.workorderId] = temp.sizeList2.map((temp2) => {
return {
value: temp2.workorderSoSizeItemId,
text: temp2.standardSize
}
};
});
}
return {
......@@ -1515,7 +1496,7 @@ export default {
getTaskList(params) {
this.form = {};
const t = this;
this.tableData= []
this.tableData = [];
this.$u.api
.getTaskList({
workunitId: t.vuex_workunit.workunitId,
......@@ -1525,13 +1506,13 @@ export default {
.then((res) => {
if (res.code === 200) {
// 过滤可加工数量为0的数据
this.tableData = res.rows.map(item => {
this.tableData = res.rows.map((item) => {
return {
...item,
scheduleStartDateStr: item.scheduleStartDate.substring(2, 16),
scheduleEndDateStr: item.scheduleEndDate.substring(2, 16),
}
})
scheduleEndDateStr: item.scheduleEndDate.substring(2, 16)
};
});
if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0];
this.getMaterialUsageRecordList();
......@@ -1596,7 +1577,7 @@ export default {
}
});
},
changeStatus(taskId, taskWorkunitId, status,workunitId, showToast ) {
changeStatus(taskId, taskWorkunitId, status, workunitId, showToast) {
// this.form.status = status;
this.$u.api
.changeStatus({
......@@ -1608,8 +1589,8 @@ export default {
})
.then((res) => {
if (res.code === 200) {
let showToastData = showToast === false? false: true
if(showToastData) {
let showToastData = showToast === false ? false : true;
if (showToastData) {
this.$u.toast('变更成功');
}
this.getTaskList();
......@@ -1617,7 +1598,7 @@ export default {
});
},
//暂停作业
changeStop(taskId, taskWorkunitId, status , workunitId) {
changeStop(taskId, taskWorkunitId, status, workunitId) {
// this.form.status = status;
this.$u.api
.changeStatus({
......@@ -1650,20 +1631,20 @@ export default {
this.feedbackForm.quantity = this.feedbackForm.quantityQualify + this.feedbackForm.quantityUnqualify;
},
getPrintTemplate(row) {
this.printTemplateData = row
this.printTemplateVisible = true
this.printTemplateData = row;
this.printTemplateVisible = true;
},
handleSubmitPrintTemplate() {
this.printTemplateData.printTemplate = this.$refs.printTemplateRef.tableSelectData[0].name
this.printTemplateVisible = false
this.printTemplateData.printTemplate = this.$refs.printTemplateRef.tableSelectData[0].name;
this.printTemplateVisible = false;
},
doFeedback() {
// this.reset();
this.feedbackForms = [];
this.tableSelectData.forEach((item, index) => {
let defQualify = item.quantity-item.quantityQualify-item.quantityUnqualify;
defQualify = defQualify<0?0:defQualify;
defQualify = defQualify>item.quantityWait?item.quantityWait:defQualify;
let defQualify = item.quantity - item.quantityQualify - item.quantityUnqualify;
defQualify = defQualify < 0 ? 0 : defQualify;
defQualify = defQualify > item.quantityWait ? item.quantityWait : defQualify;
const feedback = {
...item,
workstationId: item.workstationId,
......@@ -1672,10 +1653,10 @@ export default {
taskWorkunitId: item.taskWorkunitId,
feedbackChannel: 'PAD',
quantity: item.quantity,
quantityQualify: Number(defQualify),//默认为排产数量-合格数-不合格数
quantityQualify: Number(defQualify), //默认为排产数量-合格数-不合格数
quantityUnqualify: 0,
printName: '',
lastProcess: item.isLastProcess==1,//未工序
lastProcess: item.isLastProcess == 1, //未工序
nickName: this.vuex_user.nickName,
workorderId: 0,
workorderCode: null,
......@@ -1685,8 +1666,8 @@ export default {
minPackageNum: 0,
workorderList: [],
workorderOption: [],
directiveList:[],
sizeList:[],
directiveList: [],
sizeList: [],
directiveData: {},
sizeData: {},
printContents: item.arrangeCode,
......@@ -1717,7 +1698,7 @@ export default {
name: 'quantityQualify',
label: '合格品数量',
width: 130
},
}
],
tableDirectiveData: [],
tableSizeColumn: [],
......@@ -1737,14 +1718,14 @@ export default {
workorderId: id
})
.then((res) => {
console.log(res, '88999res')
console.log(res, '88999res');
if (res.code === 200) {
row.tableDirectiveData = res.rows
row.tableDirectiveData = res.rows;
}
// row.tableDirectiveData = []
// row.tableSizeColumn = []
// row.tableSizeData = []
})
});
},
// 获取SIZE列表
getWorkorderSizeList(id, index) {
......@@ -1754,8 +1735,8 @@ export default {
workorderId: id
})
.then((res) => {
console.log(res, '88999resSize')
let columns = []
console.log(res, '88999resSize');
let columns = [];
if (res.code === 200) {
for (const key in res.data.columns) {
if (res.data.columns.hasOwnProperty.call(res.data.columns, key)) {
......@@ -1763,20 +1744,20 @@ export default {
let obj = {
name: key,
label: element
}
columns.push(obj)
};
columns.push(obj);
}
}
row.tableSizeColumn = columns
row.tableSizeData = res.data.sizeList
row.tableSizeColumn = columns;
row.tableSizeData = res.data.sizeList;
}
})
});
},
doException() {
this.ExceptionForms = {
abnormalType: null,
abnormalReason:null
abnormalReason: null
};
const item = this.tableSelectData[0];
Object.assign(this.ExceptionForms, {
......@@ -1799,7 +1780,6 @@ export default {
const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms);
this.$u.toast('上报成功');
this.getTaskList();
},
cancel() {
this.proVisible = false;
......@@ -1811,19 +1791,20 @@ export default {
this.$u.toast('请填写合格/不合格产品数量!');
return;
}
if(item.lastProcess){//最后工序
if(item.packByDirective=='Y' && !item.workorderSoDirectiveId){
if (item.lastProcess) {
//最后工序
if (item.packByDirective == 'Y' && !item.workorderSoDirectiveId) {
this.$u.toast('订单按指令包装,指令码必选!');
return;
}else if(item.packBySize=='Y' && !item.workorderSoSizeItemId){
} else if (item.packBySize == 'Y' && !item.workorderSoSizeItemId) {
this.$u.toast('订单按SIZE包装,SIZE必选!');
return;
}
}
console.log(this.vuex_printConnect, 'this.vuex_printConnect')
if((item.printTemplate || item.whether=='1') && !this.vuex_printConnect) {
console.log(this.vuex_printConnect, 'this.vuex_printConnect');
if ((item.printTemplate || item.whether == '1') && !this.vuex_printConnect) {
this.$u.toast('打印机连接失败');
return
return;
}
//工单
this.$u.api
......@@ -1831,7 +1812,7 @@ export default {
taskWorkunitId: item.taskWorkunitId,
taskId: item.taskId,
taskCode: item.taskCode,
quantityFeedback: item.quantityQualify+item.quantityUnqualify,
quantityFeedback: item.quantityQualify + item.quantityUnqualify,
quantityQualify: item.quantityQualify,
quantityUnqualify: item.quantityUnqualify,
userName: item.userName || this.vuex_user.userName,
......@@ -1855,31 +1836,31 @@ export default {
workorderSoSizeItemId: item.workorderSoSizeItemId,
netWeight: item.netWeight,
minPackageNum: item.minPackageNum,
printContents: item.whether=='1'?item.printContents: null
printContents: item.whether == '1' ? item.printContents : null
})
.then((res) => {
if (res.code === 200) {
this.proVisible = false;
if (res.msg === '操作成功') {
this.$u.toast('上报成功');
if(item.printTemplate) {
let params = {}
res.data.forEach(datas => {
if (item.printTemplate) {
let params = {};
res.data.forEach((datas) => {
params = {
reportName: 'mysql:'+item.printTemplate,
reportName: 'mysql:' + item.printTemplate,
values: {
proWorkorder: datas.proWorkorder,
size: datas.size,
directive: datas.directive
}
};
datas.packagePrintList.forEach((v) => {
params.values.packagePrint = v;
this.printPdfSocket(params);
});
});
}
datas.packagePrintList.forEach(v => {
params.values.packagePrint = v
this.printPdfSocket(params)
})
})
}
if(item.whether=='1'){
if (item.whether == '1') {
this.printPdfSocket({
reportName: 'mysql:qrcode-50*50-2',
values: {
......@@ -1887,10 +1868,10 @@ export default {
{
barcode: item.printContents,
gp: item.printContents
},
],
},
})
}
]
}
});
}
}
if (!res.msg) {
......@@ -1899,12 +1880,9 @@ export default {
this.$u.toast(res.msg);
}
this.getTaskList();
}
});
})
});
},
feedingInspectionShow() {
this.feedingInspectionVisible = true;
......@@ -1930,7 +1908,7 @@ export default {
const taskInfo = this.tableSelectData[0];
uni.scanCode({
success: function (res) {
t.$u.api.validateFeedingInspection({ plnr: res.result,taskId: taskInfo.taskId }).then((res2) => {
t.$u.api.validateFeedingInspection({ plnr: res.result, taskId: taskInfo.taskId }).then((res2) => {
if (res2.code === 200) {
t.feedingInspectionLoadAndScan(true);
}
......@@ -2006,7 +1984,7 @@ export default {
this.$u.api.listMaterialRequest({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) {
this.materialRequestList = res.data;
this.materialRequestArrays = this.materialRequestList.concat([])
this.materialRequestArrays = this.materialRequestList.concat([]);
}
});
},
......@@ -2023,8 +2001,8 @@ export default {
const rst = [];
const taskInfo = this.tableSelectData[0];
const t = this;
const items = this.curTaskInfo.workorderOption.find((item) => item.text === this.curTaskInfo.workorderCode );
console.log( this.curTaskInfo.workorderOption , this.curTaskInfo.workorderCode, items)
const items = this.curTaskInfo.workorderOption.find((item) => item.text === this.curTaskInfo.workorderCode);
console.log(this.curTaskInfo.workorderOption, this.curTaskInfo.workorderCode, items);
this.materialRequestArrays.forEach((s) => {
if (s.applyNum != null) {
rst.push({
......@@ -2079,17 +2057,16 @@ export default {
});
},
materialReturnWorkorderProcessItem(id) {
if(!id){
this.materialRequestArrays = this.materialRequestList.concat([])
}else{
this.$u.api.getWproworkOrderProcessItem({ workorderId: id, processId: this.curTaskInfo.processId}).then((res) => {
if (!id) {
this.materialRequestArrays = this.materialRequestList.concat([]);
} else {
this.$u.api.getWproworkOrderProcessItem({ workorderId: id, processId: this.curTaskInfo.processId }).then((res) => {
if (res.code === 200) {
this.materialRequestArrays = this.materialRequestList.concat(res.rows)
this.materialRequestArrays = this.materialRequestList.concat(res.rows);
}
});
}
},
},
materialReturnFormShow(line) {
this.materialReturnFormVisible = true;
......@@ -2128,17 +2105,17 @@ export default {
workOrderId: s.workorderId,
batchNo: s.batchCode,
packNo: s.packNo,
isQualified: s.isQualified,
}
isQualified: s.isQualified
};
if (this.materialReturnFormData.workorderCode) {
data.workorderCode = this.materialReturnFormData.workorderCode
data.workorderCode = this.materialReturnFormData.workorderCode;
} else {
data.workorderCode = this.curTaskInfo.workorderOption.flatMap(it => it.value).join(',')
data.workorderCode = this.curTaskInfo.workorderOption.flatMap((it) => it.value).join(',');
}
return data
return data;
});
if (this.materialReturnList.length === 0) {
return
return;
}
this.$u.api.addMaterialReturn(rst).then((res) => {
this.materialReturnFormVisible = false;
......@@ -2172,9 +2149,9 @@ export default {
width: 40%;
}
.tableForm{
display:flex;
margin:20rpx 0rpx;
.tableForm {
display: flex;
margin: 20rpx 0rpx;
}
.task_card {
......@@ -2243,8 +2220,8 @@ export default {
height: calc(100vh - 200rpx);
min-height: 400rpx;
border: 1px solid rgb(232, 232, 232);
/deep/ .item-tr.trbg .item-td{
background:#fb9461 !important;
/deep/ .item-tr.trbg .item-td {
background: #fb9461 !important;
// color:#fff !important;
}
}
......
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