|
|
|
|
@ -25,7 +25,7 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-col :span="6" v-if="openType != '扫码'"> |
|
|
|
|
<el-form-item label="出库仓库" prop="shId"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="stOtherOutRecord.shId" |
|
|
|
|
@ -85,159 +85,150 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> </el-row> |
|
|
|
|
<div slot="left" style="margin-bottom: 12px"> |
|
|
|
|
<el-button type="primary" @click="insertEvent()">插入一行</el-button> |
|
|
|
|
<el-button type="danger" @click="deleteRow()">删除一行</el-button> |
|
|
|
|
<div v-if="openType == '扫码'"> |
|
|
|
|
<el-table ref="xTable" :data="outbankScanList" border @select="selectChangeScan"> |
|
|
|
|
<el-table-column type="selection" width="40" /> |
|
|
|
|
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="物料名称" prop="goodsName" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="型号/牌号" prop="materialModel" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="仓库" prop="shName" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="库位" prop="location" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="批次号" prop="piNo" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="炉批号" prop="stovePiNo" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="库存数量" prop="usableQuantity" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="出库件数" prop="outQuantity" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>出库件数</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
style="width: 90%" |
|
|
|
|
v-model="scope.row.outQuantity" |
|
|
|
|
:max="scope.row.quantity" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
controls-position="right" |
|
|
|
|
></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="计量单位" prop="unitName" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="到期日期" prop="scrapCycle" align="center"> </el-table-column> |
|
|
|
|
<el-table-column label="入库日期" prop="inDate" align="center"> </el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
<el-table ref="xTable" :data="outbankList" border @select="selectChange"> |
|
|
|
|
<el-table-column type="selection" width="40" /> |
|
|
|
|
<el-table-column |
|
|
|
|
label="出库单号" |
|
|
|
|
prop="sirCode" |
|
|
|
|
width="120" |
|
|
|
|
align="center" |
|
|
|
|
></el-table-column> |
|
|
|
|
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>仓库物料</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select v-model="scope.row.goodsCode" @change="val => changeCode(val, scope.$index)"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in goodsList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.goodsCode" |
|
|
|
|
:value="item.goodsCode" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<div v-else> |
|
|
|
|
<div slot="left" style="margin-bottom: 12px"> |
|
|
|
|
<el-button type="primary" @click="insertEvent()">插入一行</el-button> |
|
|
|
|
<el-button type="danger" @click="deleteRow()">删除一行</el-button> |
|
|
|
|
</div> |
|
|
|
|
<el-table ref="xTable" :data="outbankList" border @select="selectChange"> |
|
|
|
|
<el-table-column type="selection" width="40" /> |
|
|
|
|
<el-table-column |
|
|
|
|
label="出库单号" |
|
|
|
|
prop="sirCode" |
|
|
|
|
width="120" |
|
|
|
|
align="center" |
|
|
|
|
></el-table-column> |
|
|
|
|
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>仓库物料</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.goodsCode" |
|
|
|
|
@change="val => changeCode(val, scope.$index)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in goodsList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.goodsCode" |
|
|
|
|
:value="item.goodsCode" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<!-- <jhSelect |
|
|
|
|
@input="val => (scope.row.goodsCode = val)" |
|
|
|
|
:value="scope.row.goodsCode" |
|
|
|
|
placeholder="请搜索选择" |
|
|
|
|
api-url="/blade-wms/stGoods/list" |
|
|
|
|
echo-api="/blade-wms/stGoods/list" |
|
|
|
|
echoParamsKey="goodsCode" |
|
|
|
|
echo-method="get" |
|
|
|
|
api-method="get" |
|
|
|
|
list-key="records" |
|
|
|
|
total-key="total" |
|
|
|
|
label-key="goodsCode" |
|
|
|
|
value-key="goodsCode" |
|
|
|
|
search-key="goodsCode" |
|
|
|
|
:debounce-time="100" |
|
|
|
|
@change="(val, item) => changeCode(val, item, scope.$index)" |
|
|
|
|
:title="'修改'" |
|
|
|
|
/> --> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="物料名称" prop="goodsName" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>物料名称</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="型号/牌号" prop="materialModel" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>型号/牌号</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="库位号" prop="slId" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>库位号</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="scope.row.slId" |
|
|
|
|
@change="val => changeLocation(val, scope.$index)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in scope.row.locationList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.location" |
|
|
|
|
:value="item.slId" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="批次号" prop="piNo" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>批号</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in scope.row.piNoList" |
|
|
|
|
:key="item.piNo" |
|
|
|
|
:label="item.piNo" |
|
|
|
|
:value="item.piNo" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="炉批号" prop="stovePiNo" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>炉批号</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="库存数量" prop="usableQuantity" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>库存数量</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="物料名称" prop="goodsName" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>物料名称</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="型号/牌号" prop="materialModel" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>型号/牌号</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="库位号" prop="slId" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>库位号</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.$index)"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in scope.row.locationList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.location" |
|
|
|
|
:value="item.slId" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="批次号" prop="piNo" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>批号</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in scope.row.piNoList" |
|
|
|
|
:key="item.piNo" |
|
|
|
|
:label="item.piNo" |
|
|
|
|
:value="item.piNo" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="炉批号" prop="stovePiNo" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>炉批号</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="库存数量" prop="quantity" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>库存数量</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="出库件数" prop="outQuantity" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>出库件数</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
style="width: 90%" |
|
|
|
|
v-model="scope.row.outQuantity" |
|
|
|
|
:max="scope.row.quantity" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
controls-position="right" |
|
|
|
|
></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="计量单位" prop="unitName" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>计量单位</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="到期日期" prop="scrapCycle" align="center"> |
|
|
|
|
<template #default="scope">{{ scope.row.scrapCycle }}</template> |
|
|
|
|
<!-- <template #header> |
|
|
|
|
<span><i style="color: red">*</i>到期日期</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-date-picker |
|
|
|
|
disabled |
|
|
|
|
v-model="scope.row.scrapCycle" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</template> --> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="入库日期" prop="inDate" align="center"> |
|
|
|
|
<template #default="scope">{{ scope.row.inDate }}</template> |
|
|
|
|
<!-- <template #header> |
|
|
|
|
<span><i style="color: red">*</i>入库日期</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-date-picker |
|
|
|
|
disabled |
|
|
|
|
v-model="scope.row.inOutDate" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择日期" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</template> --> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<el-table-column label="出库件数" prop="outQuantity" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>出库件数</span> |
|
|
|
|
</template> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
style="width: 90%" |
|
|
|
|
v-model="scope.row.outQuantity" |
|
|
|
|
:max="scope.row.quantity" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
controls-position="right" |
|
|
|
|
></el-input-number> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="计量单位" prop="unitName" align="center"> |
|
|
|
|
<template #header> |
|
|
|
|
<span><i style="color: red">*</i>计量单位</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="到期日期" prop="scrapCycle" align="center"> |
|
|
|
|
<template #default="scope">{{ scope.row.scrapCycle }}</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="入库日期" prop="inDate" align="center"> |
|
|
|
|
<template #default="scope">{{ scope.row.inDate }}</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
|
@ -259,7 +250,8 @@ import { |
|
|
|
|
getLocationData, |
|
|
|
|
addIssue, |
|
|
|
|
getShList, |
|
|
|
|
getGoodsListByShId |
|
|
|
|
getGoodsListByShId, |
|
|
|
|
getStockByStorehouseAndGoods, |
|
|
|
|
} from '@/api/storeManagement/otherIssuing'; |
|
|
|
|
export default { |
|
|
|
|
props: { |
|
|
|
|
@ -271,6 +263,10 @@ export default { |
|
|
|
|
type: String, |
|
|
|
|
default: '', |
|
|
|
|
}, |
|
|
|
|
openType: { |
|
|
|
|
type: String, |
|
|
|
|
default: '', |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
const assQuantityValid = ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => { |
|
|
|
|
@ -286,6 +282,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
return { |
|
|
|
|
outbankScanList: [], |
|
|
|
|
openShow: false, |
|
|
|
|
billCode: null, |
|
|
|
|
userOption: [], |
|
|
|
|
@ -295,12 +292,6 @@ export default { |
|
|
|
|
treeData: [], |
|
|
|
|
goodsList: [], |
|
|
|
|
stOtherOutRecord: { |
|
|
|
|
// billDate:dateFormat(new Date(),'yyyy-MM-dd'), |
|
|
|
|
// stAccBill: { |
|
|
|
|
// billDate: new Date(), |
|
|
|
|
// pfUserInfo: { dept: {} }, |
|
|
|
|
// coStorehouse: { shId: null } |
|
|
|
|
// }, |
|
|
|
|
mid: null, |
|
|
|
|
outType: 4, |
|
|
|
|
woCode: null, |
|
|
|
|
@ -352,16 +343,8 @@ export default { |
|
|
|
|
goodsParams: {}, |
|
|
|
|
piNoParams: {}, |
|
|
|
|
rules: { |
|
|
|
|
// stAccBill: { |
|
|
|
|
// coStorehouse: { |
|
|
|
|
shId: [{ required: true, message: '请选择仓库', trigger: 'blur' }], |
|
|
|
|
// }, |
|
|
|
|
// pfUserInfo: { |
|
|
|
|
picker: [{ required: true, message: '请选择领料人', trigger: 'blur' }], |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
// moId: [], |
|
|
|
|
|
|
|
|
|
outType: [{ required: true, message: '请选择出库原因', trigger: 'blur' }], |
|
|
|
|
}, |
|
|
|
|
gridRules: { |
|
|
|
|
@ -371,6 +354,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
isShowInput: false, |
|
|
|
|
userData: [], |
|
|
|
|
selectList: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -379,13 +363,23 @@ export default { |
|
|
|
|
if (this.checkCode == '') { |
|
|
|
|
this.getWare(); |
|
|
|
|
this.getKeeper(); |
|
|
|
|
// this.getGoods(); |
|
|
|
|
} else { |
|
|
|
|
this.getKeeper(); |
|
|
|
|
this.getShData(); |
|
|
|
|
} |
|
|
|
|
this.init(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
init() { |
|
|
|
|
if (this.openType == '扫码') { |
|
|
|
|
getStockByStorehouseAndGoods({ goodsCode: this.checkCode }).then(res => { |
|
|
|
|
this.outbankScanList = res.data.data; |
|
|
|
|
this.outbankScanList.forEach(item => { |
|
|
|
|
item.outQuantity = item.outQuantity == -1 ? 0 : item.outQuantity; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getShData() { |
|
|
|
|
getShList({ |
|
|
|
|
goodsCode: this.checkCode, |
|
|
|
|
@ -421,16 +415,16 @@ export default { |
|
|
|
|
changeCode(val, index) { |
|
|
|
|
let tmp = this.goodsList.find(item => item.goodsCode == val); |
|
|
|
|
console.log('tmp------------', tmp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (item != undefined) { |
|
|
|
|
this.outbankList[index].goodsName = tmp.goodsName; |
|
|
|
|
this.outbankList[index].goodsName = tmp.goodsName; |
|
|
|
|
this.outbankList[index].materialModel = tmp.materialModel; |
|
|
|
|
this.outbankList[index].unitName = tmp.unitName; |
|
|
|
|
this.outbankList[index].goodsId = tmp.id; |
|
|
|
|
this.outbankList[index].slId = ''; |
|
|
|
|
this.outbankList[index].piNo = ''; |
|
|
|
|
this.outbankList[index].quantity = ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
getLocationData({ |
|
|
|
|
shId: this.stOtherOutRecord.shId, |
|
|
|
|
@ -457,7 +451,7 @@ export default { |
|
|
|
|
this.outbankList[index].stovePiNo = tmp.stovePiNo; |
|
|
|
|
this.outbankList[index].quantity = tmp.quantity; |
|
|
|
|
this.outbankList[index].scrapCycle = tmp.scrapCycle; |
|
|
|
|
this.outbankList[index].inDate = tmp.inDate; |
|
|
|
|
this.outbankList[index].inDate = tmp.inDate; |
|
|
|
|
this.outbankList[index].id = tmp.id; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -480,13 +474,7 @@ export default { |
|
|
|
|
this.openShow = false; |
|
|
|
|
this.$emit('closeDialog', val); |
|
|
|
|
}, |
|
|
|
|
userDataFn() { |
|
|
|
|
// this.$ajax.post("sysComBox/user", { "filterValue": null, "paging": { "pageSize": 9999999, "pageNumber": 1 }, "baseParams": {} }).then(res => { |
|
|
|
|
// if (this.$ifAjax(res)) { |
|
|
|
|
// this.userData = res.data.list; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
userDataFn() {}, |
|
|
|
|
opened() { |
|
|
|
|
this.stOtherOutRecord = { |
|
|
|
|
stAccBill: { |
|
|
|
|
@ -509,20 +497,7 @@ export default { |
|
|
|
|
this.changeUseType(this.stOtherOutRecord.outType); |
|
|
|
|
this.moldList(); |
|
|
|
|
}, |
|
|
|
|
moldList() { |
|
|
|
|
// this.$ajax.post("stOtherReceiptRecord/queryMoldList").then(res => { |
|
|
|
|
// if (this.$ifAjax(res)) { |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.treeData = res.data.list; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// this.$ajax.post("stOtherOutRecord/generateCode").then(res => { |
|
|
|
|
// if (this.$ifAjax(res)) { |
|
|
|
|
// this.stOtherOutRecord.stAccBill.billCode = |
|
|
|
|
// res.data.stAccBill.billCode; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
moldList() {}, |
|
|
|
|
queryDataForAdd() { |
|
|
|
|
this.$ajax.get('stOtherOutRecord/preparedForAdd').then(res => { |
|
|
|
|
this.stOtherOutRecord = res.data; |
|
|
|
|
@ -581,6 +556,10 @@ export default { |
|
|
|
|
selectChange(list, row) { |
|
|
|
|
row._select = !row._select; |
|
|
|
|
}, |
|
|
|
|
selectChangeScan(list, row) { |
|
|
|
|
row._select = !row._select; |
|
|
|
|
this.selectList = list; |
|
|
|
|
}, |
|
|
|
|
// 删除选中行 |
|
|
|
|
deleteRow() { |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
@ -660,7 +639,7 @@ export default { |
|
|
|
|
this.goodsList = res.data.data.records; |
|
|
|
|
if (this.checkCode != '') { |
|
|
|
|
let tmp = this.goodsList.find(item => item.goodsCode == this.checkCode); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.outbankList[0].goodsId = tmp.id; |
|
|
|
|
if (tmp) { |
|
|
|
|
getLocationData({ |
|
|
|
|
@ -733,17 +712,36 @@ export default { |
|
|
|
|
submit() { |
|
|
|
|
this.$refs.form.validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.outbankList.map(item => { |
|
|
|
|
if (item.outQuantity > item.quantity) { |
|
|
|
|
this.$message.error('出库数量不可大于库存数量'); |
|
|
|
|
let submitData = []; |
|
|
|
|
if (this.openType == '扫码') { |
|
|
|
|
if (this.selectList.length == 0) { |
|
|
|
|
this.$message.error('请选择要出库的行数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 校验通过:准备提交数据(过滤无用字段) |
|
|
|
|
const submitData = this.outbankList.map(row => { |
|
|
|
|
const { piNoList, locationList, _select, ...validData } = row; // 剔除选择状态字段 |
|
|
|
|
return validData; |
|
|
|
|
}); |
|
|
|
|
this.selectList.map(item => { |
|
|
|
|
if (item.outQuantity > item.quantity) { |
|
|
|
|
this.$message.error('出库数量不可大于库存数量'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 校验通过:准备提交数据(过滤无用字段) |
|
|
|
|
submitData = this.selectList.map(row => { |
|
|
|
|
return row; |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.outbankList.map(item => { |
|
|
|
|
if (item.outQuantity > item.quantity) { |
|
|
|
|
this.$message.error('出库数量不可大于库存数量'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 校验通过:准备提交数据(过滤无用字段) |
|
|
|
|
submitData = this.outbankList.map(row => { |
|
|
|
|
const { piNoList, locationList, _select, ...validData } = row; // 剔除选择状态字段 |
|
|
|
|
return validData; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
outList: submitData, |
|
|
|
|
stOtherOutRecord: this.stOtherOutRecord, |
|
|
|
|
@ -752,108 +750,25 @@ export default { |
|
|
|
|
addIssue(params).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('保存成功'); |
|
|
|
|
|
|
|
|
|
this.outbankList.map((item, index) => { |
|
|
|
|
getLocationData({ |
|
|
|
|
shId: this.stOtherOutRecord.shId, |
|
|
|
|
goodsId: item.goodsId, |
|
|
|
|
slId: item.slId, |
|
|
|
|
}).then(res => { |
|
|
|
|
item.piNoList = res.data.data.records; |
|
|
|
|
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo); |
|
|
|
|
item.quantity = tmp.quantity; |
|
|
|
|
if (this.openType != '扫码') { |
|
|
|
|
this.outbankList.map((item, index) => { |
|
|
|
|
getLocationData({ |
|
|
|
|
shId: this.stOtherOutRecord.shId, |
|
|
|
|
goodsId: item.goodsId, |
|
|
|
|
slId: item.slId, |
|
|
|
|
}).then(res => { |
|
|
|
|
item.piNoList = res.data.data.records; |
|
|
|
|
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo); |
|
|
|
|
item.quantity = tmp.quantity; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
// this.outbankList = [] |
|
|
|
|
// this.stOtherOutRecord = {} |
|
|
|
|
// this.closeDialog(true) |
|
|
|
|
// this.onLoad() |
|
|
|
|
} else { |
|
|
|
|
this.init(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// this.$message.success("保存成功"); |
|
|
|
|
// this.$refs.form.validate(formValid => { |
|
|
|
|
// if (formValid) { |
|
|
|
|
// if (this.isShowInput) { |
|
|
|
|
// if ( |
|
|
|
|
// this.stOtherOutRecord.woCode == null && |
|
|
|
|
// this.stOtherOutRecord.woCode == undefined |
|
|
|
|
// ) { |
|
|
|
|
// return this.$message.warning("请填写工作订单号"); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// let submitList = []; |
|
|
|
|
// const deleteIds = []; |
|
|
|
|
|
|
|
|
|
// if ( |
|
|
|
|
// this.oldShId != null && |
|
|
|
|
// this.stOtherOutRecord.stAccBill.coStorehouse.shId !== this.oldShId |
|
|
|
|
// ) { |
|
|
|
|
// const { fullData } = this.$refs.xTable.getTableData(); |
|
|
|
|
// if (fullData.length > 0) { |
|
|
|
|
// submitList = submitList.concat(fullData); |
|
|
|
|
// } |
|
|
|
|
// } else { |
|
|
|
|
// const { |
|
|
|
|
// insertRecords, |
|
|
|
|
// updateRecords |
|
|
|
|
// } = this.$refs.xTable.getRecordset(); |
|
|
|
|
// if (insertRecords.length > 0) { |
|
|
|
|
// insertRecords.forEach(item => { |
|
|
|
|
// if (item.coGoods.goodsId != null) { |
|
|
|
|
// submitList.push(item); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// if (updateRecords.length > 0) { |
|
|
|
|
// submitList = submitList.concat(updateRecords); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// const removeRecords = this.$refs.xTable.getRemoveRecords(); |
|
|
|
|
// if (removeRecords.length) { |
|
|
|
|
// removeRecords.forEach(obj => { |
|
|
|
|
// if (obj.stAccBillDetail.abdId) { |
|
|
|
|
// deleteIds.push(obj.stAccBillDetail.abdId); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// if ( |
|
|
|
|
// (this.stOtherOutRecord.abId === undefined || |
|
|
|
|
// this.stOtherOutRecord.abId === null) && |
|
|
|
|
// submitList.length === 0 |
|
|
|
|
// ) { |
|
|
|
|
// this.$message.warning( |
|
|
|
|
// this.$t("videaVueLib.publics.message.noDataToSave") |
|
|
|
|
// ); |
|
|
|
|
// } else { |
|
|
|
|
// this.$refs.xTable.validate(submitList, errMap => { |
|
|
|
|
// if (errMap) { |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
// this.btnLoading = true; |
|
|
|
|
// this.$ajax |
|
|
|
|
// .post("stOtherOutRecord/addStOtherOutRecord", { |
|
|
|
|
// stOtherOutRecord: this.stOtherOutRecord, |
|
|
|
|
// list: submitList, |
|
|
|
|
// deleteIds: deleteIds |
|
|
|
|
// }) |
|
|
|
|
// .then(res => { |
|
|
|
|
// if (this.$ifAjax(res)) { |
|
|
|
|
// this.$message.success( |
|
|
|
|
// this.$t("videaVueLib.publics.message.success") |
|
|
|
|
// ); |
|
|
|
|
// this.close(true); |
|
|
|
|
// } |
|
|
|
|
// this.btnLoading = false; |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
piCodeChange(id, item) { |
|
|
|
|
this.stOtherOutRecord.taskCode = item.moCode; |
|
|
|
|
|