|
|
|
@ -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> |