镀后入库和工序检验页面接口联调

master
zhangdi 5 days ago
parent b53d05b4a1
commit e62b2a1eb9
  1. 56
      api/product.js
  2. 14
      api/system/dict.js
  3. 31
      pages/index/menu.js
  4. 223
      pages/production/afterPlatingInStore.vue
  5. 259
      pages/production/processIns.vue
  6. BIN
      static/images/menus/afterPlatingInStore.png
  7. BIN
      static/images/menus/processIns.png

@ -1,6 +1,6 @@
import http from '@/http/api.js' import http from '@/http/api.js'
// 工序接收 查询数据 // 工序接收 查询数据
const loadNotReceived = (params) => { const loadNotReceived = (params) => {
return http.request({ return http.request({
url: '/blade-desk/prMakeRec/loadNotReceived', url: '/blade-desk/prMakeRec/loadNotReceived',
method: 'GET', method: 'GET',
@ -9,7 +9,7 @@ import http from '@/http/api.js'
} }
// 工序接收 / // 工序接收 /
const workPlanReceive = (params) => { const workPlanReceive = (params) => {
return http.request({ return http.request({
url: '/blade-desk/produceMonitor/workPlanReceive', url: '/blade-desk/produceMonitor/workPlanReceive',
method: 'POST', method: 'POST',
@ -18,7 +18,7 @@ import http from '@/http/api.js'
} }
// 工序报工查询 /prMakeRec/loadCurrentWp // 工序报工查询 /prMakeRec/loadCurrentWp
const loadCurrentWp = (params) => { const loadCurrentWp = (params) => {
return http.request({ return http.request({
url: '/blade-desk/prMakeRec/loadCurrentWp', url: '/blade-desk/prMakeRec/loadCurrentWp',
method: 'GET', method: 'GET',
@ -26,7 +26,7 @@ import http from '@/http/api.js'
}) })
} }
// 工序报工提交 /prMakeRec/saveMakeRec // 工序报工提交 /prMakeRec/saveMakeRec
const saveMakeRec = (data) => { const saveMakeRec = (data) => {
return http.request({ return http.request({
url: '/blade-desk/prMakeRec/saveMakeRec', url: '/blade-desk/prMakeRec/saveMakeRec',
method: 'POST', method: 'POST',
@ -34,9 +34,55 @@ import http from '@/http/api.js'
}) })
} }
// 工序检验查询
const loadProTest = (params) => {
return http.request({
url: '/blade-desk/pdaLoad/loadProTest/' + params.cardNo,
method: 'GET',
})
}
// 系统字段查询
const dictionaryNew = (params) => {
return http.request({
url: '/blade-system/dict/dictionary',
method: 'GET',
params
})
}
// 工序检验保存 /pdaLoad/saveProCheck
const saveProCheck = (data) => {
return http.request({
url: '/blade-desk/pdaLoad/saveProCheck',
method: 'POST',
data: data
})
}
// 获取镀后入库的数据
const getAfterPlatInCardNo = (params) => {
return http.request({
url: '/blade-desk/plateAround/getAfterPlatInCardNo',
method: 'get',
params
})
}
// 保存镀后入库的数据
const saveAfterPlatIn = (data) => {
return http.request({
url: '/blade-desk/plateAround/savePlateAfterEnter',
method: 'POST',
data: data
})
}
export default { export default {
loadNotReceived, loadNotReceived,
workPlanReceive, workPlanReceive,
loadCurrentWp, loadCurrentWp,
saveMakeRec saveMakeRec,
loadProTest,
dictionaryNew,
saveProCheck,
getAfterPlatInCardNo,
saveAfterPlatIn
} }

@ -3,7 +3,7 @@ import http from '@/http/api.js'
// //
export const dictionary = (params) => { export const dictionary = (params) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/dictionary', url: '/blade-system/dict/dictionary',
method: 'GET', method: 'GET',
params params
}) })
@ -12,7 +12,7 @@ export const dictionary = (params) => {
export const parentList = (params) => { export const parentList = (params) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/parent-list', url: '/blade-system/dict/parent-list',
method: 'GET', method: 'GET',
params params
}) })
@ -20,7 +20,7 @@ export const parentList = (params) => {
export const remove = (ids) => { export const remove = (ids) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/remove', url: '/blade-system/dict/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -30,7 +30,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/submit', url: '/blade-system/dict/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -38,7 +38,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/submit', url: '/blade-system/dict/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -46,7 +46,7 @@ export const update = (row) => {
export const dictTree = (params) => { export const dictTree = (params) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/tree?code=DICT', url: '/blade-system/dict/tree?code=DICT',
method: 'GET', method: 'GET',
params params
}) })
@ -54,7 +54,7 @@ export const dictTree = (params) => {
export const child = (params) => { export const child = (params) => {
return http.request({ return http.request({
url: '/api/blade-system/dict/child-list', url: '/blade-system/dict/child-list',
method: 'GET', method: 'GET',
params params
}) })

@ -76,8 +76,39 @@ const menus = {
type: '' type: ''
} }
}, },
{
key: "afterPlatingInStore",
title: "镀后入库",
url: "../production/afterPlatingInStore",
bgColor: '',
limit: 'RB2307',
icon: {
size: 20,
color: '#00b7ee',
type: ''
}
},
] ]
}, },
{
title: '质量管理',
children: [
{
key: "processIns",
title: "工序检验",
url: "../production/processIns",
bgColor: '',
limit: 'RB2306',
icon: {
size: 20,
color: '#00b7ee',
type: ''
}
},
]
},
{ {
title: '设备管理', title: '设备管理',
children: [ children: [

@ -2,15 +2,21 @@
<ifrm ref="ifrm"> <ifrm ref="ifrm">
<!-- 镀后入库 --> <!-- 镀后入库 -->
<uni-forms ref="form" err-show-type="toast"> <uni-forms ref="form" err-show-type="toast">
<uni-forms-item name="allegation"><input type="text" v-model="value" @confirm="confirm" <uni-forms-item name="allegation"
class="uni-input-border" placeholder="流程卡" /></uni-forms-item> ><input
type="text"
v-model="value"
@confirm="confirm"
class="uni-input-border"
placeholder="流程卡"
/></uni-forms-item>
</uni-forms> </uni-forms>
<t-table style="margin-top:20rpx"> <t-table style="margin-top: 20rpx">
<t-tr> <t-tr>
<t-td>移交类型</t-td> <t-td>移交类型</t-td>
<t-td> <t-td>
<picker @change="bindPickerChange" :value="index" :range="array"> <picker @change="bindPickerChange" :value="index" :range="array">
<view style="font-size: 32rpx;">{{array[index]}}</view> <view style="font-size: 32rpx">{{ array[index] }}</view>
</picker> </picker>
</t-td> </t-td>
</t-tr> </t-tr>
@ -28,65 +34,73 @@
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>需求部门</t-td> <t-td>需求部门</t-td>
<t-td>{{ prWorkOrder.pjYieldOrder.useDept }}</t-td> <t-td>{{ prWorkOrder.useDept }}</t-td>
</t-tr> </t-tr>
<t-tr> <!-- <t-tr>
<t-td>零件编码</t-td> <t-td>零件编码</t-td>
<t-td>{{ prWorkOrder.pjYieldOrder.partCode }}</t-td> <t-td>{{ prWorkOrder.partCode }}</t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>零件名称</t-td> <t-td>零件名称</t-td>
<t-td>{{ prWorkOrder.pjYieldOrder.partName }}</t-td> <t-td>{{ prWorkOrder.partName }}</t-td>
</t-tr> </t-tr> -->
<t-tr> <t-tr>
<t-td>工序号</t-td> <t-td>工序号</t-td>
<t-td>{{ prWorkPlan.orders }}</t-td> <t-td>{{ prWorkPlan.processCode }}</t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>工序名称</t-td> <t-td>工序名称</t-td>
<t-td>{{ prWorkPlan.procedureSet.ppsName }}</t-td> <t-td>{{ prWorkPlan.processName }}</t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>班组/供应商</t-td> <t-td>班组/供应商</t-td>
<t-td>{{ makeTeam.tsName || oemCustomer.ocName }}</t-td> <t-td>{{ prWorkPlan.teamCode || prWorkPlan.ocName }}</t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>入库数量</t-td> <t-td>入库数量</t-td>
<t-td>{{ prWorkOrder.makeQty }}</t-td> <t-td>{{ prWorkOrder.inQuantity }}</t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>移交部门</t-td> <t-td>移交部门</t-td>
<t-td><input type="text" v-model="useDept" /></t-td> <t-td><input type="text" v-model="useDept" /></t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td style="color:red">重量</t-td> <t-td style="color: red">重量</t-td>
<t-td><input type="number" v-model="weight" /></t-td> <t-td><input type="number" v-model="weight" /></t-td>
</t-tr> </t-tr>
</t-table> </t-table>
<view class="buttonBox"><button class="button" type="primary" <view class="buttonBox"
:disabled="!(Object.keys(prWorkOrder.pjYieldOrder).length)>0" @click="submitClick">入库</button></view> ><button
class="button"
type="primary"
:disabled="Object.keys(prWorkOrder).length <= 0"
@click="submitClick"
>
入库
</button></view
>
</ifrm> </ifrm>
</template> </template>
<script> <script>
import ifrm from '@/pages/index/ifrm'; import ifrm from "@/pages/index/ifrm";
import tTable from '@/components/t-table/t-table.vue'; import tTable from "@/components/t-table/t-table.vue";
import tTh from '@/components/t-table/t-th.vue'; import tTh from "@/components/t-table/t-th.vue";
import tTr from '@/components/t-table/t-tr.vue'; import tTr from "@/components/t-table/t-tr.vue";
import tTd from '@/components/t-table/t-td.vue'; import tTd from "@/components/t-table/t-td.vue";
import scan from '../../mixin/scan.js'; import scan from "../../mixin/scan.js";
export default { export default {
mixins: [scan], mixins: [scan],
components: { components: {
ifrm, ifrm,
tTable, tTable,
tTh, tTh,
tTr, tTr,
tTd tTd,
}, },
data() { data() {
return { return {
value: '', value: "",
prWorkPlan: {}, prWorkPlan: {},
prWorkOrder: {}, prWorkOrder: {},
quantity: null, quantity: null,
@ -94,7 +108,7 @@
oemCustomer: {}, oemCustomer: {},
weight: 0, weight: 0,
useDept: null, useDept: null,
array: ['转工', '入库'], array: ["转工", "入库"],
index: 1, index: 1,
}; };
}, },
@ -105,13 +119,13 @@
methods: { methods: {
bindPickerChange(e) { bindPickerChange(e) {
this.index = e.detail.value this.index = e.detail.value;
if (e.detail.value == 1) { if (e.detail.value == 1) {
this.prWorkPlan.prWorkOrder.hrTypeBool = false this.prWorkPlan.hrTypeBool = false;
} else { } else {
this.prWorkPlan.prWorkOrder.hrTypeBool = true this.prWorkPlan.hrTypeBool = true;
} }
this.useDept = '' this.useDept = "";
}, },
getBarCode(code, isConfirm = false) { getBarCode(code, isConfirm = false) {
this.getData(code); this.getData(code);
@ -122,25 +136,27 @@
getData(code) { getData(code) {
if (!code) return; if (!code) return;
this.value = code; this.value = code;
this.$ajax.request({ uni.showLoading({
url: 'pdaLoad/loadPlateAe/' + code, title: "加载中...",
method: 'GET', });
success: data => { this.$u.api.getAfterPlatInCardNo({ cardNo: code }).then((res) => {
this.value = ''; uni.hideLoading();
let data = res.data;
this.value = "";
this.prWorkPlan = data; this.prWorkPlan = data;
this.prWorkOrder = data.prWorkOrder; this.prWorkOrder = data;
if (data.prWorkOrder.hrTypeBool) { if (data.hrTypeBool) {
this.index = 0 this.index = 0;
} else { } else {
this.index = 1 this.index = 1;
} }
// useDept // useDept
if (data.prWorkOrder.pjYieldOrder.nextRoam) { if (data.nextRoam) {
this.useDept = ''; this.useDept = "";
} else { } else {
this.useDept = data.prWorkOrder.pjYieldOrder.useDept; this.useDept = data.useDept;
} }
this.quantity = data.prWorkOrder.makeQty; this.quantity = data.makeQty;
if (!data.oem) { if (!data.oem) {
this.makeTeam = data.makeTeam; this.makeTeam = data.makeTeam;
} }
@ -148,65 +164,118 @@
this.oemCustomer = data.oemCustomer; this.oemCustomer = data.oemCustomer;
} }
uni.showToast({ uni.showToast({
title: '数据获取成功' title: "数据获取成功",
}); });
}
}); });
// this.$ajax.request({
// url: "pdaLoad/loadPlateAe/" + code,
// method: "GET",
// success: (data) => {
// this.value = "";
// this.prWorkPlan = data;
// this.prWorkOrder = data.prWorkOrder;
// if (data.prWorkOrder.hrTypeBool) {
// this.index = 0;
// } else {
// this.index = 1;
// }
// // useDept
// if (data.prWorkOrder.pjYieldOrder.nextRoam) {
// this.useDept = "";
// } else {
// this.useDept = data.prWorkOrder.pjYieldOrder.useDept;
// }
// this.quantity = data.prWorkOrder.makeQty;
// if (!data.oem) {
// this.makeTeam = data.makeTeam;
// }
// if (data.oemCustomer) {
// this.oemCustomer = data.oemCustomer;
// }
// uni.showToast({
// title: "",
// });
// },
// });
}, },
submitClick() { submitClick() {
if (this.useDept == '' || this.useDept == null) { if (this.useDept == "" || this.useDept == null) {
return uni.showToast({ return uni.showToast({
icon: 'none', icon: "none",
title: '请填写移交部门!!!' title: "请填写移交部门!!!",
}); });
} }
this.$ajax.request({ // let query_ = {
url: 'pdaSave/savePlateAe', // prWorkPlan: this.prWorkPlan,
method: 'POST', // quantity: this.quantity,
data: { // makeTeam: this.makeTeam,
prWorkPlan: this.prWorkPlan, // weight: this.weight,
quantity: this.quantity, // useDept: this.useDept,
makeTeam: this.makeTeam, // hrTypeBool: this.prWorkPlan.prWorkOrder.hrTypeBool,
weight: this.weight, // };
uni.showLoading({
title: "加载中...",
});
let query = [];
query.push({
wpId: this.prWorkPlan.wpId,
tsId: this.prWorkPlan.teamId,
ocId: this.prWorkPlan.ocId ? this.prWorkPlan.ocId : null,
quantity: this.prWorkPlan.inQuantity,
hrTypeBool: this.prWorkPlan.hrTypeBool,
useDept: this.useDept, useDept: this.useDept,
hrTypeBool: this.prWorkPlan.prWorkOrder.hrTypeBool weight: this.weight,
}, });
success: data => { console.log(9898989, query);
this.$u.api.saveAfterPlatIn(query).then((res) => {
uni.hideLoading();
uni.showToast({ uni.showToast({
title: '入库成功' title: "入库成功",
}); });
this.value = ''; this.value = "";
this.setData(); this.setData();
}
}); });
// this.$ajax.request({
// url: "pdaSave/savePlateAe",
// method: "POST",
// data: {
// prWorkPlan: this.prWorkPlan,
// quantity: this.quantity,
// makeTeam: this.makeTeam,
// weight: this.weight,
// useDept: this.useDept,
// hrTypeBool: this.prWorkPlan.prWorkOrder.hrTypeBool,
// },
// success: (data) => {
// uni.showToast({
// title: "",
// });
// this.value = "";
// this.setData();
// },
// });
}, },
setData() { setData() {
this.prWorkPlan = { this.prWorkPlan = {};
procedureSet: {} this.prWorkOrder = {};
};
this.prWorkOrder = {
pjYieldOrder: {},
nextProcedureSet: {},
nextMakeTeam: {},
nextBsOemCustomer: {}
};
this.quantity = null; this.quantity = null;
this.makeTeam = {}; this.makeTeam = {};
this.oemCustomer = {}; this.oemCustomer = {};
this.useDept = null; this.useDept = null;
this.weight = null; this.weight = null;
} },
}, },
onNavigationBarButtonTap(btn) { onNavigationBarButtonTap(btn) {
this.$refs.ifrm.topMenuClick(btn); this.$refs.ifrm.topMenuClick(btn);
} },
}; };
</script> </script>
<style scoped> <style scoped>
.tabsBox { .tabsBox {
margin-top: 40rpx; margin-top: 40rpx;
} }
.contentBox {} .contentBox {
}
</style> </style>

@ -3,8 +3,14 @@
<!-- 工序检验 --> <!-- 工序检验 -->
<u-sticky offset-top="10"> <u-sticky offset-top="10">
<uni-forms ref="form" err-show-type="toast"> <uni-forms ref="form" err-show-type="toast">
<uni-forms-item name="allegation"><input type="text" v-model="value" @confirm="proConfrim" <uni-forms-item name="allegation"
class="uni-input-border" placeholder="流程卡" /></uni-forms-item> ><input
type="text"
v-model="value"
@confirm="proConfrim"
class="uni-input-border"
placeholder="流程卡"
/></uni-forms-item>
</uni-forms> </uni-forms>
</u-sticky> </u-sticky>
@ -25,7 +31,7 @@
<t-td>零件编码</t-td> <t-td>零件编码</t-td>
<t-td>{{ tableObj.partCode }}</t-td> <t-td>{{ tableObj.partCode }}</t-td>
</t-tr> </t-tr>
<t-tr> <!-- <t-tr>
<t-td>零件名称</t-td> <t-td>零件名称</t-td>
<t-td>{{ tableObj.partName }}</t-td> <t-td>{{ tableObj.partName }}</t-td>
</t-tr> </t-tr>
@ -36,7 +42,7 @@
<t-tr> <t-tr>
<t-td>上序名称</t-td> <t-td>上序名称</t-td>
<t-td>{{ tableObj.frontPpsName }}</t-td> <t-td>{{ tableObj.frontPpsName }}</t-td>
</t-tr> </t-tr> -->
<t-tr> <t-tr>
<t-td>工序号</t-td> <t-td>工序号</t-td>
<t-td>{{ tableObj.orders }}</t-td> <t-td>{{ tableObj.orders }}</t-td>
@ -56,95 +62,140 @@
<t-tr> <t-tr>
<t-td>是否合格</t-td> <t-td>是否合格</t-td>
<t-td> <t-td>
<picker @change="bindPickerChange" :value="pickerIndex" :range="array"> <picker
<view>{{ array[pickerIndex] }}</view> @change="bindPickerChange"
:value="pickerIndex"
:range="array"
>
<view>{{ array[pickerIndex] || "请选择" }}</view>
</picker> </picker>
</t-td> </t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>合格数量</t-td> <t-td>合格数量</t-td>
<t-td><input :disabled="pickerIndex > 0" type="number" v-model="fillInObj.qualifiedQty" /></t-td> <t-td
><input
:disabled="pickerIndex > 0"
type="number"
v-model="fillInObj.qualifiedQty"
/></t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>不合格数量</t-td> <t-td>不合格数量</t-td>
<t-td><input :disabled="pickerIndex > 0" type="number" v-model="fillInObj.unqualifiedQty" /></t-td> <t-td
><input
:disabled="pickerIndex > 0"
type="number"
v-model="fillInObj.unqualifiedQty"
/></t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td style="color: red;">比例(%)</t-td> <t-td style="color: red">比例(%)</t-td>
<t-td><input type="" type="number" v-model="fillInObj.scale" /></t-td> <t-td><input type="" type="number" v-model="fillInObj.scale" /></t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>不良原因</t-td> <t-td>不良原因</t-td>
<t-td><uni-data-select v-model="fillInObj.poorReason" :localdata="reasonArr"></uni-data-select></t-td> <t-td
><uni-data-select
v-model="fillInObj.poorReason"
:localdata="reasonArr"
></uni-data-select
></t-td>
</t-tr> </t-tr>
<t-tr> <t-tr>
<t-td>不良描述</t-td> <t-td>不良描述</t-td>
<t-td><uni-easyinput type="textarea" v-model="fillInObj.poorMemo"></uni-easyinput></t-td> <t-td
><uni-easyinput
type="textarea"
v-model="fillInObj.poorMemo"
></uni-easyinput
></t-td>
</t-tr> </t-tr>
</t-table> </t-table>
<view class="buttonBox"><button class="button" type="primary" :disabled="!(Object.keys(tableObj).length>1)" <view class="buttonBox"
@click="submitClick">保存</button></view> ><button
class="button"
type="primary"
:disabled="!(Object.keys(tableObj).length > 1)"
@click="submitClick"
>
保存
</button></view
>
</ifrm> </ifrm>
</template> </template>
<script> <script>
import ifrm from '@/pages/index/ifrm'; import ifrm from "@/pages/index/ifrm";
import tTable from '@/components/t-table/t-table.vue'; import tTable from "@/components/t-table/t-table.vue";
import tTh from '@/components/t-table/t-th.vue'; import tTh from "@/components/t-table/t-th.vue";
import tTr from '@/components/t-table/t-tr.vue'; import tTr from "@/components/t-table/t-tr.vue";
import tTd from '@/components/t-table/t-td.vue'; import tTd from "@/components/t-table/t-td.vue";
import scan from '../../mixin/scan.js'; import scan from "../../mixin/scan.js";
export default { export default {
mixins: [scan], mixins: [scan],
components: { components: {
ifrm, ifrm,
tTable, tTable,
tTh, tTh,
tTr, tTr,
tTd tTd,
}, },
data() { data() {
return { return {
value: '', value: "",
tableObj: { tableObj: {
makeQty: null, makeQty: null,
}, },
fillInObj: { fillInObj: {
qualifiedQty: null, qualifiedQty: null,
unqualifiedQty: null, unqualifiedQty: null,
poorReason: '', poorReason: "",
poorMemo: '' poorMemo: "",
}, },
pickerIndex: null, pickerIndex: null,
array: ['合格', '不合格', 'NA'], array: ["合格", "不合格", "NA"],
reasonArr: [] reasonArr: [],
}; };
}, },
onLoad() { onLoad() {
this.reasonArr = []; this.reasonArr = [];
this.$ajax.request({ uni.showLoading({
url: 'comBox/product/queryPoorReason', title: "加载中...",
method: 'POST', });
data: { this.$u.api.dictionaryNew({ code: "defective_cause" }).then((res) => {
filterValue: null, let data = res.data;
paging: { data.forEach((item) => {
pageSize: 9999999,
pageNumber: 1
},
baseParams: {}
},
success: data => {
data.list.forEach(item => {
this.reasonArr.push({ this.reasonArr.push({
value: item.bcId, value: item.dictKey,
text: item.name text: item.dictValue,
}); });
uni.hideLoading();
}); });
}
}); });
// this.$ajax.request({
// url: "comBox/product/queryPoorReason",
// method: "POST",
// data: {
// filterValue: null,
// paging: {
// pageSize: 9999999,
// pageNumber: 1,
// },
// baseParams: {},
// },
// success: (data) => {
// data.list.forEach((item) => {
// this.reasonArr.push({
// value: item.bcId,
// text: item.name,
// });
// });
// },
// });
}, },
methods: { methods: {
bindPickerChange: function(e) { bindPickerChange: function (e) {
if (e.detail.value == 1) { if (e.detail.value == 1) {
this.fillInObj.unqualifiedQty = this.tableObj.makeQty; this.fillInObj.unqualifiedQty = this.tableObj.makeQty;
this.fillInObj.qualifiedQty = 0; this.fillInObj.qualifiedQty = 0;
@ -158,89 +209,137 @@
this.getData(code); this.getData(code);
}, },
proConfrim(e) { proConfrim(e) {
uni.showLoading({
title: "加载中...",
});
this.getBarCode(e.target.value); this.getBarCode(e.target.value);
}, },
getData(code) { getData(code) {
if (!code) return; if (!code) return;
this.value = code; this.value = code;
this.$ajax.request({ this.$u.api
url: 'pdaLoad/loadProTest/' + code, .loadProTest({ cardNo: code })
method: 'GET', .then((res) => {
success: data => { let data = res.data;
this.value = ''; this.value = "";
this.tableObj = data.pdaProRelevant; this.tableObj = data;
this.pickerIndex = 0; this.pickerIndex = 0;
this.fillInObj = { this.fillInObj = {
unqualifiedQty: 0, unqualifiedQty: 0,
qualifiedQty: this.tableObj.makeQty, qualifiedQty: this.tableObj.makeQty,
poorReason: '', poorReason: "",
poorMemo: '' poorMemo: "",
}; };
uni.showToast({ uni.showToast({
title: '数据获取成功' title: "数据获取成功",
});
}
}); });
uni.hideLoading();
})
.catch((err) => {});
// this.$ajax.request({
// url: "pdaLoad/loadProTest/" + code,
// method: "GET",
// success: (data) => {
// this.value = "";
// this.tableObj = data.pdaProRelevant;
// this.pickerIndex = 0;
// this.fillInObj = {
// unqualifiedQty: 0,
// qualifiedQty: this.tableObj.makeQty,
// poorReason: "",
// poorMemo: "",
// };
// uni.showToast({
// title: "",
// });
// },
// });
}, },
submitClick() { submitClick() {
const num = Number(this.fillInObj.unqualifiedQty) + Number(this.fillInObj.qualifiedQty); const num =
Number(this.fillInObj.unqualifiedQty) +
Number(this.fillInObj.qualifiedQty);
if (num > this.tableObj.makeQty) { if (num > this.tableObj.makeQty) {
return uni.showToast({ return uni.showToast({
title: '合格与不合格数量之和不能大于检验数量', title: "合格与不合格数量之和不能大于检验数量",
icon: 'none' icon: "none",
}); });
} }
if (this.pickerIndex == 1) { if (this.pickerIndex == 1) {
if (this.fillInObj.poorReason == '' || this.fillInObj.poorMemo == '') { if (this.fillInObj.poorReason == "" || this.fillInObj.poorMemo == "") {
return uni.showToast({ return uni.showToast({
title: '请填写原因或描述!!!', title: "请填写原因或描述!!!",
icon: 'none' icon: "none",
}); });
} }
} }
if (Number(this.fillInObj.scale) > 100 || Number(this.fillInObj.scale) < 0) { if (
Number(this.fillInObj.scale) > 100 ||
Number(this.fillInObj.scale) < 0
) {
return uni.showToast({ return uni.showToast({
title: '比例所填值的范围在 0~100!!!', title: "比例所填值的范围在 0~100!!!",
icon: 'none' icon: "none",
}); });
} }
uni.showLoading({
title: "加载中...",
});
this.fillInObj.checkResult = this.pickerIndex + 1; this.fillInObj.checkResult = this.pickerIndex + 1;
this.fillInObj.makeQty = this.tableObj.makeQty; this.fillInObj.makeQty = this.tableObj.makeQty;
this.fillInObj.wpId = this.tableObj.wpId; this.fillInObj.wpId = this.tableObj.wpId;
this.$ajax.request({ this.$u.api.saveProCheck(this.fillInObj).then((res) => {
url: 'pdaSave/saveProCheck',
method: 'POST',
data: this.fillInObj,
success: data => {
uni.showToast({ uni.showToast({
title: '检验成功' title: "检验成功",
}); });
this.pickerIndex = null; this.pickerIndex = null;
this.tableObj = { this.tableObj = {
makeQty: null makeQty: null,
}; };
this.fillInObj = { this.fillInObj = {
qualifiedQty: null, qualifiedQty: null,
unqualifiedQty: null, unqualifiedQty: null,
poorReason: '', poorReason: "",
poorMemo: '' poorMemo: "",
}; };
this.value = ''; this.value = "";
} uni.hideLoading();
}); });
} // this.$ajax.request({
// url: "pdaSave/saveProCheck",
// method: "POST",
// data: this.fillInObj,
// success: (data) => {
// uni.showToast({
// title: "",
// });
// this.pickerIndex = null;
// this.tableObj = {
// makeQty: null,
// };
// this.fillInObj = {
// qualifiedQty: null,
// unqualifiedQty: null,
// poorReason: "",
// poorMemo: "",
// };
// this.value = "";
// },
// });
},
}, },
onNavigationBarButtonTap(btn) { onNavigationBarButtonTap(btn) {
this.$refs.ifrm.topMenuClick(btn); this.$refs.ifrm.topMenuClick(btn);
}, },
onShow() {} onShow() {},
}; };
</script> </script>
<style scoped> <style scoped>
.tabsBox { .tabsBox {
margin-top: 40rpx; margin-top: 40rpx;
} }
.contentBox {} .contentBox {
}
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Loading…
Cancel
Save