@@ -106,8 +110,10 @@ import { mixins } from "@/mixins/mixins"
import { requestData } from "@/utils/processButtonData"
import currenTableFlex from "@/components/currenTableFlex"
import { filterSelectMixins } from '@/mixins/filter-Select'
+import detailsRules from '@/utils/rules';
+import { getPageList } from "@/api/wms-api"
export default {
- name: "recycledMaterialsAdjustmentApply",
+ name: "materialsAdjustmentFunc",
mixins: [
tableMixins,
LoadingMixins,
@@ -119,8 +125,19 @@ export default {
components:{
currenTableFlex
},
+ watch: {
+ 'packingsYL_Options':{
+ handler(val) {
+ console.log(128,val)
+ this.addPopColumns_YL[1].userOptions = val;
+ },
+ deep: true,
+ immediate: true,
+ },
+ },
data () {
return {
+ isUpdate:false,
URL: 'wms/store/item-transform-request',
//常用按钮数据
currenButtonData: [
@@ -141,7 +158,7 @@ export default {
//粉碎料表头信息
addPopColumns_FS:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
- focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
+ focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},//this.isFilter("isRecycled","true")
searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.addPopData_HB) },
width:"auto", searchButton:false
},
@@ -155,22 +172,41 @@ export default {
//原料信息
addPopData_YL:[{
itemCode:null,
+ packingCode:null,
inventoryQty:null,
- location:null,
+ locationCode:null,
qty:null
}],
+ packingsYL_Options:[],
+ itemPackings_YL:{},
//原料表头信息
addPopColumns_YL:[
{ type: "filterSelect", label: "物品代码", prop: "itemCode", optionsLabel: "name", optionsValue: "code",
- focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")},
- searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物品选择', this.addPopData_HB) },
- width:"auto", searchButton:false
+ focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic",this.isFilter("type", "10C02"))},
+ width:"auto"
+ },
+ // { type: "filterSelect", label: "箱标签", prop: "packingCode",
+ // // optionsLabel: "itemCode", optionsValue: "packingCode",
+ // focus: (type,val) => { return this.getFilterList(type, val, "wms/inventory/Inventory-Balance")},
+ // colSpan: 12
+ // },
+ { type: "select", label: "箱码", prop: "packingCode",
+ optionsLabel: "packingCode", optionsValue: "packingCode",
+ userOptions:this.packingsYL_Options,width:"auto"
},
// todo: 库存数量、库位:自动带出
{ label: "库存数量", prop: "inventoryQty", width:"auto" },
- { label: "库位", prop: "location", width:"auto" },
+ { label: "库位", prop: "locationCode", width:"auto" },
// todo: 小于等于库存数量
- { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto" },
+ { type: "input", validType:'pointNumber', label: "数量", prop: "qty", width:"auto",
+ // rules: [{
+ // type: "number",
+ // trigger: "blur",
+ // validator: (rule, value, callback) => {
+ // console.log(7,rule,value)
+ // }
+ // }]
+ },
],
//混拌料信息
addPopData_HB:[{
@@ -195,7 +231,7 @@ export default {
};
},
mounted () {
- this.paging();
+ // this.paging();
},
methods:{
//过滤查询条件
@@ -230,7 +266,7 @@ export default {
this.addPopData_YL=[{
itemCode:null,
inventoryQty:null,
- location:null,
+ locationCode:null,
qty:null
}]
this.addPopData_HB=[{
@@ -243,9 +279,12 @@ export default {
});
},
addPopSureHandle(){
- console.log(this.addPopData_FS)
- console.log(this.addPopData_YL)
- console.log(this.addPopData_HB)
+ this.addPopData_YL.forEach(item=>{
+ console.log(item)
+ })
+ // console.log(this.addPopData_FS)
+ // console.log(this.addPopData_YL)
+ // console.log(this.addPopData_HB)
},
// 粉碎料下拉
pushFS(data){
@@ -254,6 +293,119 @@ export default {
// 原料下拉
pushYL(data){
console.log(data)
+ if(data[1].prop="itemCode"){
+ let params = {
+ Sorting: "",
+ MaxResultCount: 1000,
+ SkipCount: 0,
+ condition: {
+ filters: [{
+ logic: "And",
+ column: "itemCode",
+ action: "==",
+ value: data[0].code
+ }]
+ }
+ }
+ this.Loading.appMainLoading = true
+ // todo:字段确定+清空失效处理
+ console.log(311,data[3].$index)
+ this.addPopData_YL[data[3].$index].packingCode = null
+ this.addPopData_YL[data[3].$index].inventoryQty = null
+ this.addPopData_YL[data[3].$index].locationCode = null
+ this.isUpdate = !this.isUpdate
+ getPageList(params, "wms/inventory/inventory-balance").then((res)=>{
+ this.itemPackings_YL[data[0].code] = res.items
+ this.isUpdate = !this.isUpdate
+ // this.$set(this.addPopColumns_YL[1], 'loading', false)
+ // this.packingsYL_Options = []
+ // this.packingsYL_Options.push({packingCode:1111})
+ // this.addPopColumns_YL[1].userOptions.push({packingCode:222})
+ // this.$set(this.addPopColumns_YL, 1, { type: "select", label: "箱码", prop: "packingCode",
+ // // optionsLabel: "packingCode", optionsValue: "packingCode",
+ // userOptions:[{label:1111,value:1111}],width:"auto",loading:false
+ // })
+ // this.$forceUpdate()
+
+ // // this.packingsYL_Options = this.itemPackings_YL[data[0].code]
+ // console.log(111)
+ // this.packingsYL_Options = [{label:1111,value:1111}]
+ // this.addPopColumns_YL[1].userOptions = [{label:1111,value:1111}]
+ this.Loading.appMainLoading = false
+ // this.$forceUpdate()
+ // console.log(11111111,this.addPopColumns_YL[1])
+ })
+ .catch(err=>{
+ // console.log(2222)
+ this.Loading.appMainLoading = false
+ })
+ }
+ },
+ changeSelect(prop, val,item,searchData,scope){
+ console.log(341,prop, val,item,searchData,scope)
+ if(prop == 'packingCode'){
+ let _currentRow = this.itemPackings_YL[searchData.itemCode].filter(item=>{
+ return val == item.packingCode
+ })
+ console.log(347,_currentRow)
+ // todo:字段确定
+ this.addPopData_YL[scope.$index].inventoryQty = _currentRow[0].qty
+ this.addPopData_YL[scope.$index].locationCode = _currentRow[0].locationCode
+ }
+ },
+ clearHandle(item,scope){
+ // todo:测试
+ this.addPopData_YL[scope.$index].packingCode = null
+ this.addPopData_YL[scope.$index].inventoryQty = null
+ this.addPopData_YL[scope.$index].locationCode = null
+ },
+ updateSelectListTable(data,item,scope,tableData){
+ // if(!data){ return }
+ // if(item.prop == "packingCode"){
+ // this.packingsYL_Options = this.itemPackings_YL[tableData[scope.$index].itemCode]
+ // console.log(318,this.itemPackings_YL)
+ // console.log(326,this.addPopColumns_YL[1])
+ // }
+ // 展开
+ if(data){
+ if(item.prop == "packingCode"){
+ this.packingsYL_Options = []
+ if(!tableData[scope.$index].itemCode || tableData[scope.$index].itemCode.length == 0){
+ this.$warningMsg("请先选择物料")
+ }
+ // console.log(tableData[scope.$index].itemCode)
+ if(this.itemPackings_YL[tableData[scope.$index].itemCode]){
+ this.packingsYL_Options = this.itemPackings_YL[tableData[scope.$index].itemCode]
+ }
+ // this.isUpdate = !this.isUpdate
+ // let params = {
+ // Sorting: "",
+ // MaxResultCount: 1000,
+ // SkipCount: 0,
+ // condition: {
+ // filters: [{
+ // logic: "And",
+ // column: "itemCode",
+ // action: "==",
+ // value: tableData[scope.$index].itemCode
+ // }]
+ // }
+ // }
+ // this.addPopColumns_YL[1].userOptions = [{packingCode:222}]
+ // getPageList(params, "wms/inventory/inventory-balance")
+ // .then(res=>{
+ // console.log(11111111111111111111)
+ // // this.packingsYL_Options = res.items
+ // this.addPopColumns_YL[1].userOptions = [{packingCode:111}]
+ // // this.$forceUpdate()
+ // })
+ // .catch(err=>{
+ // })
+ }
+ }
+ else{
+ // this.addPopColumns_YL[1].userOptions = []
+ }
},
// 混拌料下拉
pushHB(data){
diff --git a/fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue b/fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue
index 2422637ca..be93b1024 100644
--- a/fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue
+++ b/fe/PC/src/views/rawMaterialManage/quality/InspectRequest.vue
@@ -267,7 +267,7 @@ import {
getFilestore,
InspectSplitPackingk
} from "@/api/wms-api"
-import { postSplitPacking,postInventoryLabelCode_count } from "@/api/wms-core"
+import { postSplitPackingInspect,postInventoryLabelCode_count } from "@/api/wms-core"
import { completeSummaryDetailStatus, setDetailDefaultOkStatus, setDetailOkStatus, setDetailNookStatus } from "@/api/wms-job"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
@@ -1139,6 +1139,13 @@ export default {
// 拆箱事件
postSplitPackingHandle(newPackData){
this.devanLoading = true
+ let _params = {
+ number:this.propsData.number,
+ fromPackingCode:this.devanCurrentRow.packingCode,
+ fromQty:this.devanCurrentRow.receiveQty,
+ toPackingCode:newPackData[0].code,
+ toQty:Number(this.devanForm.qty)
+ }
let _data = {
useOnTheWayLocation: false,
requestNumber: null,
@@ -1185,7 +1192,7 @@ export default {
}],
type: "SplitPacking"
}
- postSplitPacking(_data)
+ postSplitPackingInspect(_params,_data)
.then(res=>{
// todo:拆分成功后,重新获取列表数据验证
this.devanCancelHandel()
@@ -1205,7 +1212,7 @@ export default {
})
})
.catch(err=>{
-
+ this.devanLoading = false
})
},
// 拆箱取消