Browse Source

完善调拨(分公司内)

zhanglei
yunuo970428 1 month ago
parent
commit
7e1eb9018a
  1. 73
      yxt-as-ui/src/api/storage/allocationByBranches.js
  2. 959
      yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesAdd.vue
  3. 2
      yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesInfo.vue
  4. 798
      yxt-as-ui/src/views/storage/allocationByBranches/index.vue
  5. 6
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue
  6. 842
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue
  7. 2
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue

73
yxt-as-ui/src/api/storage/allocationByBranches.js

@ -1,11 +1,9 @@
import request from '@/utils/request' import request from '@/utils/request'
export default { export default {
// 查询分页列表 // 查询分页列表
listPage: function(params) { listPage: function(params) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage',
method: 'post', method: 'post',
data: params, data: params,
@ -14,10 +12,8 @@ export default {
} }
}) })
}, },
deleteBySids: function(data) { deleteBySids: function(data) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delBySids', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delBySids',
method: 'DELETE', method: 'DELETE',
data: data, data: data,
@ -26,100 +22,50 @@ export default {
} }
}) })
}, },
// 保存物流信息 // 保存物流信息
saveLogisticsInfo: function(data) { saveLogisticsInfo: function(data) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryallocatebilllogistics/saveLogisticsInfo', url: '/wms/v1/wmsinventoryallocatebilllogistics/saveLogisticsInfo',
method: 'post', method: 'post',
data: data, data: data,
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}); })
}, },
// 新增、保存 // 新增、保存
save: function(data) { save: function(data) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save',
method: 'post', method: 'post',
data: data, data: data,
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
}); })
}, },
// 初始化 // 初始化
init: function(data) { init: function(data) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/fetchDetailsBySid/' + data, url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/fetchDetailsBySid/' + data,
method: 'get' method: 'get'
}); })
}, },
// 调拨 // 调拨
allocation: function(data) { allocation: function(data) {
return request({ return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/submitApply3',
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/submitApply',
method: 'post', method: 'post',
data: data, data: data,
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
} }
});
},
// 查询所有商品
getGoods: function(params) {
return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/inventory/wmsinventory/alloGoodsListPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 查询所有仓库
getWarehouses: function(params) {
return request({
url: '/wms/apiadmin/base/wmswarehouseinfo/listAll',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
}) })
}, },
// 根据仓库查询库位
getWarehouseareas: function(data) {
return request({
url: '/wms/apiadmin/base/wmswarehousearea/selectAll',
method: 'get',
params: data,
headers: {
'Content-Type': 'application/json'
}
});
},
// 流程审批(同意) // 流程审批(同意)
complete: function(params) { complete: function(params) {
return request({ return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/complete', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/complete3',
method: 'post', method: 'post',
data: params, data: params,
headers: { headers: {
@ -152,7 +98,7 @@ export default {
// 流程审批(驳回) // 流程审批(驳回)
reject: function(params) { reject: function(params) {
return request({ return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/reject', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/reject3',
method: 'post', method: 'post',
data: params, data: params,
headers: { headers: {
@ -185,7 +131,7 @@ export default {
// 审批流程(同意)获取下一环节 // 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) { getNextNodesForSubmit: function(data) {
return request({ return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getNextNodesForSubmit', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getNextNodesForSubmit3',
method: 'get', method: 'get',
params: data params: data
}) })
@ -193,10 +139,9 @@ export default {
// 审批流程(驳回)获取上一环节 // 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) { getPreviousNodesForReject: function(data) {
return request({ return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getPreviousNodesForReject', url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getPreviousNodesForReject3',
method: 'get', method: 'get',
params: data params: data
}) })
}, }
} }

959
yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesAdd.vue

File diff suppressed because it is too large

2
yxt-as-ui/src/views/storage/allocationByBranches/allocationByBranchesInfo.vue

@ -69,7 +69,7 @@
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocationByBranches'
export default { export default {
data() { data() {

798
yxt-as-ui/src/views/storage/allocationByBranches/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="调拨列表" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar ref="btnbar" view-title="调拨列表" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow"> <el-button size="small" class="searchbtn" @click="clicksearchShow">
@ -11,46 +11,38 @@
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="申请部门"> <el-form-item label="申请部门">
<el-input v-model="queryParams.params.deptName" placeholder="" clearable /> <el-input v-model="queryParams.params.deptName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="申请人"> <el-form-item label="申请人">
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> <el-input v-model="queryParams.params.createByName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> <el-input v-model="queryParams.params.billNo" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="单据日期"> <el-form-item label="单据日期">
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.createDateStart" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.createDateStart" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="办结日期"> <el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" <el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> <span style="padding: 0 8px"></span>
</el-date-picker> <el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" />
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="调出分公司"> <el-form-item label="调出分公司">
<el-input v-model="queryParams.params.outOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.outOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调出站"> <el-form-item label="调出站">
<el-input v-model="queryParams.params.outPlatName" placeholder="" clearable /> <el-input v-model="queryParams.params.outPlatName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调入分公司"> <el-form-item label="调入分公司">
<el-input v-model="queryParams.params.inOrgName" placeholder="" clearable /> <el-input v-model="queryParams.params.inOrgName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="调入站"> <el-form-item label="调入站">
<el-input v-model="queryParams.params.inPlatName" placeholder="" clearable /> <el-input v-model="queryParams.params.inPlatName" placeholder="" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="经办人"> <el-form-item label="经办人">
<el-input v-model="queryParams.params.confirmName" placeholder="" clearable /> <el-input v-model="queryParams.params.confirmName" placeholder="" clearable/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -66,497 +58,459 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="selectionLineChangeHandle">
@selection-change="selectionLineChangeHandle"> <el-table-column fixed width="50" type="selection" align="center"/>
<el-table-column fixed width="50" type="selection" align="center" /> <el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" align="center" width="150"> <el-table-column fixed label="操作" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.nodeState!='待提交'" <el-button type="primary" size="mini" :disabled="scope.row.nodeState!='待提交'" @click="toRelevancy(scope.row)">办理
@click="toRelevancy(scope.row)">办理</el-button> </el-button>
<el-button type="primary" size="mini" @click="toDetails(scope.row)">查看</el-button> <el-button type="primary" size="mini" @click="toDetails(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="nodeState" label="流程状态" align="center" /> <el-table-column prop="nodeState" label="流程状态" align="center"/>
<el-table-column prop="billNo" label="单据编号" align="center" /> <el-table-column prop="billNo" label="单据编号" align="center"/>
<el-table-column prop="createByName" label="申请人" align="center" /> <el-table-column prop="createByName" label="申请人" align="center"/>
<el-table-column prop="createTime" label="申请日期" align="center" /> <el-table-column prop="createTime" label="申请日期" align="center"/>
<!-- <el-table-column prop="state" label="完成标志" align="center" /> --> <el-table-column prop="finishTime" label="办结日期" align="center"/>
<!-- <el-table-column label="完成标志" align="center" width="180"> <el-table-column prop="createOrgName" label="调出分公司" align="center"/>
<template slot-scope="scope"> <el-table-column prop="outPlatName" label="调出站" align="center"/>
<span>{{scope.row.state=='1'?'未完成':'已完成'}}</span> <el-table-column prop="inOrgName" label="调入分公司" align="center"/>
</template> <el-table-column prop="inPlatName" label="调入站" align="center"/>
</el-table-column> --> <el-table-column prop="confirmName" label="经办人" align="center"/>
<el-table-column prop="finishTime" label="办结日期" align="center" /> <el-table-column prop="count" label="调拨数量" align="center"/>
<el-table-column prop="createOrgName" label="调出分公司" align="center" /> <el-table-column prop="amount" label="调拨金额" align="center"/>
<el-table-column prop="outPlatName" label="调出站" align="center" />
<el-table-column prop="inOrgName" label="调入分公司" align="center" />
<el-table-column prop="inPlatName" label="调入站" align="center" />
<el-table-column prop="confirmName" label="经办人" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" />
</el-table> </el-table>
</div> </div>
<!-- End 项目列表 --> <!-- End 项目列表 -->
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/>
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div> </div>
</div> </div>
</div> </div>
<!-- End 查询和其列表部分 --> <!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 --> <!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> <divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/>
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList"/>
<el-dialog title="补充物流信息" :visible.sync="dialogVisible" :before-close="handleClose" <el-dialog title="补充物流信息" :visible.sync="dialogVisible" :before-close="handleClose" style="width:120%;margin-left: -10%;">
style="width:120%;margin-left: -10%;">
<el-form ref="dataForm" class="formaddcopy02" style="margin-top: -40px;" :model="formobj"> <el-form ref="dataForm" class="formaddcopy02" style="margin-top: -40px;" :model="formobj">
<el-row class="first_row"> <el-row class="first_row">
<el-col :span="24"> <el-col :span="24">
<div class="span-sty">送货方式</div> <div class="span-sty">送货方式</div>
<el-form-item> <el-select v-model="formobj.deliveryKey" placeholder="请选择送货方式" @change="selectDeliveryKey" <el-form-item>
class="addinputInfo"> <el-select v-model="formobj.deliveryKey" placeholder="请选择送货方式" @change="selectDeliveryKey" class="addinputInfo">
<el-option v-for="(item,i) in deliveryKeyList" :key="i" :label="item.name" :value="item.sid"> <el-option v-for="(item,i) in deliveryKeyList" :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 v-show="formobj.deliveryKey==1"> <el-row v-show="formobj.deliveryKey==1">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">快递单号</div> <div class="span-sty">快递单号</div>
<el-form-item><el-input v-model="formobj.expressBillNo" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.expressBillNo" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">快递公司</div> <div class="span-sty">快递公司</div>
<el-form-item><el-input v-model="formobj.expressCompany" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.expressCompany" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<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>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="formobj.deliveryKey==2"> <el-row v-show="formobj.deliveryKey==2">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">取货人</div> <div class="span-sty">取货人</div>
<el-form-item><el-input v-model="formobj.pickUpName" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.pickUpName" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">取货日期</div> <div class="span-sty">取货日期</div>
<el-form-item> <el-date-picker v-model="formobj.pickUpDate" type="date" class="addinputw addinputInfo" <el-form-item>
value-format="yyyy-MM-dd" placeholder="选择日期"> <el-date-picker v-model="formobj.pickUpDate" type="date" class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<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>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-show="formobj.deliveryKey==3"> <el-row v-show="formobj.deliveryKey==3">
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">送货人</div> <div class="span-sty">送货人</div>
<el-form-item><el-input v-model="formobj.deliveryPerson" placeholder="" class="addinputw addinputInfo" <el-form-item>
clearable /></el-form-item> <el-input v-model="formobj.deliveryPerson" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="span-sty">送达日期</div> <div class="span-sty">送达日期</div>
<el-form-item> <el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputw addinputInfo" <el-form-item>
value-format="yyyy-MM-dd" placeholder="选择日期"> <el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<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>
clearable /></el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> <div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;">
<el-button type="primary" style="margin-top: 20px;" @click="saveData"> </el-button> <el-button type="primary" style="margin-top: 20px;" @click="saveData"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/allocationByBranches.js' import req from '@/api/storage/allocationByBranches.js'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import divAdd from './allocationByBranchesAdd.vue'
import divAdd from './allocationByBranchesAdd.vue' import divInfo from './allocationByBranchesInfo.vue'
import divInfo from './allocationByBranchesInfo.vue'
export default { export default {
components: { components: {
ButtonBar, ButtonBar,
Pagination, Pagination,
pageye, divAdd,
divAdd, divInfo
divInfo },
}, data() {
data() { return {
return { dialogVisible: false,
dialogVisible: false, btndisabled: false,
btndisabled: false, viewState: 1, // 1 2 3 4
viewState: 1, // 1 2 3 4 isSearchShow: false,
isSearchShow: false, searchxianshitit: '显示查询条件',
searchxianshitit: '显示查询条件', tableLoading: false,
tableLoading: false, dataList: [],
dataList: [], btnList: [
btnList: [{ {
type: 'primary', type: 'primary',
size: 'small', size: 'small',
icon: 'plus', icon: 'plus',
btnKey: 'toAdd', btnKey: 'toAdd',
btnLabel: '新增' btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'el-icon-delete',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toSupplement',
btnLabel: '补充物流信息'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
"outOrgName": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
"createEndTime": "",
"finishStartTime": "",
"finishEndTime": "",
"outPlatName": "",
"inOrgName": "",
"inPlatName": "",
"confirmName": "",
"grade": "2",
}
}, },
sids: [], {
selectionList: [], type: 'danger',
deliveryKeyList: [{ size: 'small',
name: '快递', icon: 'el-icon-delete',
sid: 1 btnKey: 'doDel',
}, btnLabel: '删除'
{ },
name: '对方自取', {
sid: 2 type: 'primary',
}, size: 'small',
{ icon: 'edit',
name: '我方送货', btnKey: 'toSupplement',
sid: 3 btnLabel: '补充物流信息'
} },
], {
formobj: { type: 'info',
"sids": [], size: 'small',
"remarks": "", icon: 'cross',
"deliveryKey": "", btnKey: 'doClose',
"deliveryName": "", btnLabel: '关闭'
"expressBillNo": "", }
"expressCompany": "", ],
"pickUpName": "", queryParams: {
"pickUpDate": "", current: 1,
"deliveryPerson": "", size: 10,
"deliveryDate": "" total: 0,
params: {
outOrgName: '',
deptName: '',
createByName: '',
billNo: '',
createStartTime: '',
createEndTime: '',
finishStartTime: '',
finishEndTime: '',
outPlatName: '',
inOrgName: '',
inPlatName: '',
confirmName: '',
grade: '2',
userSid: '',
orgPath: '',
menuUrl: ''
} }
},
sids: [],
selectionList: [],
deliveryKeyList: [{
name: '快递',
sid: 1
},
{
name: '对方自取',
sid: 2
},
{
name: '我方送货',
sid: 3
}
],
formobj: {
sids: [],
remarks: '',
deliveryKey: '',
deliveryName: '',
expressBillNo: '',
expressCompany: '',
pickUpName: '',
pickUpDate: '',
deliveryPerson: '',
deliveryDate: ''
}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
} }
}, },
mounted() { btnHandle(btnKey) {
this.$refs['btnbar'].setButtonList(this.btnList) switch (btnKey) {
}, case 'toAdd':
created() { this.toAdd()
this.loadList() break
case 'doDel':
this.doDel()
break
case 'toSupplement':
this.toSupplement()
break
case 'doClose':
this.doClose()
break
default:
break
}
}, },
methods: { loadList() {
// this.tableLoading = true
clicksearchShow() { this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.isSearchShow = !this.isSearchShow this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
if (this.isSearchShow) { this.queryParams.params.menuUrl = this.$route.path
this.searchxianshitit = '隐藏查询条件' req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else { } else {
this.searchxianshitit = '显示查询条件' // resp.code
} this.dataList = []
}, this.queryParams.total = 0
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toSupplement':
this.toSupplement()
break
case 'doClose':
this.doClose()
break
default:
break
} }
}, }).catch(() => {
loadList() { this.tableLoading = false
this.tableLoading = true })
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') },
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.queryParams.params.menuUrl = this.$route.path
req.listPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
// //
indexMethod(index) { indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
selectTime1() { selectTime1() {
}, },
selectTime2() { selectTime2() {
}, },
dosearch() { dosearch() {
this.queryParams.current = 1 this.queryParams.current = 1
this.loadList() this.loadList()
}, },
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
current: 1, current: 1,
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
"outOrgName": "", outOrgName: '',
"deptName": "", deptName: '',
"createByName": "", createByName: '',
"billNo": "", billNo: '',
"createStartTime": "", createStartTime: '',
"createEndTime": "", createEndTime: '',
"finishStartTime": "", finishStartTime: '',
"finishEndTime": "", finishEndTime: '',
"outPlatName": "", outPlatName: '',
"inOrgName": "", inOrgName: '',
"inPlatName": "", inPlatName: '',
"confirmName": "", confirmName: '',
"grade": "2", grade: '2',
} userSid: '',
orgPath: '',
menuUrl: ''
} }
this.loadList() }
}, this.loadList()
toAdd() { },
this.viewState = 2 toAdd() {
this.$refs['divadd'].showAdd() this.viewState = 2
}, this.$refs['divadd'].showAdd()
doDel() { },
doDel() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.deleteBySids(this.sids).then((resp) => { req.deleteBySids(this.sids).then((resp) => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: resp.msg, message: resp.msg,
showClose: true showClose: true
}) })
this.loadList() this.loadList()
} else { } else {
loading.close()
// resp.code
}
}).catch(e => {
loading.close() loading.close()
}) // resp.code
}).catch(() => {}) }
} else { }).catch(e => {
this.$message({ loading.close()
type: "warning",
showClose: true,
message: '请至少选择一条记录进行删除操作'
}) })
} }).catch(() => {
},
selectionLineChangeHandle(val) {
console.log("val", val);
this.selectionList = val
const aa = []
val.forEach(element => {
aa.push(element.sid)
}) })
this.sids = aa } else {
}, this.$message({
toRelevancy(row) { type: 'warning',
this.viewState = 3 showClose: true,
this.$refs['divadd'].showEdit(row.sid) message: '请至少选择一条记录进行删除操作'
}, })
toDetails(row) { }
this.viewState = 4 },
this.$refs['divinfo'].showAdd(row.sid) selectionLineChangeHandle(val) {
}, this.selectionList = val
const aa = []
toSupplement() { val.forEach(element => {
if (this.sids.length > 0) { aa.push(element.sid)
this.dialogVisible = true })
this.sids = aa
console.log("toSupplement", this.sids); },
toRelevancy(row) {
} else { this.viewState = 3
this.$refs['divadd'].showEdit(row.sid)
},
toDetails(row) {
this.viewState = 4
this.$refs['divinfo'].showAdd(row.sid)
},
toSupplement() {
if (this.sids.length > 0) {
this.dialogVisible = true
} else {
this.$message({
type: 'warning',
showClose: true,
message: '请至少选择一条记录进行操作'
})
}
},
saveData() {
this.formobj.sids = this.sids
req.saveLogisticsInfo(this.formobj).then((resp) => {
if (resp.success) {
this.dialogVisible = false
this.$message({ this.$message({
type: "warning", type: 'success',
showClose: true, message: resp.msg,
message: '请至少选择一条记录进行操作' showClose: true
}) })
this.loadList()
} else {
// resp.code
} }
}, }).catch(e => {
saveData() { })
},
this.formobj.sids = this.sids handleClose() {
this.dialogVisible = false
req.saveLogisticsInfo(this.formobj).then((resp) => { },
if (resp.success) { selectDeliveryKey(val) {
this.dialogVisible = false const choose = this.deliveryKeyList.filter((item) => item.sid === val)
this.$message({ console.log('>>>>>>>>>selectDeliveryKey', choose)
type: 'success', this.formobj.deliveryName = choose[0].name
message: resp.msg, this.formobj.deliveryKey = choose[0].sid
showClose: true },
}) doClose() {
this.loadList() this.$store.dispatch('tagsView/delView', this.$route)
} else { this.$router.go(-1)
// resp.code },
} resetState() {
}).catch(e => {}) this.viewState = 1
},
handleClose() {
this.dialogVisible = false
},
selectDeliveryKey(val) {
console.log("selectDeliveryKey", val);
const choose = this.deliveryKeyList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectDeliveryKey', choose)
this.formobj.deliveryName = choose[0].name
this.formobj.deliveryKey = choose[0].sid
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
resetState() {
this.viewState = 1
},
} }
} }
}
</script> </script>
<style scoped> <style scoped>
/deep/ .el-form-item__error { /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must { .must {
color: #f00; color: #f00;
} }
.span-sty { .span-sty {
width: 90px !important; width: 90px !important;
} }
.addinputInfo { .addinputInfo {
margin-left: 80px !important; margin-left: 80px !important;
} }
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 80px !important; margin-left: 80px !important;
width: calc(100% - 70px); width: calc(100% - 70px);
} }
.first_row {
.first_row { border-top: 1px solid #E0E3EB;
border-top: 1px solid #E0E3EB; }
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/deep/ .el-form-item__error {
margin-left: 180px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style> </style>

6
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue

@ -113,10 +113,8 @@
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocationByBranches'
import { import { selectStaffListss } from '@/api/Common/dictcommons'
selectStaffListss
} from '@/api/Common/dictcommons'
export default { export default {
data() { data() {

842
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue

@ -9,10 +9,8 @@
</div> </div>
</div> </div>
<div class=""> <div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb"> <el-row style="border-top: 1px solid #e0e3eb">
<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>
@ -23,13 +21,10 @@
</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="8"> <el-col :span="8">
<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>
@ -37,8 +32,7 @@
<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="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>
@ -46,541 +40,425 @@
</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%;" <el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/>
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<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>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsID" label="商品ID" width="100" align="center" /> <el-table-column prop="goodsID" label="商品ID" width="100" align="center"/>
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" /> <el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center"/>
<el-table-column prop="goodsSkuCode" label="图号" width="100" align="center" /> <el-table-column prop="goodsSkuCode" label="图号" width="100" align="center"/>
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> <el-table-column prop="goodsSkuOwnSpec" label="规格" align="center"/>
<el-table-column prop="unit" label="单位" align="center" /> <el-table-column prop="unit" label="单位" align="center"/>
<el-table-column prop="warehouseName" label="仓库" width="150" align="center"/> <el-table-column prop="warehouseName" label="仓库" width="150" align="center"/>
<el-table-column prop="warehouseZoneName" label="区域" width="150" align="center"/> <el-table-column prop="warehouseZoneName" label="区域" width="150" align="center"/>
<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="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> </template>
</el-table-column> </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"/>
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
</div> </div>
<!-- 选择商品 --> <!-- 选择商品 -->
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" /> <chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState"/>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocationByBranches'
import chooseproducts from './relation/chooseproducts' import chooseproducts from './relation/chooseproducts'
import { import {
getCurrentDate getServiceStationByOrgSid,
} from '@/utils/index.js' selAllByOrgSidPath,
import { tranTwo
getServiceStationByOrgSid, } from '@/api/Common/dictcommons'
selAllByOrgSidPath,
getOrgSidByPath, export default {
fetchBySid, components: {
tranTwo chooseproducts
} from '@/api/Common/dictcommons' },
export default { data() {
components: { return {
chooseproducts, viewTitle: '',
}, viewState: 1,
data() { submitdisabled: false,
return { activeNames: '1',
viewTitle: '', index: 0,
viewState: 1, formobj: {
submitdisabled: false, sid: '',
activeNames: '1', billNo: '',
index: 0, useOrgSid: '',
formobj: { createBySid: '',
"sid": "", createByName: '',
"billNo": "", deptName: '',
"useOrgSid": "", deptSid: '',
"createBySid": '', createTime: '',
"createByName": '', outOrgName: '',
"deptName": '', outOrgSid: '',
"deptSid": '', outPlatName: '',
"createTime": getCurrentDate(), outPlatSid: '',
"outOrgName": '', inOrgName: '',
"outOrgSid": '', inOrgSid: '',
"outPlatName": '', inPlatName: '',
"outPlatSid": '', inPlatSid: '',
"inOrgName": '', inOrgAttributeKey: '',
"inOrgSid": '', inOrgAttributeValue: '',
"inPlatName": "", confirmName: '',
"inPlatSid": "", confirmSid: '',
"inOrgAttributeKey": "", remarks: '',
"inOrgAttributeValue": "", grade: '2',
"confirmName": "", createOrgSid: '',
"confirmSid": "", procDefId: '',
"remarks": "", nodeId: '',
"grade": "2", procInstId: '',
"createOrgSid": "", nodeState: '待提交',
"procDefId": "", taskId: '',
"nodeId": "", wmsInventoryAllocateBillDetailNewList: []
"procInstId": "", },
"nodeState": "待提交", rules: {
"taskId": "", inOrgName: [{
"wmsInventoryAllocateBillDetailNewList": [] required: true,
}, message: '调入分公司不能为空',
rules: { trigger: 'change'
inOrgName: [{ }],
required: true, inPlatName: [{
message: '调入分公司不能为空', required: true,
trigger: 'change' message: '调入站点不能为空',
}], trigger: 'change'
inPlatName: [{ }],
required: true, confirmName: [{
message: '调入站点不能为空', required: true,
trigger: 'change' message: '经办人不能为空',
}], trigger: 'change'
confirmName: [{ }]
required: true, },
message: '经办人不能为空', orgList: [],
trigger: 'change' deptList: [],
}], operatorNameList: [],
}, warehouseList: [],
orgList: [], warehouseRackList: []
deptList: [], }
operatorNameList: [], },
warehouseList: [], created() {
warehouseRackList: [] console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
} }
}, }, '*')
created() { },
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6 methods: {
const data = window.location.href.substr(one) // urlunescape()web,使 //
const obj = JSON.parse(decodeURIComponent(data)) getSummaries(param) {
this.showInfo(obj.businessSid) const {
}, columns,
mounted() { data
window.parent.postMessage({ } = param
cmd: 'returnHeight', const sums = []
params: { columns.forEach((column, index) => {
// if (index === 0) {
code: 2, sums[index] = '合计'
data: 500 + 'px' return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} }
}, '*') })
return sums
}, },
selectInOrg(val) {
methods: { const choose = this.orgList.filter((item) => item.sid === val)
// this.formobj.inOrgSid = choose[0].sid
getSummaries(param) { this.formobj.inOrgName = choose[0].name
const { getServiceStationByOrgSid(choose[0].sid).then((res) => {
columns, if (res.success) {
data this.formobj.inDeptSid = ''
} = param this.formobj.inDeptName = ''
const sums = [] this.formobj.inOrgAttributeKey = ''
columns.forEach((column, index) => { this.formobj.inOrgAttributeValue = ''
if (index === 0) { this.deptList = res.data
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
selectInOrg(val) {
console.log("selectInOrg", val);
const choose = this.orgList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
this.formobj.inOrgSid = choose[0].sid
this.formobj.inOrgName = choose[0].name
getServiceStationByOrgSid(choose[0].sid).then((res) => {
if (res.success) {
this.formobj.inDeptSid = ''
this.formobj.inDeptName = ''
this.formobj.inOrgAttributeKey = ''
this.formobj.inOrgAttributeValue = ''
console.log("getListDeptByOrgSid", res);
this.deptList = res.data
}
})
},
selectInDeptName(val) {
console.log("selectInDeptName", val);
const choose = this.deptList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInDeptName', choose)
this.formobj.inPlatSid = choose[0].sid
this.formobj.inPlatName = choose[0].name
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
},
selectOperatorName(val) {
console.log("selectOperatorName", val);
const choose = this.operatorNameList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectOutOrg', choose)
this.formobj.confirmSid = choose[0].sid
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() {
this.viewTitle = '【新增】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.viewTitle = '【修改】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
tranTwo(this.formobj.deptSid).then((resp) => {
if (resp.success) {
console.log("tranTwo", resp);
this.deptList = resp.data
}
})
selAllByOrgSidPath({
orgSidPath: this.formobj.orgPath
}).then((res) => {
if (res.success) {
console.log("selAllByOrgSidPath", res);
this.operatorNameList = res.data
}
})
}
})
},
backData(value) { selectInDeptName(val) {
this.viewState = 1 const choose = this.deptList.filter((item) => item.sid === val)
if (value.length > 0) { this.formobj.inPlatSid = choose[0].sid
value.forEach((e) => { this.formobj.inPlatName = choose[0].name
this.formobj.wmsInventoryAllocateBillDetailNewList.push({ this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
goodsSpuSid: e.goodsSpuSid, this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
goodsSpuName: e.goodsSpuName, },
goodsSkuCode: e.goodsSkuCode, selectOperatorName(val) {
goodsSkuOwnSpec: e.goodsSkuOwnSpec, const choose = this.operatorNameList.filter((item) => item.sid === val)
goodsSkuSid: e.goodsSkuSid, this.formobj.confirmSid = choose[0].sid
goodsSkuTitle: e.goodsSkuTitle, this.formobj.confirmName = choose[0].name
billSid: this.formobj.sid, },
inventorySid: e.inventorySid, showAdd() {
warehouseSid: e.warehouseSid, this.viewTitle = '【新增】商品调拨申请'
warehouseName: e.warehouseName, this.$nextTick(() => {
warehouseZoneSid: e.warehouseZoneSid, this.$refs['form_obj'].clearValidate()
warehouseZoneName: e.warehouseZoneName, })
warehouseAreaSid: e.warehouseAreaSid, },
warehouseArea: e.warehouseArea, showInfo(sid) {
warehouseRackSid: e.warehouseRackSid, this.viewTitle = '【修改】商品调拨申请'
warehouseRackCode: e.warehouseRackCode, this.$nextTick(() => {
taxPrice: e.taxPrice, this.$refs['form_obj'].clearValidate()
stockCount: e.count, })
inWarehouseSid: '', req.init(sid).then((res) => {
inWarehouseName: '', if (res.success) {
inWarehouseRackSid: '', this.formobj = res.data
inWarehouseRackCode: '', this.formobj.instanceId = res.data.procInstId
count: 0, tranTwo(this.formobj.deptSid).then((resp) => {
amount: 0, if (resp.success) {
requAmount: e.taxPrice, this.deptList = resp.data
markUpRatio: 0, }
unit: e.unit, })
goodsID: e.goodsID, selAllByOrgSidPath({
manufacturerSid: e.manufacturerSid, orgSidPath: this.formobj.orgPath
manufacturerName: e.manufacturerName }).then((res) => {
}) if (res.success) {
this.operatorNameList = res.data
}
}) })
} }
}, })
deleteGoods(index) { },
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1) backData(value) {
}, this.viewState = 1
resetState() { if (value.length > 0) {
this.viewState = 1 value.forEach((e) => {
}, this.formobj.wmsInventoryAllocateBillDetailNewList.push({
seleGoods() { goodsSpuSid: e.goodsSpuSid,
this.viewState = 2 goodsSpuName: e.goodsSpuName,
const aa = [] goodsSkuCode: e.goodsSkuCode,
this.$refs['divSp'].showData(aa, this.formobj.deptSid) goodsSkuOwnSpec: e.goodsSkuOwnSpec,
}, goodsSkuSid: e.goodsSkuSid,
goodsSkuTitle: e.goodsSkuTitle,
// billSid: this.formobj.sid,
commodityComputeYHAndXSJE(row) { inventorySid: e.inventorySid,
console.log("commodityComputeYHAndXSJE", row); warehouseSid: e.warehouseSid,
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2) warehouseName: e.warehouseName,
warehouseZoneSid: e.warehouseZoneSid,
warehouseZoneName: e.warehouseZoneName,
warehouseAreaSid: e.warehouseAreaSid,
warehouseArea: e.warehouseArea,
warehouseRackSid: e.warehouseRackSid,
warehouseRackCode: e.warehouseRackCode,
taxPrice: e.taxPrice,
stockCount: e.count,
inWarehouseSid: '',
inWarehouseName: '',
inWarehouseRackSid: '',
inWarehouseRackCode: '',
count: 0,
amount: 0,
requAmount: e.taxPrice,
markUpRatio: 0,
unit: e.unit,
goodsID: e.goodsID,
manufacturerSid: e.manufacturerSid,
manufacturerName: e.manufacturerName
})
})
}
},
deleteGoods(index) {
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1)
},
resetState() {
this.viewState = 1
},
seleGoods() {
this.viewState = 2
const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid)
},
//
commodityComputeYHAndXSJE(row) {
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
},
//
commodityComputeYHAndXSJE2(row) {
if (Number(row.stockCount) < Number(row.count)) {
row.count = Number(row.stockCount)
} else {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
}, }
// },
commodityComputeYHAndXSJE2(row) { saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (Number(row.stockCount) < Number(row.count)) { if (valid) {
row.count = Number(row.stockCount) this.submitdisabled = true
} else { req.save(this.formobj).then((res) => {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2) if (res.success) {
} this.$message({
showClose: true,
}, type: 'success',
saveOrUpdate() { message: '保存成功'
console.log("saveOrUpdate", this.formobj); })
// ()
this.$refs['form_obj'].validate((valid) => { window.parent.postMessage({
if (valid) { cmd: 'returnHeight',
this.submitdisabled = true params: {
req.save(this.formobj).then((res) => { //
if (res.success) { code: 1
this.$message({ }
showClose: true, }, '*')
type: 'success', } else {
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length === 0) {
this.$message({
type: 'warning',
showClose: true,
message: '调拨商品不能为空'
}) })
return
} }
}) for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
}, var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
submit() { if (Number(item.count) === 0) {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) {
this.$message({ this.$message({
type: "warning", type: 'warning',
showClose: true, showClose: true,
message: '调拨商品不能为空' message: '调拨数量不能为空或0'
}) })
return return
} }
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
if (Number(item.count) == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨数量不能为空或0'
})
return
}
}
this.submitdisabled = true
req.allocation(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '调拨成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
} }
}) this.submitdisabled = true
}, req.allocation(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '调拨成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.formaddcopy02 .el-row .el-col /deep/ .el-form-item__error { .formaddcopy02 .el-row .el-col /deep/ .el-form-item__error {
margin-left: 120px !important; margin-left: 120px !important;
} }
.must { .must {
color: #f00; color: #f00;
} }
.span-sty { .span-sty {
width: 130px !important; width: 130px !important;
} }
.span-sty2 { .addinputInfo {
position: absolute; margin-left: 120px !important;
top: 0; }
bottom: 0;
left: 0; .formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
line-height: 42px; margin-left: 120px !important;
text-align: right; width: calc(100% - 115px);
font-size: 14px; }
color: #606266;
font-weight: 600; .first_row {
width: 70px; border-top: 1px solid #E0E3EB;
padding-right: 5px; }
border-right: 1px solid #e0e3eb;
width: 110px !important; .titleOne {
} padding: 7px;
display: flex;
.addinputInfo2 { flex-direction: row;
margin-left: 110px !important; justify-content: space-between;
} align-items: center;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw2 {
margin-left: 110px !important;
width: calc(100% - 105px);
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
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>

2
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue

@ -69,7 +69,7 @@
</template> </template>
<script> <script>
import req from '@/api/storage/allocation.js' import req from '@/api/storage/allocationByBranches'
export default { export default {
data() { data() {

Loading…
Cancel
Save