|
@ -10,29 +10,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="listconadd"> |
|
|
<div class="listconadd"> |
|
|
|
|
|
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
|
<!-- <div style="display: flex;flex-direction: row;align-items: center;padding: 10px;"> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
<span>调出门店:</span> |
|
|
|
|
|
<el-select v-model="commodityQuery.params.inOrg" placeholder="请选择" @change="selectOutOrg"> |
|
|
|
|
|
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="margin-left: 30px;"> |
|
|
|
|
|
<span>调入门店:</span> |
|
|
|
|
|
<el-select v-model="commodityQuery.params.outOrg" placeholder="请选择" @change="selectInOrg"> |
|
|
|
|
|
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
<el-row class="first_row"> |
|
|
<el-row class="first_row"> |
|
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<div class="span-sty">申请人</div> |
|
|
<div class="span-sty">申请人</div> |
|
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|
@ -43,21 +22,18 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<div class="span-sty">申请日期</div> |
|
|
<div class="span-sty">申请日期</div> |
|
|
<span class="addinputInfo">{{ formobj.createTime }}</span> |
|
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-row> |
|
|
<el-row> |
|
|
|
|
|
|
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<div class="span-sty">调出站</div> |
|
|
<div class="span-sty">调出站</div> |
|
|
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|
|
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="5"> |
|
|
<el-col :span="5"> |
|
|
<div class="span-sty2"><span class="must">*</span> 调入分公司</div> |
|
|
<div class="span-sty2"><span class="must">*</span> 调入分公司</div> |
|
|
<el-form-item prop="inOrgName"> <el-select v-model="formobj.inOrgName" placeholder="请选择分公司" |
|
|
<el-form-item prop="inOrgName"> |
|
|
@change="selectInOrg" class="addinputInfo2 addinputw2"> |
|
|
<el-select v-model="formobj.inOrgName" placeholder="请选择分公司" @change="selectInOrg" class="addinputInfo2 addinputw2"> |
|
|
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid"> |
|
|
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
@ -66,8 +42,7 @@ |
|
|
<el-col :span="5"> |
|
|
<el-col :span="5"> |
|
|
<div class="span-sty2"><span class="must">*</span> 调入站点</div> |
|
|
<div class="span-sty2"><span class="must">*</span> 调入站点</div> |
|
|
<el-form-item prop="inPlatName"> |
|
|
<el-form-item prop="inPlatName"> |
|
|
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName" |
|
|
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName" class="addinputInfo addinputw"> |
|
|
class="addinputInfo addinputw"> |
|
|
|
|
|
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid"> |
|
|
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
@ -75,60 +50,28 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="8"> |
|
|
<el-col :span="8"> |
|
|
<div class="span-sty"><span class="must">*</span> 经办人</div> |
|
|
<div class="span-sty"><span class="must">*</span> 经办人</div> |
|
|
<el-form-item prop="confirmName"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable |
|
|
<el-form-item prop="confirmName"> |
|
|
@change="selectOperatorName" class="addinputInfo addinputw"> |
|
|
<el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable @change="selectOperatorName" class="addinputInfo addinputw"> |
|
|
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid"> |
|
|
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<div class="span-sty">备注</div> |
|
|
<div class="span-sty">备注</div> |
|
|
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" |
|
|
<el-form-item> |
|
|
type="textarea" :rows="4" clearable /></el-form-item> |
|
|
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea" :rows="4" clearable/> |
|
|
|
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="title titleOne"> |
|
|
<div class="title titleOne"> |
|
|
<div>调拨商品列表</div> |
|
|
<div>调拨商品列表</div> |
|
|
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button> |
|
|
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" show-summary :summary-method="getSummaries"> |
|
|
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;" |
|
|
|
|
|
show-summary :summary-method="getSummaries"> |
|
|
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
<!-- <el-table-column align="center" width="70" :render-header="commodityHeader"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="商品名称" align="center" min-width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-popover placement="right" width="900" trigger="click"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row |
|
|
|
|
|
@current-change="commodityCurrentChange($event, scope.row)"> |
|
|
|
|
|
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" /> |
|
|
|
|
|
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|
|
|
|
|
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> |
|
|
|
|
|
<el-table-column prop="unit" label="单位" align="center" /> |
|
|
|
|
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|
|
|
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|
|
|
|
|
<el-table-column prop="count" label="库存数量" align="center" /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<pagination v-show="commodityData.length > 0" :total="commodityQuery.total" |
|
|
|
|
|
:limit.sync="commodityQuery.size" class="pagination" |
|
|
|
|
|
@pagination="commodityInput(scope.row.goodsSpuName)" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-input slot="reference" v-model="scope.row.goodsSpuName" |
|
|
|
|
|
@input="commodityInput(scope.row.goodsSpuName)" clearable placeholder="商品名称" /> |
|
|
|
|
|
</el-popover> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
<el-table-column fixed label="操作" wid align="center" width="100"> |
|
|
<el-table-column fixed label="操作" wid align="center" width="100"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button> |
|
|
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button> |
|
@ -144,37 +87,15 @@ |
|
|
<el-table-column prop="warehouseArea" label="库区" width="150" align="center"/> |
|
|
<el-table-column prop="warehouseArea" label="库区" width="150" align="center"/> |
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center"/> |
|
|
<el-table-column prop="warehouseRackCode" label="库位" align="center"/> |
|
|
<el-table-column prop="stockCount" label="库存数量" width="100" align="center"/> |
|
|
<el-table-column prop="stockCount" label="库存数量" width="100" align="center"/> |
|
|
<!-- <el-table-column prop="taxPrice" label="单价" width="100" align="center" /> --> |
|
|
|
|
|
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center"> |
|
|
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input v-model="scope.row.markUpRatio" clearable placeholder="" |
|
|
<el-input v-model="scope.row.markUpRatio" clearable placeholder="" oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')" @input="commodityComputeYHAndXSJE(scope.row)"/> |
|
|
oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')" |
|
|
|
|
|
@input="commodityComputeYHAndXSJE(scope.row)" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<!-- <el-table-column label="调入仓库" align="center" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-select v-model="scope.row.inWarehouseName" placeholder="请选择" |
|
|
|
|
|
@change="selectWarehouseName(scope.row,$event)"> |
|
|
|
|
|
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="调入库位" align="center" width="150"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-select v-model="scope.row.inWarehouseRackCode" placeholder="请选择" |
|
|
|
|
|
@change="selectWarehouseAreaCode(scope.row,$event)"> |
|
|
|
|
|
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.areaCode" :value="item.sid"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100"/> |
|
|
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100"/> |
|
|
<el-table-column prop="count" label="调拨数量" width="120" align="center"> |
|
|
<el-table-column prop="count" label="调拨数量" width="120" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable |
|
|
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"/> |
|
|
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="amount" label="调拨金额" align="center" width="100"/> |
|
|
<el-table-column prop="amount" label="调拨金额" align="center" width="100"/> |
|
@ -188,11 +109,9 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import req from '@/api/storage/allocation.js' |
|
|
import req from '@/api/storage/allocationByGroup' |
|
|
import chooseproducts from './relation/chooseproducts' |
|
|
import chooseproducts from './relation/chooseproducts' |
|
|
import { |
|
|
import { getCurrentDate } from '@/utils/index.js' |
|
|
getCurrentDate |
|
|
|
|
|
} from '@/utils/index.js' |
|
|
|
|
|
import { |
|
|
import { |
|
|
selectOrgSidList, |
|
|
selectOrgSidList, |
|
|
getOrgSidByPath, |
|
|
getOrgSidByPath, |
|
@ -200,9 +119,10 @@ |
|
|
fetchBySid, |
|
|
fetchBySid, |
|
|
tranThree |
|
|
tranThree |
|
|
} from '@/api/Common/dictcommons' |
|
|
} from '@/api/Common/dictcommons' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
chooseproducts, |
|
|
chooseproducts |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -212,70 +132,49 @@ |
|
|
activeNames: '1', |
|
|
activeNames: '1', |
|
|
index: 0, |
|
|
index: 0, |
|
|
formobj: { |
|
|
formobj: { |
|
|
"sid": "", |
|
|
sid: '', |
|
|
"billNo": "", |
|
|
billNo: '', |
|
|
"useOrgSid": "", |
|
|
useOrgSid: '', |
|
|
"createBySid": window.sessionStorage.getItem('userSid'), |
|
|
createBySid: window.sessionStorage.getItem('userSid'), |
|
|
"createByName": window.sessionStorage.getItem('name'), |
|
|
createByName: window.sessionStorage.getItem('name'), |
|
|
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|
|
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|
|
createTime: getCurrentDate(), |
|
|
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
outOrgName: '', |
|
|
"createTime": getCurrentDate(), |
|
|
outOrgSid: '', |
|
|
"outOrgName": '', |
|
|
outPlatName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
"outOrgSid": '', |
|
|
outPlatSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
"outPlatName": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|
|
inOrgName: '', |
|
|
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
inOrgSid: '', |
|
|
"outPlatSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|
|
inPlatName: '', |
|
|
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
inPlatSid: '', |
|
|
"inOrgName": '', |
|
|
inOrgAttributeKey: '', |
|
|
"inOrgSid": '', |
|
|
inOrgAttributeValue: '', |
|
|
"inPlatName": "", |
|
|
confirmName: '', |
|
|
"inPlatSid": "", |
|
|
confirmSid: '', |
|
|
"inOrgAttributeKey": "", |
|
|
remarks: '', |
|
|
"inOrgAttributeValue": "", |
|
|
grade: '3', |
|
|
"confirmName": "", |
|
|
createOrgSid: '', |
|
|
"confirmSid": "", |
|
|
procDefId: '', |
|
|
"remarks": "", |
|
|
nodeId: '', |
|
|
"grade": "3", |
|
|
procInstId: '', |
|
|
"createOrgSid": "", |
|
|
nodeState: '待提交', |
|
|
"procDefId": "", |
|
|
taskId: '', |
|
|
"nodeId": "", |
|
|
wmsInventoryAllocateBillDetailNewList: [] |
|
|
"procInstId": "", |
|
|
|
|
|
"nodeState": "待提交", |
|
|
|
|
|
"taskId": "", |
|
|
|
|
|
"wmsInventoryAllocateBillDetailNewList": [] |
|
|
|
|
|
}, |
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
inOrgName: [{ |
|
|
inOrgName: [{ required: true, message: '调入分公司不能为空', trigger: 'change' }], |
|
|
required: true, |
|
|
inPlatName: [{ required: true, message: '调入站点不能为空', trigger: 'change' }], |
|
|
message: '调入分公司不能为空', |
|
|
confirmName: [{ required: true, message: '经办人不能为空', trigger: 'change' }] |
|
|
trigger: 'change' |
|
|
|
|
|
}], |
|
|
|
|
|
inPlatName: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: '调入站点不能为空', |
|
|
|
|
|
trigger: 'change' |
|
|
|
|
|
}], |
|
|
|
|
|
confirmName: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: '经办人不能为空', |
|
|
|
|
|
trigger: 'change' |
|
|
|
|
|
}], |
|
|
|
|
|
}, |
|
|
}, |
|
|
orgList: [], |
|
|
orgList: [], |
|
|
deptList: [], |
|
|
deptList: [], |
|
|
operatorNameList: [], |
|
|
operatorNameList: [] |
|
|
warehouseList: [], |
|
|
|
|
|
warehouseRackList: [] |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
init() { |
|
|
init() { |
|
|
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
getOrgSidByPath({ |
|
|
|
|
|
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
|
|
}).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
if (resp.success) { |
|
|
this.formobj.createOrgSid = resp.data |
|
|
this.formobj.createOrgSid = resp.data |
|
|
this.formobj.outOrgSid = resp.data |
|
|
this.formobj.outOrgSid = resp.data |
|
@ -286,23 +185,16 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
selectOrgSidList().then((res) => { |
|
|
selectOrgSidList().then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
console.log("selectOrgSidList", res); |
|
|
|
|
|
this.orgList = res.data |
|
|
this.orgList = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
selAllByOrgSidPath({ orgSidPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
selAllByOrgSidPath({ |
|
|
|
|
|
orgSidPath: window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
console.log("selAllByOrgSidPath", res); |
|
|
|
|
|
this.operatorNameList = res.data |
|
|
this.operatorNameList = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// 合计 |
|
|
// 合计 |
|
|
getSummaries(param) { |
|
|
getSummaries(param) { |
|
@ -343,98 +235,43 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectInOrg(val) { |
|
|
selectInOrg(val) { |
|
|
console.log("selectInOrg", val); |
|
|
const choose = this.orgList.filter((item) => item.sid === val) |
|
|
|
|
|
|
|
|
const choose = this.orgList.filter((item) => item.sid == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectInOrg', choose) |
|
|
|
|
|
this.formobj.inOrgSid = choose[0].sid |
|
|
this.formobj.inOrgSid = choose[0].sid |
|
|
this.formobj.inOrgName = choose[0].name |
|
|
this.formobj.inOrgName = choose[0].name |
|
|
|
|
|
|
|
|
tranThree({ |
|
|
tranThree({ |
|
|
sid: choose[0].sid, |
|
|
sid: choose[0].sid, |
|
|
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|
|
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) |
|
|
.getItem('defaultOrgPath').lastIndexOf('/') + 1) |
|
|
|
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.formobj.inDeptSid = '' |
|
|
this.formobj.inDeptSid = '' |
|
|
this.formobj.inDeptName = '' |
|
|
this.formobj.inDeptName = '' |
|
|
this.formobj.inOrgAttributeKey = '' |
|
|
this.formobj.inOrgAttributeKey = '' |
|
|
this.formobj.inOrgAttributeValue = '' |
|
|
this.formobj.inOrgAttributeValue = '' |
|
|
console.log("getListDeptByOrgSid", res); |
|
|
|
|
|
this.deptList = res.data |
|
|
this.deptList = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectInDeptName(val) { |
|
|
selectInDeptName(val) { |
|
|
console.log("selectInDeptName", val); |
|
|
const choose = this.deptList.filter((item) => item.sid === val) |
|
|
|
|
|
|
|
|
const choose = this.deptList.filter((item) => item.sid == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectInDeptName', choose) |
|
|
|
|
|
this.formobj.inPlatSid = choose[0].sid |
|
|
this.formobj.inPlatSid = choose[0].sid |
|
|
this.formobj.inPlatName = choose[0].name |
|
|
this.formobj.inPlatName = choose[0].name |
|
|
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey |
|
|
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey |
|
|
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue |
|
|
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
selectOperatorName(val) { |
|
|
selectOperatorName(val) { |
|
|
console.log("selectOperatorName", val); |
|
|
const choose = this.operatorNameList.filter((item) => item.sid === val) |
|
|
const choose = this.operatorNameList.filter((item) => item.sid == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectOutOrg', choose) |
|
|
|
|
|
this.formobj.confirmSid = choose[0].sid |
|
|
this.formobj.confirmSid = choose[0].sid |
|
|
this.formobj.confirmName = choose[0].name |
|
|
this.formobj.confirmName = choose[0].name |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getWarehouseAreaList(sid) { |
|
|
|
|
|
var query = { |
|
|
|
|
|
ckSid: sid |
|
|
|
|
|
} |
|
|
|
|
|
req.getWarehouseareas(query).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.warehouseRackList = res.data |
|
|
|
|
|
|
|
|
|
|
|
console.log("aaaaaa", this.warehouseRackList); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
selectWarehouseName(row, val) { |
|
|
|
|
|
console.log("selectWarehouseName", row); |
|
|
|
|
|
console.log("selectWarehouseName", val); |
|
|
|
|
|
|
|
|
|
|
|
const choose = this.warehouseList.filter((item) => item.sid == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectInOrg', choose) |
|
|
|
|
|
row.inWarehouseSid = choose[0].sid |
|
|
|
|
|
row.inWarehouseName = choose[0].warehouseName |
|
|
|
|
|
row.inWarehouseRackSid = '' |
|
|
|
|
|
row.inWarehouseRackCode = '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getWarehouseAreaList(val) |
|
|
|
|
|
}, |
|
|
|
|
|
selectWarehouseAreaCode(row, val) { |
|
|
|
|
|
console.log("selectWarehouseAreaCode", row); |
|
|
|
|
|
console.log("selectWarehouseAreaCode", val); |
|
|
|
|
|
|
|
|
|
|
|
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|
|
|
|
|
console.log('>>>>>>>>>selectInOrg', choose) |
|
|
|
|
|
row.inWarehouseRackSid = choose[0].sid |
|
|
|
|
|
row.inWarehouseRackCode = choose[0].areaCode |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
showAdd() { |
|
|
showAdd() { |
|
|
|
|
|
this.init() |
|
|
this.init(), |
|
|
|
|
|
this.viewTitle = '【新增】商品调拨申请' |
|
|
this.viewTitle = '【新增】商品调拨申请' |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
showEdit(sid) { |
|
|
showEdit(sid) { |
|
|
|
|
|
|
|
|
this.init() |
|
|
this.init() |
|
|
|
|
|
|
|
|
this.viewTitle = '【修改】商品调拨申请' |
|
|
this.viewTitle = '【修改】商品调拨申请' |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['form_obj'].clearValidate() |
|
|
this.$refs['form_obj'].clearValidate() |
|
@ -445,7 +282,6 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
backData(value) { |
|
|
backData(value) { |
|
|
this.viewState = 1 |
|
|
this.viewState = 1 |
|
|
if (value.length > 0) { |
|
|
if (value.length > 0) { |
|
@ -496,26 +332,20 @@ |
|
|
const aa = [] |
|
|
const aa = [] |
|
|
this.$refs['divSp'].showData(aa, this.formobj.deptSid) |
|
|
this.$refs['divSp'].showData(aa, this.formobj.deptSid) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 计算调拨单、调拨金额 |
|
|
// 计算调拨单、调拨金额 |
|
|
commodityComputeYHAndXSJE(row) { |
|
|
commodityComputeYHAndXSJE(row) { |
|
|
console.log("commodityComputeYHAndXSJE", row); |
|
|
|
|
|
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2) |
|
|
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2) |
|
|
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) |
|
|
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) |
|
|
}, |
|
|
}, |
|
|
// 计算调拨金额 |
|
|
// 计算调拨金额 |
|
|
commodityComputeYHAndXSJE2(row) { |
|
|
commodityComputeYHAndXSJE2(row) { |
|
|
|
|
|
|
|
|
if (Number(row.stockCount) < Number(row.count)) { |
|
|
if (Number(row.stockCount) < Number(row.count)) { |
|
|
row.count = Number(row.stockCount) |
|
|
row.count = Number(row.stockCount) |
|
|
} else { |
|
|
} else { |
|
|
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) |
|
|
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
saveOrUpdate() { |
|
|
saveOrUpdate() { |
|
|
console.log("saveOrUpdate", this.formobj); |
|
|
|
|
|
|
|
|
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.submitdisabled = true |
|
|
this.submitdisabled = true |
|
@ -537,33 +367,27 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
confirm() { |
|
|
confirm() { |
|
|
console.log("saveOrUpdate", this.formobj); |
|
|
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
|
|
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length === 0) { |
|
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) { |
|
|
|
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: "warning", |
|
|
type: 'warning', |
|
|
showClose: true, |
|
|
showClose: true, |
|
|
message: '调拨商品不能为空' |
|
|
message: '调拨商品不能为空' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) { |
|
|
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) { |
|
|
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i] |
|
|
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i] |
|
|
|
|
|
if (Number(item.count) === 0) { |
|
|
if (Number(item.count) == 0) { |
|
|
|
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: "warning", |
|
|
type: 'warning', |
|
|
showClose: true, |
|
|
showClose: true, |
|
|
message: '调拨数量不能为空或0' |
|
|
message: '调拨数量不能为空或0' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.submitdisabled = true |
|
|
this.submitdisabled = true |
|
|
req.allocation(this.formobj).then((res) => { |
|
|
req.allocation(this.formobj).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
@ -585,39 +409,35 @@ |
|
|
handleReturn(isreload) { |
|
|
handleReturn(isreload) { |
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
this.formobj = { |
|
|
this.formobj = { |
|
|
"sid": "", |
|
|
sid: '', |
|
|
"billNo": "", |
|
|
billNo: '', |
|
|
"useOrgSid": "", |
|
|
useOrgSid: '', |
|
|
"createBySid": window.sessionStorage.getItem('userSid'), |
|
|
createBySid: window.sessionStorage.getItem('userSid'), |
|
|
"createByName": window.sessionStorage.getItem('name'), |
|
|
createByName: window.sessionStorage.getItem('name'), |
|
|
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|
|
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|
|
createTime: getCurrentDate(), |
|
|
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
outOrgName: '', |
|
|
"createTime": getCurrentDate(), |
|
|
outOrgSid: '', |
|
|
"outOrgName": '', |
|
|
outPlatName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
"outOrgSid": '', |
|
|
outPlatSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
"outPlatName": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|
|
inOrgName: '', |
|
|
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|
|
inOrgSid: '', |
|
|
"outPlatSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|
|
inPlatName: '', |
|
|
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|
|
inPlatSid: '', |
|
|
"inOrgName": '', |
|
|
inOrgAttributeKey: '', |
|
|
"inOrgSid": '', |
|
|
inOrgAttributeValue: '', |
|
|
"inPlatName": "", |
|
|
confirmName: '', |
|
|
"inPlatSid": "", |
|
|
confirmSid: '', |
|
|
"inOrgAttributeKey": "", |
|
|
remarks: '', |
|
|
"inOrgAttributeValue": "", |
|
|
grade: '3', |
|
|
"confirmName": "", |
|
|
createOrgSid: '', |
|
|
"confirmSid": "", |
|
|
procDefId: '', |
|
|
"remarks": "", |
|
|
nodeId: '', |
|
|
"grade": "3", |
|
|
procInstId: '', |
|
|
"createOrgSid": "", |
|
|
nodeState: '待提交', |
|
|
"procDefId": "", |
|
|
taskId: '', |
|
|
"nodeId": "", |
|
|
wmsInventoryAllocateBillDetailNewList: [] |
|
|
"procInstId": "", |
|
|
|
|
|
"nodeState": "待提交", |
|
|
|
|
|
"taskId": "", |
|
|
|
|
|
"wmsInventoryAllocateBillDetailNewList": [] |
|
|
|
|
|
} |
|
|
} |
|
|
this.submitdisabled = false |
|
|
this.submitdisabled = false |
|
|
this.$emit('doback') |
|
|
this.$emit('doback') |
|
@ -664,8 +484,6 @@ |
|
|
width: calc(100% - 105px); |
|
|
width: calc(100% - 105px); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.addinputInfo { |
|
|
.addinputInfo { |
|
|
margin-left: 120px !important; |
|
|
margin-left: 120px !important; |
|
|
} |
|
|
} |
|
@ -686,10 +504,4 @@ |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|
|
|
|
|
display: inline; |
|
|
|
|
|
line-height: 1px; |
|
|
|
|
|
vertical-align: middle; |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
</style> |
|
|