
25 changed files with 7053 additions and 29 deletions
@ -0,0 +1,72 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebill/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 查询分页列表 -- 供应商
|
||||
|
supplierListPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/base/basesupplierinfo/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 查询分页列表 -- 商品列表
|
||||
|
purGoodsListPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/base/basegoodssku/purGoodsListPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 初始化
|
||||
|
fetchDetailsBySid: function(data) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebillsettle/fetchDetailsBySid/' + data, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
}, |
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebill/save', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
settlement: function(data) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebillsettle/save', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebill/delBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
// 导出
|
||||
|
exportExcel: function(data) { |
||||
|
return request({ |
||||
|
url: '/pms/pmspurchasebill/exportExcel', |
||||
|
method: 'post', |
||||
|
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 新增、保存
|
||||
|
save: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/save', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 初始化
|
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/' + data, |
||||
|
method: 'get' |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 查询所有商品
|
||||
|
getGoods: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventory/alloGoodsListPage', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 查询所有仓库
|
||||
|
getWarehouses: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/base/wmswarehouseinfo/selectAll', |
||||
|
method: 'get' |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 根据仓库查询库位
|
||||
|
getWarehouseareas: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/base/wmswarehousearea/selectAll', |
||||
|
method: 'get', |
||||
|
data: data, |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/WmsAnsBill/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 详情初始化
|
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/WmsAnsBill/details', |
||||
|
method: 'get', |
||||
|
data:data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 收货初始化
|
||||
|
getInitDetails: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/getInitDetails', |
||||
|
method: 'get', |
||||
|
data:data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 新增收货单
|
||||
|
save: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 确认收货单
|
||||
|
submit: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/confirm', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/updateWmsInventory', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/riskcenter/v1/loancaseappealapply/details', |
||||
|
method: 'post', |
||||
|
params: data |
||||
|
}) |
||||
|
}, |
||||
|
fetchBySid: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/init', |
||||
|
method: 'get', |
||||
|
params: data |
||||
|
}) |
||||
|
}, |
||||
|
// 导出
|
||||
|
exportExcel: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/exportExcel', |
||||
|
method: 'post', |
||||
|
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/delBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
saveSettlebill: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventorysettlebill/saveSettlebill', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
getBillList: function(data) { |
||||
|
return request({ |
||||
|
url: '/inventory/wmsinventory/getBillList', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 初始化
|
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/getDetailsInit', |
||||
|
method: 'get', |
||||
|
data:data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 新增、保存
|
||||
|
save: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/WmsReceiptBill/delBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { 'Content-Type': 'application/json' } |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
}) |
||||
|
}, |
||||
|
// 新增、保存
|
||||
|
save: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/save', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 初始化
|
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventorycheckbill/' + data, |
||||
|
method: 'get' |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 查询所有商品
|
||||
|
getWarehousesGoods: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventory/invenGoodsListPage', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 盘点
|
||||
|
inven: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventory/wmsinventory/invenGoodsListPage', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
} |
@ -0,0 +1,338 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--列表页面--> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar view-title="采购开单管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<!--Start查询列表部分--> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
||||
|
<el-form-item label="供应商"> |
||||
|
<el-select v-model="listQuery.params.supplierSid" placeholder="请选择" clearable filterable> |
||||
|
<el-option v-for="item in supplier_list" :key="item.sid" :label="item.supplierName" :value="item.sid"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="开单时间"> |
||||
|
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="结算时间">--> |
||||
|
<!-- <el-date-picker v-model="listQuery.params.appealDueStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
||||
|
<!-- <span style="padding: 0 8px">至</span>--> |
||||
|
<!-- <el-date-picker v-model="listQuery.params.appealDueEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item> |
||||
|
<el-input v-model="listQuery.params.otherQuery" placeholder="单号、备注" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">采购开单列表</div> |
||||
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--Start 主页面主要部分 --> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" align="center" width="50" /> |
||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" width="180px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="settleState" label="结算标志" align="center" /> |
||||
|
<el-table-column prop="billNo" label="单号" align="center" /> |
||||
|
<el-table-column prop="supplierName" label="供应商" align="center" /> |
||||
|
<el-table-column prop="supplierPhone" label="供应商联系方式" align="center" /> |
||||
|
<el-table-column prop="storekeeperName" label="库管员" align="center" /> |
||||
|
<el-table-column prop="settleTime" label="结算时间" align="center" /> |
||||
|
<el-table-column prop="createTime" label="创建时间" align="center" /> |
||||
|
<el-table-column prop="createByName" label="制单人" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!--End 主页面主要部分--> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--新增及修改 --> |
||||
|
<procurementAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList" /> |
||||
|
<!-- 详情 --> |
||||
|
<procurementInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import req from '@/api/purchase/procurement' |
||||
|
import { choiceSupplierInfo } from '@/api/Common/dictcommons' |
||||
|
import procurementAdd from './procurementAdd' |
||||
|
import procurementInfo from './procurementInfo' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Procurement', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
procurementAdd, |
||||
|
procurementInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'edit', |
||||
|
btnKey: 'toEdit', |
||||
|
btnLabel: '编辑' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'success', |
||||
|
size: 'small', |
||||
|
icon: 'export', |
||||
|
btnKey: 'doExport', |
||||
|
btnLabel: '导出' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], // 用于导出的时候保存已选择的SIDs |
||||
|
supplier_list: [], |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
// 翻页 |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
supplierSid: '', |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
createOrgSid: '', |
||||
|
otherQuery: '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 初始化变量 |
||||
|
this.init() |
||||
|
this.getList() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
choiceSupplierInfo({ createOrgSid : '' }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.supplier_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doExport': |
||||
|
this.doExport() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
// 信息条数 获取点击时当前的sid |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 表中序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
req.listPage(this.listQuery).then((response) => { |
||||
|
this.listLoading = false |
||||
|
if (response.success) { |
||||
|
this.list = response.data.records |
||||
|
this.listQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 点击重置 |
||||
|
handleReset() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
supplierSid: '', |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
createOrgSid: '', |
||||
|
otherQuery: '' |
||||
|
} |
||||
|
} |
||||
|
this.init() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid) |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
if (this.sids.length === 1) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divAdd'].showEdit(this.sids[0]) |
||||
|
} else { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' }) |
||||
|
} |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divInfo'].showInfo(row) |
||||
|
}, |
||||
|
doDel() { |
||||
|
if (this.sids.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
||||
|
return |
||||
|
} |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
} |
||||
|
this.getList() |
||||
|
loading.close() |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
doExport() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.exportExcel(this.listQuery.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '销售单查询' + '.xls' |
||||
|
const elink = document.createElement('a') |
||||
|
elink.download = fileName |
||||
|
elink.style.display = 'nonde' |
||||
|
elink.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(elink) |
||||
|
elink.click() |
||||
|
URL.revokeObjectURL(elink.href) |
||||
|
document.body.removeChild(elink) |
||||
|
}).catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}, |
||||
|
// 修改、编辑、详情返回列表页面 |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,599 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
||||
|
<el-button type="danger" size="small" :disabled="submitdisabled" @click="settle()">结算</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="16"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item> |
||||
|
<el-popover placement="right" width="600" trigger="click"> |
||||
|
<div> |
||||
|
<el-table :data="supplierData" v-loading="supplierLoading" highlight-current-row @current-change="supplierCurrentChange"> |
||||
|
<el-table-column fixed prop="vehMark" label="车辆拍照" align="center" width="130"/> |
||||
|
<el-table-column prop="name" label="客户" align="center" width="100"/> |
||||
|
<el-table-column prop="mobile" label="联系方式" align="center" min-width="300"/> |
||||
|
<el-table-column prop="orgName" label="客户单位" align="center" width="100"/> |
||||
|
</el-table> |
||||
|
<el-pagination :page.sync="supplierQuery.current" :page-size="supplierQuery.size" layout="total, pager" :total="supplierQuery.total"/> |
||||
|
</div> |
||||
|
<el-input slot="reference" class="addinputInfo addinputw" style="width: 30%" v-model="formobj.pmsPurchaseBill.supplierName" @input="supplierInput(formobj.pmsPurchaseBill.supplierName)" clearable placeholder="供应商名称、联系方式、缩写"/> |
||||
|
</el-popover> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">联系方式</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.pmsPurchaseBill.supplierPhone }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">发票类型</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.pmsPurchaseBill.billTypeValue" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">是否需要发票</div> |
||||
|
<el-form-item> |
||||
|
<el-radio-group class="addinputInfo" style="font-size: 1px" v-model="formobj.pmsPurchaseBill.isInvoicing"> |
||||
|
<el-radio label="1">是</el-radio> |
||||
|
<el-radio label="2">否</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">发票号码</div> |
||||
|
<el-form-item> |
||||
|
<el-input class="addinputInfo addinputw" v-model="formobj.pmsPurchaseBill.invoiceCode" clearable placeholder=""/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item> |
||||
|
<el-input class="addinputInfo addinputw" v-model="formobj.pmsPurchaseBill.remarks" clearable placeholder=""/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">采购员</div> |
||||
|
<el-form-item> |
||||
|
<el-input class="addinputInfo addinputw" v-model="formobj.purchaserName" clearable placeholder=""/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">库管员</div> |
||||
|
<el-form-item> |
||||
|
<el-input class="addinputInfo addinputw" v-model="formobj.pmsPurchaseBill.storekeeperName" clearable placeholder=""/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title">商品列表</div> |
||||
|
<el-table :key="commodityKey" :data="formobj.pmsPurchaseBill.pmsPurchaseBillDetailList" :index="index" border style="width: 100%"> |
||||
|
<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="600" trigger="click"> |
||||
|
<div> |
||||
|
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row @current-change="commodityCurrentChange($event, scope.row)"> |
||||
|
<el-table-column fixed prop="goodsName" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="goodsSkuCode" label="零件号" align="center" /> |
||||
|
<el-table-column prop="goodsShortName" label="商品简称" align="center" /> |
||||
|
<el-table-column prop="goodsPY" label="商品拼音" align="center" /> |
||||
|
<el-table-column prop="title" label="规格" align="center" /> |
||||
|
</el-table> |
||||
|
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" layout="total, pager" :total="commodityQuery.total" /> |
||||
|
</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 prop="goodsCode" label="零件号" align="center" width="100" /> |
||||
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" width="100" /> |
||||
|
<el-table-column prop="currentCount" label="库存数量" align="center" width="100" /> |
||||
|
<el-table-column label="仓库" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input v-model="scope.row.warehouseName" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="货位" align="center" width="130"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input v-model="scope.row.warehouseRackName" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="进价" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input @input="amountInput(scope.row)" @keyup.native="scope.row.cost = getNumber(scope.row.cost, 2)" v-model="scope.row.cost" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="采购数量" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input @input="amountInput(scope.row)" @keyup.native="scope.row.count = getNumber(scope.row.count, 2)" v-model="scope.row.count" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="taxAmount" label="税额" align="center" width="100" /> |
||||
|
<el-table-column label="含税价" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input v-model="scope.row.taxPrice" @keyup.native="scope.row.taxPrice = getNumber(scope.row.taxPrice, 2)" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="amount" label="采购金额" align="center" width="100" /> |
||||
|
<el-table-column label="销售价" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input v-model="scope.row.salesPrice" @keyup.native="scope.row.salesPrice = getNumber(scope.row.salesPrice, 2)" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">合计含税金额</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ hjhsjeTotal }} = 进价: {{ jjTotal }} + 税额: {{ seTotal }} | 数量: {{ slTotal }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">采购金额</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ cgjeTotal }} = 合计含税金额:{{ hjhsjeTotal }} + 误差调整:<el-input style="width: 100px" v-model="formobj.errorAmount" clearable placeholder="" /></span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">应付金额</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ yfjeTotal }} = 采购金额:{{ cgjeTotal }} - 优惠金额:<el-input style="width: 100px" v-model="formobj.discountAmount" clearable placeholder="" /></span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-dialog :visible.sync="settleVisible" width="70%"> |
||||
|
<el-form :model="formobj" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">应付金额</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.payableAmount }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<div class="span-sty">预付款抵扣</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.prepaymentdeductAmount" clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">结算方式</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.settleValue" clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">结算金额</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.settleAmount" clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">结算时间</div> |
||||
|
<el-form-item><el-date-picker class="addinputInfo addinputw" v-model="formobj.settleTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">其他结算方式</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.otherSettleKey" clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">其他结算金额</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.otherSettleValue" clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">欠款金额</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ debts }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<div style="text-align:center;margin-top: 20px;"> |
||||
|
<el-button type="primary" size="mini" @click="confirm">确 定</el-button> |
||||
|
<el-button type="info " size="mini" @click="settleVisible = false">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/purchase/procurement' |
||||
|
|
||||
|
export default { |
||||
|
name: 'ProcurementAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
settleVisible: false, // 结算弹框 |
||||
|
activeNames: '1', |
||||
|
index: 0, |
||||
|
// supplier供应商 |
||||
|
supplierKey: 1, |
||||
|
supplierLoading: false, |
||||
|
supplierQuery: { |
||||
|
current: 1, |
||||
|
size: 2, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
otherQuery: '', |
||||
|
useOrgSid: '' |
||||
|
} |
||||
|
}, |
||||
|
supplierData: [], |
||||
|
// commodity商品 |
||||
|
commodityKey: 1, |
||||
|
commodityLoading: false, |
||||
|
commodityQuery: { |
||||
|
current: 1, |
||||
|
size: 2, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
otherQuery: '', |
||||
|
orgSid: '' |
||||
|
} |
||||
|
}, |
||||
|
commodityData: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
pmsPurchaseBill: { |
||||
|
sid: '', |
||||
|
remarks: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
sourceBillSid: '', |
||||
|
sourceBillNo: '', |
||||
|
billNo: '', |
||||
|
purchaseTypeKey: '', |
||||
|
purchaseTypeValue: '', |
||||
|
supplierSid: '', |
||||
|
supplierName: '', |
||||
|
supplierPhone: '', |
||||
|
billTypeKey: '', |
||||
|
billTypeValue: '', |
||||
|
isInvoicing: '', |
||||
|
invoiceCode: '', |
||||
|
purchaserSid: '', |
||||
|
purchaserName: '', |
||||
|
storekeeperSid: '', |
||||
|
storekeeperName: '', |
||||
|
freight: '', |
||||
|
discountAmount: '', |
||||
|
payableAmount: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
errorAmount: '', |
||||
|
pmsPurchaseBillDetailList: [] |
||||
|
}, |
||||
|
remarks: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
billSid: '', |
||||
|
payableAmount: '', |
||||
|
prepaymentdeductAmount: '', |
||||
|
settleKey: '', |
||||
|
settleValue: '', |
||||
|
settleAmount: '', |
||||
|
otherSettleKey: '', |
||||
|
otherSettleValue: '', |
||||
|
debts: '', |
||||
|
settleTime: '' |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
// 合计进价 |
||||
|
jjTotal() { |
||||
|
let jj = 0 |
||||
|
if (this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.length > 0) { |
||||
|
this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.forEach((e) => { |
||||
|
if (e.goodsSpuName !== '' && e.cost !== '' && e.count !== '') { |
||||
|
jj = jj + Math.round((parseFloat(e.cost) * parseFloat(e.count)) * 100) / 100 |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
return jj |
||||
|
}, |
||||
|
// 合计税额 |
||||
|
seTotal() { |
||||
|
let se = 0 |
||||
|
if (this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.length > 0) { |
||||
|
this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.forEach((e) => { |
||||
|
if (e.goodsSpuName !== '' && e.taxAmount !== '') { |
||||
|
se = se + parseFloat(e.taxAmount) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
return se |
||||
|
}, |
||||
|
// 合计数量 |
||||
|
slTotal() { |
||||
|
let sl = 0 |
||||
|
if (this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.length > 0) { |
||||
|
this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.forEach((e) => { |
||||
|
if (e.goodsSpuName !== '' && e.count !== '') { |
||||
|
sl = sl + parseFloat(e.count) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
return sl |
||||
|
}, |
||||
|
// 合计含税金额 |
||||
|
hjhsjeTotal() { |
||||
|
let hjhsje = 0 |
||||
|
if (this.jjTotal !== null) { |
||||
|
hjhsje = this.jjTotal |
||||
|
} |
||||
|
return hjhsje |
||||
|
}, |
||||
|
// 采购金额 |
||||
|
cgjeTotal() { |
||||
|
let cgje = 0 |
||||
|
if (this.hjhsjeTotal !== null) { |
||||
|
cgje = cgje + Math.round((parseFloat(this.hjhsjeTotal !== '' ? this.hjhsjeTotal : '0') + parseFloat(this.formobj.pmsPurchaseBill.errorAmount !== '' ? this.formobj.pmsPurchaseBill.errorAmount : '0')) * 100) / 100 |
||||
|
} |
||||
|
return cgje |
||||
|
}, |
||||
|
// 应付金额 |
||||
|
yfjeTotal() { |
||||
|
let yfje = 0 |
||||
|
if (this.cgjeTotal !== null) { |
||||
|
yfje = yfje + Math.round((parseFloat(this.cgjeTotal !== '' ? this.cgjeTotal : '0') - parseFloat(this.formobj.pmsPurchaseBill.discountAmount !== '' ? this.formobj.pmsPurchaseBill.discountAmount : '0')) * 100) / 100 |
||||
|
} |
||||
|
return yfje |
||||
|
}, |
||||
|
// 结算页面中计算欠款金额 |
||||
|
debts() { |
||||
|
let debt = 0 |
||||
|
return debt |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】采购单' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【新增】采购单' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.fetchDetailsBySid(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getNumber(val, limit) { |
||||
|
val = val.replace(/[^0-9.]/g, '') // 保留数字 |
||||
|
val = val.replace(/^00/, '0.') // 开头不能有两个0 |
||||
|
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0. |
||||
|
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个 |
||||
|
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点 |
||||
|
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 |
||||
|
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' |
||||
|
const reg = new RegExp(str) |
||||
|
if (limit === 0) { |
||||
|
// 不需要小数点 |
||||
|
val = val.replace(reg, '$1') |
||||
|
} else { |
||||
|
// 通过正则保留小数点后指定的位数 |
||||
|
val = val.replace(reg, '$1.$2') |
||||
|
} |
||||
|
return val |
||||
|
}, |
||||
|
supplierInput(value) { |
||||
|
this.supplierQuery.params.otherQuery = value |
||||
|
this.supplierLoading = true |
||||
|
req.supplierListPage(this.supplierQuery).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.supplierLoading = false |
||||
|
this.supplierData = response.data.records |
||||
|
this.supplierQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.serviceLoading = false |
||||
|
this.supplierData = [] |
||||
|
this.supplierQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
supplierCurrentChange(value) { |
||||
|
this.formobj.pmsPurchaseBill.supplierName = value.supplierName |
||||
|
this.formobj.pmsPurchaseBill.supplierSid = value.sid |
||||
|
this.formobj.pmsPurchaseBill.supplierPhone = value.contactTelePhone |
||||
|
document.body.click() |
||||
|
}, |
||||
|
// 在头部标题上添加“新增”图标 |
||||
|
commodityHeader(h, { column }) { |
||||
|
return h( |
||||
|
'div', |
||||
|
[ |
||||
|
h('span', column.label), |
||||
|
h('i', { |
||||
|
class: 'add-btn-icon el-icon-plus', |
||||
|
style: 'color: red;font-size:20px', |
||||
|
on: { |
||||
|
click: this.commodityAdd // 点击执行函数 |
||||
|
} |
||||
|
}) |
||||
|
] |
||||
|
) |
||||
|
}, |
||||
|
commodityAdd() { |
||||
|
this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.push({ |
||||
|
sid: '', |
||||
|
billSid: '', |
||||
|
goodSpuSid: '', |
||||
|
goodsSpuName: '', |
||||
|
goodsSkuSid: '', |
||||
|
goodsSkuTitle: '', |
||||
|
goodsSkuCode: '', |
||||
|
goodsSkuOwnSpec: '', |
||||
|
currentCount: '', |
||||
|
warehouseSid: '', |
||||
|
warehouseName: '', |
||||
|
warehouseAreaSid: '', |
||||
|
warehouseAreaName: '', |
||||
|
warehouseRackSid: '', |
||||
|
warehouseRackName: '', |
||||
|
cost: '', |
||||
|
count: '', |
||||
|
taxAmount: '', |
||||
|
taxPrice: '', |
||||
|
amount: '', |
||||
|
salesPrice: '', |
||||
|
minimumSalesPrice: '' |
||||
|
}) |
||||
|
}, |
||||
|
commodityInput(value) { |
||||
|
this.commodityQuery.params.otherQuery = value |
||||
|
this.commodityLoading = true |
||||
|
req.purGoodsListPage(this.commodityQuery).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.commodityLoading = false |
||||
|
this.commodityData = response.data.records |
||||
|
this.commodityQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.serviceLoading = false |
||||
|
this.commodityData = [] |
||||
|
this.commodityQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
commodityDelete(index) { |
||||
|
this.formobj.pmsPurchaseBill.pmsPurchaseBillDetailList.splice(index, 1) |
||||
|
}, |
||||
|
commodityCurrentChange(value, row) { |
||||
|
row.goodsSpuName = value.goodsName |
||||
|
row.goodsSkuOwnSpec = value.title |
||||
|
document.body.click() |
||||
|
}, |
||||
|
// 计算采购金额 |
||||
|
amountInput(row) { |
||||
|
if (row.goodsSpuName !== '') { |
||||
|
row.amount = Math.round((parseFloat(row.cost !== '' ? row.cost : '0') * parseFloat(row.count !== '' ? row.count : '0')) * 100) / 100 |
||||
|
} |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.saveOrUpdate(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
settle() { |
||||
|
this.settleVisible = true |
||||
|
this.formobj.payableAmount = this.yfjeTotal |
||||
|
}, |
||||
|
confirm() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.settlement(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '结算成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
pmsPurchaseBill: { |
||||
|
sid: '', |
||||
|
remarks: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
sourceBillSid: '', |
||||
|
sourceBillNo: '', |
||||
|
billNo: '', |
||||
|
purchaseTypeKey: '', |
||||
|
purchaseTypeValue: '', |
||||
|
supplierSid: '', |
||||
|
supplierName: '', |
||||
|
supplierPhone: '', |
||||
|
billTypeKey: '', |
||||
|
billTypeValue: '', |
||||
|
isInvoicing: '', |
||||
|
invoiceCode: '', |
||||
|
purchaserSid: '', |
||||
|
purchaserName: '', |
||||
|
storekeeperSid: '', |
||||
|
storekeeperName: '', |
||||
|
freight: '', |
||||
|
discountAmount: '', |
||||
|
payableAmount: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
errorAmount: '', |
||||
|
pmsPurchaseBillDetailList: [] |
||||
|
}, |
||||
|
remarks: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
billSid: '', |
||||
|
payableAmount: '', |
||||
|
prepaymentdeductAmount: '', |
||||
|
settleKey: '', |
||||
|
settleValue: '', |
||||
|
settleAmount: '', |
||||
|
otherSettleKey: '', |
||||
|
otherSettleValue: '', |
||||
|
debts: '', |
||||
|
settleTime: '' |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.settleVisible = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,58 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-table :key="tableKey" :data="formobj.pmsPurchaseBill.pmsPurchaseBillDetailList" :index="index" border style="width: 100%"> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import req from '@/api/purchase/procurement' |
||||
|
|
||||
|
export default { |
||||
|
name: 'ProcurementInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: {}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '采购开单详情' |
||||
|
req.fetchDetailsBySid(row.sio).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn() { |
||||
|
this.formobj = {} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,470 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settle()">调拨</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<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> |
||||
|
|
||||
|
<div |
||||
|
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding: 10px;"> |
||||
|
<div>商品列表</div> |
||||
|
<div v-if="formobj.billNo!=''">单号:{{formobj.billNo}}</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<el-table :key="commodityKey" :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border |
||||
|
style="width: 100%;"> |
||||
|
<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> |
||||
|
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" |
||||
|
layout="total, pager" :total="commodityQuery.total" /> |
||||
|
</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 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="warehouseArea" label="库位" align="center" /> |
||||
|
<el-table-column prop="stockCount" label="库存数量" align="center" /> |
||||
|
<el-table-column label="调入仓库" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.inWarehouseName" placeholder="请选择" @change="selectWarehouseName"> |
||||
|
<el-option v-for="(item,i) in warehouseList" :key="i" :label="item.warehouseName" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="调入库位" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.inWarehouseRackCode" placeholder="请选择" @change="selectWarehouseAreaCode"> |
||||
|
<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 label="调拨数量" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input @input="commodityComputeYHAndXSJE(scope.row,$event)" v-model="scope.row.count" clearable |
||||
|
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="amount" label="调拨金额" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item><span>调拨数量:{{ totalQuantity }} , 调拨金额:{{ materialCost }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="1"> |
||||
|
<el-form-item><span>备注</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="23"> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="请填写备注..." /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/allocation.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
settleVisible: false, // |
||||
|
activeNames: '1', |
||||
|
index: 0, |
||||
|
|
||||
|
// commodity商品 |
||||
|
commodityKey: 1, |
||||
|
commodityLoading: false, |
||||
|
commodityQuery: { |
||||
|
current: 1, |
||||
|
size: 2, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '', |
||||
|
inOrg: "", |
||||
|
outOrg: "" |
||||
|
} |
||||
|
}, |
||||
|
commodityData: [], |
||||
|
formobj: { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"createBySid": "", |
||||
|
"createDate": "", |
||||
|
"createUserSid": "", |
||||
|
"outOrgSid": "", |
||||
|
"inOrgSid": "", |
||||
|
"count": "", |
||||
|
"amount": "", |
||||
|
"confirmSid": "", |
||||
|
"confirmName": "", |
||||
|
"finishTime": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgName": "", |
||||
|
"wmsInventoryAllocateBillDetailNewList": [] |
||||
|
}, |
||||
|
rules: {}, |
||||
|
orgList: [{ |
||||
|
name: "撒记得", |
||||
|
sid: "123" |
||||
|
}, |
||||
|
{ |
||||
|
name: "阿萨德", |
||||
|
sid: "12323" |
||||
|
}, |
||||
|
{ |
||||
|
name: "我饿请问请问", |
||||
|
sid: "23423" |
||||
|
}, |
||||
|
{ |
||||
|
name: "特尔味道", |
||||
|
sid: "1234" |
||||
|
}, |
||||
|
{ |
||||
|
name: "提问额外撒大声地", |
||||
|
sid: "12324233" |
||||
|
} |
||||
|
], |
||||
|
warehouseList: [], |
||||
|
warehouseRackList: [] |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
// 调拨数量 |
||||
|
totalQuantity() { |
||||
|
let quantity = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
quantity += Number(e.count) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.count = quantity |
||||
|
|
||||
|
return quantity |
||||
|
}, |
||||
|
// 调拨金额 |
||||
|
materialCost() { |
||||
|
let material = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
material += Number((Number(e.count) * Number(e.taxPrice))) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.amount = material.toFixed(2) |
||||
|
|
||||
|
return material.toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
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 |
||||
|
}, |
||||
|
|
||||
|
selectOutOrg(val) { |
||||
|
console.log("selectOutOrg", val); |
||||
|
this.formobj.inOrgSid = val |
||||
|
|
||||
|
const choose = this.orgList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectOutOrg', choose) |
||||
|
this.formobj.outOrgSid = choose[0].sid |
||||
|
this.formobj.outOrgName = choose[0].name |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
getWarehouseList() { |
||||
|
req.getWarehouses().then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseList = res.data |
||||
|
|
||||
|
console.log("aaaaaa", this.warehouseList); |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWarehouseAreaList(sid) { |
||||
|
var query = { |
||||
|
ckSid: sid |
||||
|
} |
||||
|
req.getWarehouseareas(query).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseRackList = res.data |
||||
|
|
||||
|
console.log("aaaaaa", this.warehouseRackList); |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
selectWarehouseName(val) { |
||||
|
console.log("selectWarehouseName", val); |
||||
|
|
||||
|
this.getWarehouseAreaList(val) |
||||
|
}, |
||||
|
selectWarehouseAreaCode(val) { |
||||
|
console.log("selectWarehouseAreaCode", val); |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】调拨记录' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.getWarehouseList() |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【修改】调拨记录' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.init(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
|
||||
|
this.commodityQuery.params.inOrg = this.formobj.inOrgName |
||||
|
this.commodityQuery.params.outOrg = this.formobj.outOrgName |
||||
|
} |
||||
|
}) |
||||
|
this.getWarehouseList() |
||||
|
}, |
||||
|
// 在头部标题上添加“新增”图标 |
||||
|
commodityHeader(h, { |
||||
|
column |
||||
|
}) { |
||||
|
return h( |
||||
|
'div', |
||||
|
[ |
||||
|
h('span', column.label), |
||||
|
h('i', { |
||||
|
class: 'add-btn-icon el-icon-plus', |
||||
|
style: 'color: red;font-size:20px', |
||||
|
on: { |
||||
|
click: this.commodityAdd // 点击执行函数 |
||||
|
} |
||||
|
}) |
||||
|
] |
||||
|
) |
||||
|
}, |
||||
|
commodityAdd() { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.push({ |
||||
|
"sid": "", |
||||
|
"billSid": "", |
||||
|
"inventorySid": "", |
||||
|
"goodsSpuName": "", |
||||
|
"goodsSkuCode": "", |
||||
|
"goodsSkuOwnSpec": "", |
||||
|
"carModel": "", |
||||
|
"unit": "", |
||||
|
"warehouseSid": "", |
||||
|
"warehouseName": "", |
||||
|
"warehouseAreasid": "", |
||||
|
"warehouseArea": "", |
||||
|
"taxPrice": "", |
||||
|
"stockCount": "", |
||||
|
"inWarehouseSid": "", |
||||
|
"inWarehouseName": "", |
||||
|
"inWarehouseRackSid": "", |
||||
|
"inWarehouseRackCode": "", |
||||
|
"count": "", |
||||
|
"amount": "" |
||||
|
}) |
||||
|
}, |
||||
|
commodityInput(value) { |
||||
|
this.commodityQuery.params.name = value |
||||
|
this.commodityLoading = true |
||||
|
req.getGoods(this.commodityQuery).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.commodityLoading = false |
||||
|
this.commodityData = response.data.records |
||||
|
this.commodityQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.serviceLoading = false |
||||
|
this.commodityData = [] |
||||
|
this.commodityQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
commodityDelete(index) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1) |
||||
|
}, |
||||
|
commodityCurrentChange(value, row) { |
||||
|
row.inventorySid = value.sid |
||||
|
row.goodsSpuName = value.goodsSpuName |
||||
|
row.goodsSkuCode = value.goodsSkuCode |
||||
|
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec |
||||
|
row.unit = value.unit |
||||
|
row.warehouseName = value.warehouseName |
||||
|
row.warehouseSid = value.warehouseSid |
||||
|
row.warehouseArea = value.warehouseRackCode |
||||
|
row.warehouseAreasid = value.warehouseRackSid |
||||
|
row.taxPrice = value.taxPrice |
||||
|
row.stockCount = value.count |
||||
|
row.count = '' |
||||
|
row.amount = '' |
||||
|
document.body.click() |
||||
|
}, |
||||
|
// 计算优惠、销售金额 |
||||
|
commodityComputeYHAndXSJE(row, val) { |
||||
|
|
||||
|
console.log("aaaaaaaaa", row); |
||||
|
console.log("aaaaaaaaa", val); |
||||
|
Number() |
||||
|
if (Number(row.stockCount) < Number(row.count)) { |
||||
|
row.count = '' |
||||
|
row.amount = '' |
||||
|
} else { |
||||
|
|
||||
|
row.amount = (Number(row.count) * Number(row.taxPrice)).toFixed(2) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.save(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '保存成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
settle() { |
||||
|
this.settleVisible = true |
||||
|
this.formobj.settlementVo.receivableAmount = this.amountReceivable |
||||
|
}, |
||||
|
confirm() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.settlement(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '结算成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"createBySid": "", |
||||
|
"createDate": "", |
||||
|
"createUserSid": "", |
||||
|
"outOrgSid": "", |
||||
|
"inOrgSid": "", |
||||
|
"count": "", |
||||
|
"amount": "", |
||||
|
"confirmSid": "", |
||||
|
"confirmName": "", |
||||
|
"finishTime": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgName": "", |
||||
|
"wmsInventoryAllocateBillDetailNewList": [] |
||||
|
} |
||||
|
this.commodityQuery.params.inOrg = '' |
||||
|
this.commodityQuery.params.outOrg = '' |
||||
|
this.submitdisabled = false |
||||
|
this.settleVisible = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,324 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="调拨列表" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
|
||||
|
<el-form-item label="开始日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createDateStart" @change="selectTime1" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="结束日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createDateEnd" @change="selectTime2" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="单据编号"> |
||||
|
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="制单人"> |
||||
|
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="库管操作人"> |
||||
|
<el-input v-model="queryParams.params.warehouseManager" placeholder="" clearable /> |
||||
|
</el-form-item> --> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">调拨列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
||||
|
@selection-change="selectionLineChangeHandle"> |
||||
|
<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 prop="billNo" label="单据编号" align="center" /> |
||||
|
<el-table-column prop="createDate" label="单据日期" align="center" /> |
||||
|
<el-table-column prop="createByName" label="制单人姓名" align="center" /> |
||||
|
<el-table-column prop="state" label="完成标志" align="center" /> |
||||
|
<el-table-column prop="finishTime" label="完成时间" align="center" /> |
||||
|
<el-table-column prop="outOrg" label="调出门店" align="center" /> |
||||
|
<el-table-column prop="inOrg" label="调入门店" align="center" /> |
||||
|
<el-table-column prop="count" label="调拨数量" align="center" /> |
||||
|
<el-table-column prop="amount" label="调拨金额" align="center" /> |
||||
|
<el-table-column prop="createOrgName" label="门店" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/allocation.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './allocationAdd.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'edit', |
||||
|
btnKey: 'toEdit', |
||||
|
btnLabel: '编辑' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList:[] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
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) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
selectTime1() { |
||||
|
|
||||
|
}, |
||||
|
selectTime2() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
}, |
||||
|
toEdit(){ |
||||
|
if(this.selectionList.length!=1){ |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
|
||||
|
toBuild() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req.exportExcel(this.queryParams.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '出入库明细_' + this.queryParams.params.createDateStart + '.xls' |
||||
|
const elink = document.createElement('a') |
||||
|
elink.download = fileName |
||||
|
elink.style.display = 'nonde' |
||||
|
elink.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(elink) |
||||
|
elink.click() |
||||
|
URL.revokeObjectURL(elink.href) |
||||
|
document.body.removeChild(elink) |
||||
|
}).catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,432 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="预期到货通知单管理" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="单据编号"> |
||||
|
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单据日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker>至 |
||||
|
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="外部编号"> |
||||
|
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="业务类型"> |
||||
|
<el-select v-model="queryParams.params.busTypeKey" placeholder="请选择"> |
||||
|
<el-option v-for="(item,i) in busTypeList" :key="i" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="供应商"> |
||||
|
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="预期到货日期"> |
||||
|
<el-date-picker v-model="queryParams.params.deliveryDateStart"type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
至 |
||||
|
<el-date-picker v-model="queryParams.params.deliveryDateEnd" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单据状态"> |
||||
|
<el-select v-model="queryParams.params.billState" placeholder="请选择"> |
||||
|
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核状态"> |
||||
|
<el-select v-model="queryParams.params.reviewStatus" placeholder="请选择"> |
||||
|
<el-option v-for="(item,i) in reviewStatusList" :key="i" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">预期到货通知单列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
||||
|
@selection-change="selectionLineChangeHandle"> |
||||
|
<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 label="操作" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="billNo" label="单据编号" align="center" width="150"/> |
||||
|
<el-table-column prop="createTime" label="单据日期" align="center" width="150"/> |
||||
|
<el-table-column prop="createByName" label="制单人" align="center" width="150"/> |
||||
|
<el-table-column prop="sourceBillNo" label="外部单号" align="center" width="150"/> |
||||
|
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="150"/> |
||||
|
<el-table-column prop="supplierName" label="供应商" align="center" width="150"/> |
||||
|
<el-table-column prop="contact" label="联系人" align="center" width="150"/> |
||||
|
<el-table-column prop="mobile" label="联系人手机" align="center" width="150"/> |
||||
|
<el-table-column prop="deliveryDate" label="预计到货日期" align="center" width="150"/> |
||||
|
<el-table-column prop="billState" label="单据状态" align="center" width="150" /> |
||||
|
<el-table-column prop="reviewStatus" label="审核状态" align="center" width="150"/> |
||||
|
<el-table-column prop="refuseReason" label="拒绝原因" align="center" width="150"/> |
||||
|
|
||||
|
|
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @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-form ref="dataForm" class="formadd" style="margin-top: -40px;" :model="formobj"> |
||||
|
<el-row class="first_row" > |
||||
|
<el-col :span="8" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">审核结果</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<el-radio-group v-model="formobj.reviewStatus" size="small" @change="changeTheme"> |
||||
|
<el-radio :label="1" >合格</el-radio> |
||||
|
<el-radio :label="2">不合格</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">审核意见</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<el-input v-model="formobj.remarks" placeholder="请填写审核意见" class="addinputw" |
||||
|
style="width:100%" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
|
||||
|
|
||||
|
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
||||
|
<el-button type="primary" style="margin-top: 20px;" @click="saveExamine">确 定</el-button> |
||||
|
</div> |
||||
|
|
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/deliveryNotice.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './receiptAdd.vue' |
||||
|
import divInfo from './receiptInfo.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd, |
||||
|
divInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dialogVisible: false, |
||||
|
formobj: { |
||||
|
sid: "", |
||||
|
reviewStatus: "", |
||||
|
remarks: '' |
||||
|
}, |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAudit', |
||||
|
btnLabel: '审核' |
||||
|
}, { |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '收货' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
busTypeList:[ |
||||
|
{ |
||||
|
name :"业务类型1", |
||||
|
sid:"1" |
||||
|
}, |
||||
|
{ |
||||
|
name :"业务类型2", |
||||
|
sid:"2" |
||||
|
} |
||||
|
], |
||||
|
billStateList:[ |
||||
|
{ |
||||
|
name :"单据状态1", |
||||
|
sid:"1" |
||||
|
}, |
||||
|
{ |
||||
|
name :"单据状态2", |
||||
|
sid:"2" |
||||
|
} |
||||
|
], |
||||
|
reviewStatusList:[ |
||||
|
{ |
||||
|
name :"审核状态1", |
||||
|
sid:"1" |
||||
|
}, |
||||
|
{ |
||||
|
name :"审核状态2", |
||||
|
sid:"2" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
saveExamine(){ |
||||
|
|
||||
|
}, |
||||
|
changeTheme(){ |
||||
|
|
||||
|
}, |
||||
|
toAudit(){ |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.dialogVisible = true |
||||
|
}, |
||||
|
handleClose() { |
||||
|
this.dialogVisible = false |
||||
|
}, |
||||
|
selectTime1() { |
||||
|
|
||||
|
}, |
||||
|
selectTime2() { |
||||
|
|
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAudit': |
||||
|
this.toAudit() |
||||
|
break |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
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) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
|
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
// if(this.selectionList[0].checkState!=1){ |
||||
|
// this.$message({ |
||||
|
// type: 'warning', |
||||
|
// message: "此记录已完成,不可重复操作。", |
||||
|
// showClose: true |
||||
|
// }) |
||||
|
// return |
||||
|
// } |
||||
|
|
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divinfo'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,664 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>【新增】收货单</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submintdate">确认</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div class="listconadd"> |
||||
|
|
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<div class="title"> |
||||
|
<div>基础信息</div> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">制单人姓名</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">外部单号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">业务类型</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">到货日期</div> |
||||
|
<el-form-item> <el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputInfo" |
||||
|
value-format="yyyy-MM-dd" placeholder="选择日期"> |
||||
|
</el-date-picker></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据状态</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" |
||||
|
type="textarea" :rows="4" clearable /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
<el-button type="primary" size="mini" class="btntopblueline" @click="batchAddAll()">批次收货</el-button> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"> |
||||
|
<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 label="操作" wid align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="doGoods(scope.row)">删除</el-button> |
||||
|
<el-button type="primary" size="mini" @click="doAddBatch(scope.row)">批次+</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.warehouseName" placeholder="请选择" clearable |
||||
|
@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> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="库位" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.warehouseRackName" :disabled="scope.row.warehouseName==''" clearable |
||||
|
@focus="getWarehouseAreaList(scope.row.warehouseSid)" placeholder="请选择" |
||||
|
@change="selectWarehouseAreaCode"> |
||||
|
<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 label="预约数量" prop="orderCount" align="center" width="120" /> |
||||
|
<el-table-column label="实收数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)" |
||||
|
v-model="scope.row.actualInCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="拒收数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectCount" clearable placeholder="" |
||||
|
@input="commodityComputeYHAndXSJE2(scope.row,$event)" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="拒收原因" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectReason" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="是否质检" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.isQuality" size="small" @change="changeTheme"> |
||||
|
<el-radio :label="0">需要</el-radio> |
||||
|
<el-radio :label="1">不需要</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="质检状态" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.qualityState" size="small" @change="changeTheme2"> |
||||
|
<el-radio :label="0">合格</el-radio> |
||||
|
<el-radio :label="1">不合格</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="载具说明" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.packageRemark" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="入库价" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="税额" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="入库金额" prop="taxPrice" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
|
||||
|
|
||||
|
<div class="title"> |
||||
|
<div>商品-批次</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column fixed label="操作" wid align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品列表序号" prop="xh" align="center" width="120" /> |
||||
|
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="库位" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" /> |
||||
|
<el-table-column label="生产日期" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-date-picker v-model="scope.row.manufactureDate" type="date" |
||||
|
value-format="yyyy-MM-dd" placeholder="选择日期" @change="manufactureDateChange(scope.row,$event)" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" /> |
||||
|
<el-table-column label="数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.batchCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/deliveryNotice.js' |
||||
|
import req2 from '@/api/storage/allocation.js' |
||||
|
|
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
activeNames: ['1'], |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
sourceBillNo: "", |
||||
|
busTypeKey: "", |
||||
|
busTypeValue: "", |
||||
|
createByName: "", |
||||
|
billState: 0, |
||||
|
reviewStatus: "", |
||||
|
refuseReason: "", |
||||
|
contact: "", |
||||
|
mobile: "", |
||||
|
supplierSid: "", |
||||
|
supplierName: "", |
||||
|
goodsOwnerSid: "", |
||||
|
goodsOwner: "", |
||||
|
deliveryDate: "", |
||||
|
list: [], |
||||
|
pcList: [] |
||||
|
}, |
||||
|
hideUploadBtn: false, |
||||
|
warehouseList: [], |
||||
|
warehouseRackList: [] |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: { |
||||
|
|
||||
|
getWarehouseList() { |
||||
|
req2.getWarehouses().then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseList = res.data |
||||
|
|
||||
|
console.log("aaaaaa", this.warehouseList); |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWarehouseAreaList(sid) { |
||||
|
var query = { |
||||
|
ckSid: sid |
||||
|
} |
||||
|
req2.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('>>>>>>>>>selectWarehouseName', choose) |
||||
|
row.warehouseName = choose[0].warehouseName |
||||
|
row.warehouseSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
selectWarehouseAreaCode(val) { |
||||
|
console.log("selectWarehouseAreaCode", val); |
||||
|
|
||||
|
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
||||
|
row.warehouseRackName = choose[0].areaCode |
||||
|
row.warehouseRackSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
batchAddAll() { |
||||
|
|
||||
|
for (var i = 0; i < this.formobj.list.length; i++) { |
||||
|
var item = this.formobj.list[i] |
||||
|
|
||||
|
var info = { |
||||
|
xh: i + 1, |
||||
|
goodsSkuSid: item.goodsSkuSid, |
||||
|
goodsSkuTitle: item.goodsSkuTitle, |
||||
|
goodsSkuCode: item.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: item.goodsSkuOwnSpec, |
||||
|
unit: item.unit, |
||||
|
warehouseSid: item.warehouseSid, |
||||
|
warehouseName: item.warehouseName, |
||||
|
warehouseRackSid: item.warehouseRackSid, |
||||
|
warehouseRackName: item.warehouseRackName, |
||||
|
shelfLife: item.shelfLife, |
||||
|
orderCount: item.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
doGoods(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.list.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
|
||||
|
for (var i = this.formobj.pcList.length - 1; i >= 0; i--) { |
||||
|
if (this.formobj.pcList[i].number === (index + 1)) { |
||||
|
this.formobj.pcList.splice(i, 1); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
doGoodsBatch(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.pcList.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.pcList.splice(index, 1) |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
manufactureDateChange(row, val) { |
||||
|
|
||||
|
console.log("manufactureDateChange》》》》", val) |
||||
|
|
||||
|
row.manufactureDate = val |
||||
|
row.expirationDate = this.addDate(val, row.shelfLife) |
||||
|
|
||||
|
let reg = new RegExp('-', 'g') //g代表全部 |
||||
|
|
||||
|
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + row.expirationDate.replace(reg, '') |
||||
|
|
||||
|
|
||||
|
|
||||
|
this.$forceUpdate(); // 强制更新 |
||||
|
console.log("manufactureDateChange》》》》", row) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
addDate(date, days) { |
||||
|
var dates = new Date(date) |
||||
|
dates.setDate(dates.getDate() + days) |
||||
|
var year = dates.getFullYear() |
||||
|
var month = dates.getMonth() + 1 |
||||
|
var day = dates.getDate() |
||||
|
if (month < 9) { |
||||
|
month = "0" + month |
||||
|
} |
||||
|
if (day < 9) { |
||||
|
day = "0" + day |
||||
|
} |
||||
|
var time = year + '-' + month + '-' + day |
||||
|
return time |
||||
|
}, |
||||
|
|
||||
|
doAddBatch(row) { |
||||
|
const index = (this.formobj.list.findIndex((item) => item === row)) + 1 |
||||
|
console.log("doAddBatch》》》》", index) |
||||
|
console.log("doAddBatch》》》》", row) |
||||
|
|
||||
|
var info = { |
||||
|
xh: index, |
||||
|
goodsSkuSid: row.goodsSkuSid, |
||||
|
goodsSkuTitle: row.goodsSkuTitle, |
||||
|
goodsSkuCode: row.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: row.goodsSkuOwnSpec, |
||||
|
unit: row.unit, |
||||
|
warehouseSid: row.warehouseSid, |
||||
|
warehouseName: row.warehouseName, |
||||
|
warehouseRackSid: row.warehouseRackSid, |
||||
|
warehouseRackName: row.warehouseRackName, |
||||
|
shelfLife: row.shelfLife, |
||||
|
orderCount: row.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
console.log("aaaaaaaaaaa", info); |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
}, |
||||
|
commodityComputeYHAndXSJE(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if (Number(row.actualInCount) > Number(row.orderCount)) { |
||||
|
row.actualInCount = row.orderCount |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE2(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if ((Number(row.rejectCount) + Number(row.actualInCount)) > Number(row.orderCount)) { |
||||
|
row.rejectCount = Number(row.orderCount) - Number(row.actualInCount) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
changeTheme() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
changeTheme2() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
|
||||
|
indexMethod(index) { |
||||
|
return index + 1 |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
|
||||
|
if (this.formobj.deliveryDate == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '到货日期不能为空' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
|
||||
|
for (var i = 0; i < this.formobj.pcList.length; i++) { |
||||
|
var item = this.formobj.pcList[i] |
||||
|
|
||||
|
if (item.manufactureDate == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '生产日期不能为空' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (Number(item.batchCount) == 0) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '商品批次数量不能为0' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
for (var i = 0; i < this.formobj.list.length; i++) { |
||||
|
var index = i |
||||
|
var num = 0 |
||||
|
const choose = this.formobj.pcList.filter((item) => Number(item.xh) == (index + 1)) |
||||
|
for (var j = 0; j < choose.length; j++) { |
||||
|
|
||||
|
num += Number(choose[j].batchCount) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
console.log('>>>>>>>>>saveOrUpdate', num) |
||||
|
|
||||
|
if (num > Number(this.formobj.list[i].actualInCount)) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '商品批次数量不能大于商品实收数量' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.save(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '保存成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
submintdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
|
||||
|
|
||||
|
for (var i = 0; i < this.formobj.pcList.length; i++) { |
||||
|
var item = this.formobj.pcList[i] |
||||
|
|
||||
|
if (item.manufactureDate == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '生产日期不能为空' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (Number(item.batchCount) == 0) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '商品批次数量不能为0' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
for (var i = 0; i < this.formobj.list.length; i++) { |
||||
|
var index = i |
||||
|
var num = 0 |
||||
|
const choose = this.formobj.pcList.filter((item) => Number(item.xh) == (index + 1)) |
||||
|
for (var j = 0; j < choose.length; j++) { |
||||
|
|
||||
|
num += Number(choose[j].batchCount) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
console.log('>>>>>>>>>saveOrUpdate', num) |
||||
|
|
||||
|
if (num > Number(this.formobj.list[i].actualInCount)) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '商品批次数量不能大于商品实收数量' |
||||
|
}) |
||||
|
|
||||
|
return |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.submit(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '保存成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sourceBillNo: "", |
||||
|
busTypeKey: "", |
||||
|
busTypeValue: "", |
||||
|
createByName: "", |
||||
|
billState: 0, |
||||
|
reviewStatus: "", |
||||
|
refuseReason: "", |
||||
|
contact: "", |
||||
|
mobile: "", |
||||
|
supplierSid: "", |
||||
|
supplierName: "", |
||||
|
goodsOwnerSid: "", |
||||
|
goodsOwner: "", |
||||
|
deliveryDate: "", |
||||
|
list: [], |
||||
|
pcList: [] |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.getWarehouseList() |
||||
|
var params = { |
||||
|
sid: row.sid |
||||
|
} |
||||
|
|
||||
|
req.getInitDetails(params) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = {} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,177 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>预期到货通知单</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div class="listconadd"> |
||||
|
|
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<div class="title"> |
||||
|
<div>基础信息</div> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">制单人姓名</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">外部单号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">业务类型</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">到货日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.deliveryDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据状态</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">审核状态</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.reviewStatus }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">拒绝原因</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.refuseReason }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"> |
||||
|
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" /> |
||||
|
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="warehouseName" align="center" width="120" /> |
||||
|
<el-table-column label="库位" prop="warehouseRack" align="center" width="120" /> |
||||
|
<el-table-column label="预约数量" prop="orderCount" align="center" width="120" /> |
||||
|
<el-table-column label="待收货数量" prop="waitInCount" align="center" width="120" /> |
||||
|
<el-table-column label="已收货数量" prop="actualInCount" align="center" width="100" /> |
||||
|
<el-table-column label="入库价" prop="cost" align="center" width="100" /> |
||||
|
<el-table-column label="税额" prop="taxAmount" align="center" width="100" /> |
||||
|
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="采购金额" prop="amount" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/deliveryNotice.js' |
||||
|
|
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
submitdisabled: false, |
||||
|
formobj: {}, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
indexMethod(index) { |
||||
|
return index + 1 |
||||
|
}, |
||||
|
|
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
|
||||
|
var params = { |
||||
|
sid: row.sid |
||||
|
} |
||||
|
req.init(params) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = {} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,448 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="库存列表" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="商品名称"> |
||||
|
<el-input v-model="queryParams.params.goodsSpuName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">库存列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange"> |
||||
|
<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 label="操作" width="200" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)">修改</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toSendOrReceive(scope.row)">收发存</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
||||
|
<el-table-column prop="count" label="库存" align="center" /> |
||||
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
||||
|
<el-table-column prop="warehouseArea" label="货位" align="center" /> |
||||
|
<el-table-column prop="freePrice" label="三包价" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<inventoryAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
<!-- 详情 --> |
||||
|
<inventoryInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
||||
|
<!-- 收发存 --> |
||||
|
<el-dialog :visible.sync="sendOrReceiveVisible" width="70%"> |
||||
|
<div> |
||||
|
<el-form ref="multipleTable" :inline="true" :model="sendOrReceiveQuery" class="vinNoForm" label-width="100px"> |
||||
|
<el-form-item label="日期"> |
||||
|
<el-date-picker v-model="sendOrReceiveQuery.params.createTimeStart" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="sendOrReceiveQuery.params.createTimeEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" size="small" @click="selectSendOrReceive">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<el-table :key="sendOrReceiveKey" v-loading="sendOrReceiveLoading" :data="sendOrReceiveList" border fit highlight-current-row style="width: 100%;"> |
||||
|
<el-table-column :index="SendOrReceiveIndexMethod" align="center" label="序号" type="index" width="80"/> |
||||
|
<el-table-column prop="goodsSpuName" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="goodsSkuTitle" label="商品标题" align="center" /> |
||||
|
<el-table-column prop="goodsSkuOwnSpec" label="规格型号" align="center" /> |
||||
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
||||
|
<el-table-column prop="warehouseRackName" label="货架" align="center" /> |
||||
|
<el-table-column prop="cost" label="单位成本" align="center" /> |
||||
|
</el-table> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="sendOrReceiveList.length > 0" :limit.sync="sendOrReceiveQuery.size" :page.sync="sendOrReceiveQuery.current" :total="sendOrReceiveQuery.total" class="pagination" @pagination="getsendOrReceiveList"/> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
<!-- 结转 --> |
||||
|
<el-dialog :visible.sync="carryOverVisible" width="70%"> |
||||
|
<el-form :model="formobj" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">创建人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">创建时间</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">库存结算状态</div> |
||||
|
<el-form-item> |
||||
|
<el-radio-group class="addinputInfo" style="font-size: 1px" v-model="formobj.settleState"> |
||||
|
<el-radio label="1">进行中</el-radio> |
||||
|
<el-radio label="2">已完成</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">库存结算类型</div> |
||||
|
<el-form-item> |
||||
|
<el-radio-group class="addinputInfo" style="font-size: 1px" v-model="formobj.settleState"> |
||||
|
<el-radio label="1">月结</el-radio> |
||||
|
<el-radio label="2">年结</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" size="small" @click="handleConfirm()">确定</el-button> |
||||
|
<el-button size="small" @click="carryOverVisible = false">关闭</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventory.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import inventoryAdd from './inventoryAdd.vue' |
||||
|
import inventoryInfo from './inventoryInfo.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Inventory', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
inventoryAdd, |
||||
|
inventoryInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'carryOver', |
||||
|
btnLabel: '结转' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'success', |
||||
|
size: 'small', |
||||
|
icon: 'export', |
||||
|
btnKey: 'doExport', |
||||
|
btnLabel: '导出' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
goodsSpuName: '' |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
sendOrReceiveVisible: false, // 查看收发存 |
||||
|
sendOrReceiveKey: 2, |
||||
|
sendOrReceiveQuery: { |
||||
|
current: 1, |
||||
|
size: 5, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
createTimeStart: '', |
||||
|
createTimeEnd: '', |
||||
|
busTypeKey: '', |
||||
|
sid: '' |
||||
|
} |
||||
|
}, |
||||
|
sendOrReceiveList: [], |
||||
|
sendOrReceiveLoading: false, |
||||
|
carryOverVisible: false, |
||||
|
formobj: { |
||||
|
createTime: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
settleState: '', |
||||
|
settleType: '', |
||||
|
settleStartTime: '', |
||||
|
settleEndTime: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgSid: '', |
||||
|
sids: [] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'carryOver': |
||||
|
this.carryOver() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doExport': |
||||
|
this.doExport() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
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 |
||||
|
}) |
||||
|
}, |
||||
|
// 信息条数 获取点击时当前的sid |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
goodsSpuName: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divAdd'].showEdit(row) |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divInfo'].showInfo(row) |
||||
|
}, |
||||
|
// 结转 |
||||
|
carryOver() { |
||||
|
if (this.sids.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请至少勾选一条记录进行操作' }) |
||||
|
return |
||||
|
} |
||||
|
this.carryOverVisible = true |
||||
|
this.formobj = { |
||||
|
createTime: '', |
||||
|
createBySid: '', |
||||
|
createByName: '', |
||||
|
settleState: '', |
||||
|
settleType: '', |
||||
|
settleStartTime: '', |
||||
|
settleEndTime: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgSid: '', |
||||
|
sids: [] |
||||
|
} |
||||
|
}, |
||||
|
handleConfirm() { |
||||
|
this.formobj.sids = this.sids |
||||
|
req.saveSettlebill(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.carryOverVisible = false |
||||
|
this.$message({ showClose: true, type: 'success', message: '结转成功' }) |
||||
|
this.loadList() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
doDel() { |
||||
|
if (this.sids.length > 0) { |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
} else { |
||||
|
this.$message({ showClose: true, message: '请至少选择一条记录进行删除操作' }) |
||||
|
} |
||||
|
}, |
||||
|
doExport() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.exportExcel(this.queryParams.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '库存查询' + '.xls' |
||||
|
const elink = document.createElement('a') |
||||
|
elink.download = fileName |
||||
|
elink.style.display = 'nonde' |
||||
|
elink.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(elink) |
||||
|
elink.click() |
||||
|
URL.revokeObjectURL(elink.href) |
||||
|
document.body.removeChild(elink) |
||||
|
}).catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}, |
||||
|
toSendOrReceive(row) { |
||||
|
this.sendOrReceiveVisible = true |
||||
|
this.sendOrReceiveQuery.params.sid = row.sid |
||||
|
this.getsendOrReceiveList() |
||||
|
}, |
||||
|
// 收发存 |
||||
|
SendOrReceiveIndexMethod(index) { |
||||
|
var pagestart = (this.sendOrReceiveQuery.current - 1) * this.sendOrReceiveQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 收发存--加载列表 |
||||
|
getsendOrReceiveList() { |
||||
|
this.sendOrReceiveLoading = true |
||||
|
req.getBillList(this.sendOrReceiveQuery).then(response => { |
||||
|
this.sendOrReceiveLoading = false |
||||
|
if (response.success) { |
||||
|
this.sendOrReceiveList = response.data.records |
||||
|
this.sendOrReceiveQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.sendOrReceiveList = [] |
||||
|
this.sendOrReceiveQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 收发存 |
||||
|
selectSendOrReceive() { |
||||
|
this.sendOrReceiveQuery.current = 1 |
||||
|
this.getsendOrReceiveList() |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,194 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-collapse v-model="activeNames"> |
||||
|
<el-collapse-item title="商品信息" name="1"> |
||||
|
</el-collapse-item> |
||||
|
<el-collapse-item title="库存信息" name="2"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">仓库</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">数量</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格1</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price1" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格2</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price2" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格3</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price3" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格4</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price4" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格5</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.price5" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售底价</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.minimumPrice" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">货位</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.warehouseArea" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">折扣标志</div> |
||||
|
<el-form-item> |
||||
|
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0"> |
||||
|
</el-switch> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">三包价格</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.freePrice" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">首保价格</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.firstMaintainPrice" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">排序</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.sortNo" clearablea placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventory' |
||||
|
|
||||
|
export default { |
||||
|
name: 'InventoryAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
activeNames: '2', |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
warehouseName: '', |
||||
|
billObjName: '', |
||||
|
count: '', |
||||
|
price1: '', |
||||
|
price2: '', |
||||
|
price3: '', |
||||
|
price4: '', |
||||
|
price5: '', |
||||
|
minimumPrice: '', |
||||
|
warehouseArea: '', |
||||
|
isShowDiscount: '', |
||||
|
freePrice: '', |
||||
|
firstMaintainPrice: '', |
||||
|
sortNo: '' |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【编辑】' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.fetchBySid({ sid: row.sid }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.saveOrUpdate(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
warehouseName: '', |
||||
|
billObjName: '', |
||||
|
count: '', |
||||
|
price1: '', |
||||
|
price2: '', |
||||
|
price3: '', |
||||
|
price4: '', |
||||
|
price5: '', |
||||
|
minimumPrice: '', |
||||
|
warehouseArea: '', |
||||
|
isShowDiscount: '', |
||||
|
freePrice: '', |
||||
|
firstMaintainPrice: '', |
||||
|
sortNo: '' |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,173 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-collapse v-model="activeNames"> |
||||
|
<el-collapse-item title="商品信息" name="1"> |
||||
|
</el-collapse-item> |
||||
|
<el-collapse-item title="库存信息" name="2"> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">仓库</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.warehouseName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billObjName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">数量</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.count }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格1</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.price1 }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格2</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.price2 }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格3</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.price3 }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格4</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.price4 }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售价格5</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.price5 }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">销售底价</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.minimumPrice }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">货位</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.warehouseArea }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">折扣标志</div> |
||||
|
<el-form-item> |
||||
|
<el-switch class="addinputInfo" v-model="formobj.isShowDiscount" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0"> |
||||
|
</el-switch> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">三包价格</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.freePrice }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">首保价格</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.firstMaintainPrice }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">排序</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.sortNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventory' |
||||
|
|
||||
|
export default { |
||||
|
name: 'InventoryInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
activeNames: '2', |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
warehouseName: '', |
||||
|
billObjName: '', |
||||
|
count: '', |
||||
|
price1: '', |
||||
|
price2: '', |
||||
|
price3: '', |
||||
|
price4: '', |
||||
|
price5: '', |
||||
|
minimumPrice: '', |
||||
|
warehouseArea: '', |
||||
|
isShowDiscount: '', |
||||
|
freePrice: '', |
||||
|
firstMaintainPrice: '', |
||||
|
sortNo: '' |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '详情' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.fetchBySid({ sid: row.sid }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn() { |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
warehouseName: '', |
||||
|
billObjName: '', |
||||
|
count: '', |
||||
|
price1: '', |
||||
|
price2: '', |
||||
|
price3: '', |
||||
|
price4: '', |
||||
|
price5: '', |
||||
|
minimumPrice: '', |
||||
|
warehouseArea: '', |
||||
|
isShowDiscount: '', |
||||
|
freePrice: '', |
||||
|
firstMaintainPrice: '', |
||||
|
sortNo: '' |
||||
|
} |
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,415 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="收货单管理" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="单据编号"> |
||||
|
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单据日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createTimeStart" type="date" placeholder="选择日期" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker>至 |
||||
|
<el-date-picker v-model="queryParams.params.createTimeEnd" type="date" placeholder="选择日期" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="来源单号"> |
||||
|
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="业务类型"> |
||||
|
<el-select v-model="queryParams.params.busTypeKey" placeholder="请选择"> |
||||
|
<el-option v-for="(item,i) in busTypeList" :key="i" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="供应商"> |
||||
|
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="到货日期"> |
||||
|
<el-date-picker v-model="queryParams.params.deliveryDateStart" type="date" placeholder="选择日期" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
至 |
||||
|
<el-date-picker v-model="queryParams.params.deliveryDateEnd" type="date" placeholder="选择日期" |
||||
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单据状态"> |
||||
|
<el-select v-model="queryParams.params.billState" placeholder="请选择"> |
||||
|
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">收货单列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
||||
|
@selection-change="selectionLineChangeHandle"> |
||||
|
<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 label="操作" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)">办理</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="billNo" label="单据编号" align="center" /> |
||||
|
<el-table-column prop="createTime" label="单据日期" align="center" /> |
||||
|
<el-table-column prop="createByName" label="制单人" align="center" /> |
||||
|
<el-table-column prop="sourceBillNo" label="来源单号" align="center" /> |
||||
|
<el-table-column prop="busTypeValue" label="业务类型" align="center" /> |
||||
|
<el-table-column prop="supplierName" label="供应商" align="center" /> |
||||
|
<el-table-column prop="deliveryDate" label="到货日期" align="center" /> |
||||
|
<el-table-column prop="billState" label="单据状态" align="center" /> |
||||
|
|
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
<divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> |
||||
|
<divAddupShelfRecord v-show="viewState == 5" ref="divAddupShelfRecord" @doback="resetState" |
||||
|
@reloadlist="loadList" /> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/receivingGoods.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './receivingGoodsAdd.vue' |
||||
|
import divInfo from './receivingGoodsInfo.vue' |
||||
|
import divAddupShelfRecord from './upShelfAddRecord.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd, |
||||
|
divInfo, |
||||
|
divAddupShelfRecord |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dialogVisible: false, |
||||
|
formobj: { |
||||
|
sid: "", |
||||
|
reviewStatus: "", |
||||
|
remarks: '' |
||||
|
}, |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAudit', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '上架' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
busTypeList: [{ |
||||
|
name: "业务类型1", |
||||
|
sid: "1" |
||||
|
}, |
||||
|
{ |
||||
|
name: "业务类型2", |
||||
|
sid: "2" |
||||
|
} |
||||
|
], |
||||
|
billStateList: [{ |
||||
|
name: "单据状态1", |
||||
|
sid: "1" |
||||
|
}, |
||||
|
{ |
||||
|
name: "单据状态2", |
||||
|
sid: "2" |
||||
|
} |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
saveExamine() { |
||||
|
|
||||
|
}, |
||||
|
changeTheme() { |
||||
|
|
||||
|
}, |
||||
|
toAudit() { |
||||
|
|
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
|
||||
|
}, |
||||
|
selectTime1() { |
||||
|
|
||||
|
}, |
||||
|
selectTime2() { |
||||
|
|
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
const aa = [] |
||||
|
val.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
|
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAudit': |
||||
|
this.toAudit() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
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) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
doDel() { |
||||
|
|
||||
|
if (this.sids.length > 0) { |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
message: '请至少选择一条记录进行删除操作' |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
toAdd() { |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 5 |
||||
|
this.$refs['divAddupShelfRecord'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divinfo'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,767 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>{{title}}收货单</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">确认</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<div class="title"> |
||||
|
<div>基础信息</div> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">制单人姓名</div> |
||||
|
<el-form-item> <el-input v-model="formobj.createByName" placeholder="" class="addinputw addinputInfo" |
||||
|
clearable /></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">外部单号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据日期</div> |
||||
|
<el-form-item> <el-date-picker v-model="formobj.createTime" type="date" class="addinputInfo" |
||||
|
value-format="yyyy-MM-dd" placeholder="选择日期"> |
||||
|
</el-date-picker></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">业务类型</div> |
||||
|
<el-form-item><el-select v-model="formobj.busTypeValue" filterable clearable placeholder="请选择" |
||||
|
class="addinputInfo" @change="busTypeSelect"> |
||||
|
<el-option v-for="item in busTypeList" :key="item.sid" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item> <el-select v-model="formobj.supplierName" filterable clearable placeholder="请选择" |
||||
|
class="addinputInfo" @change="supplierNameSelect"> |
||||
|
<el-option v-for="item in supplierList" :key="item.sid" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">到货日期</div> |
||||
|
<el-form-item><el-date-picker v-model="formobj.deliveryDate" type="date" class="addinputInfo" value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据状态</div> |
||||
|
<el-form-item> <span class="addinputInfo">{{formobj.billState}}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" |
||||
|
type="textarea" :rows="4" clearable /></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
<div class="span" @click="batchAddAll()">批次收货</div> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="formobj.list" :index="index" border |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column width="60" label="序号" type="index" :index="index + 1" align="center" /> |
||||
|
<div v-if="isUpdata"> |
||||
|
<el-table-column label="操作" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="doGoods(scope.row)">删除</el-button> |
||||
|
<el-button type="primary" size="mini" @click="doAddBatch(scope.row)">批次+</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
<el-table-column align="center" width="70"> |
||||
|
<template slot="header"> |
||||
|
<i class="add-btn-icon el-icon-plus" style="color: red;font-size:20px" @click="commodityAdd"></i> |
||||
|
</template> |
||||
|
<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 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> |
||||
|
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" |
||||
|
layout="total, pager" :total="commodityQuery.total" /> |
||||
|
</div> |
||||
|
<el-input slot="reference" v-model="scope.row.goodsSpuName" |
||||
|
@input="commodityInput(scope.row.goodsSpuName)" clearable placeholder="商品名称" /> |
||||
|
</el-popover> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</div> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.warehouseName" placeholder="请选择" clearable |
||||
|
@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> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="库位" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-select v-model="scope.row.warehouseRackName" :disabled="scope.row.warehouseName==''" clearable |
||||
|
@focus="getWarehouseAreaList(scope.row.warehouseSid)" placeholder="请选择" |
||||
|
@change="selectWarehouseAreaCode"> |
||||
|
<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 label="预约数量" prop="orderCount" align="center" width="120" /> |
||||
|
<el-table-column label="实收数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)" |
||||
|
v-model="scope.row.actualInCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="拒收数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectCount" clearable placeholder="" |
||||
|
@input="commodityComputeYHAndXSJE2(scope.row,$event)" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="拒收原因" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.rejectReason" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="是否质检" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.isQuality" size="small"> |
||||
|
<el-radio :label="0">需要</el-radio> |
||||
|
<el-radio :label="1">不需要</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="质检状态" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.qualityState" size="small"> |
||||
|
<el-radio :label="0">合格</el-radio> |
||||
|
<el-radio :label="1">不合格</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="载具说明" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.packageRemark" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="入库价" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE3(scope.row,$event)" |
||||
|
v-model="scope.row.cost" clearable placeholder="" |
||||
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="税额" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE4(scope.row,$event)" |
||||
|
v-model="scope.row.taxAmount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="含税单价" prop="taxPrice" @input="commodityComputeYHAndXSJE5(scope.row,$event)" |
||||
|
align="center" width="100" /> |
||||
|
<el-table-column label="入库金额" prop="amount" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
|
||||
|
|
||||
|
<div class="title" |
||||
|
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
||||
|
<div>商品-批次</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;" |
||||
|
:row-style="{height: '40px'}"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column fixed label="操作" wid align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品列表序号" prop="xh" align="center" width="120" /> |
||||
|
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="库位" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" /> |
||||
|
<el-table-column label="生产日期" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-date-picker v-model="scope.row.manufactureDate" type="date" style="width:100%" |
||||
|
value-format="yyyy-MM-dd" placeholder="选择日期" @change="manufactureDateChange(scope.row,$event)" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" /> |
||||
|
<el-table-column label="数量" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.batchCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/receivingGoods.js' |
||||
|
import req2 from '@/api/storage/allocation.js' |
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
title: "【新增】", |
||||
|
listLoading: false, |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"sourceBillSid": "", |
||||
|
"sourceBillNo": "", |
||||
|
"createBySid": "", |
||||
|
"createByName": "", |
||||
|
"createTime": "", |
||||
|
"busTypeKey": "", |
||||
|
"busTypeValue": "", |
||||
|
"supplierSid": "", |
||||
|
"supplierName": "", |
||||
|
"deliveryDate": "", |
||||
|
"billState": "新建", |
||||
|
"remarks": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgSid": "", |
||||
|
"list": [], |
||||
|
"pcList": [] |
||||
|
}, |
||||
|
hideUploadBtn: false, |
||||
|
busTypeList: [{ |
||||
|
name: "业务类型1", |
||||
|
sid: "1" |
||||
|
}, |
||||
|
{ |
||||
|
name: "业务类型2", |
||||
|
sid: "2" |
||||
|
} |
||||
|
], |
||||
|
supplierList: [], |
||||
|
warehouseList: [], |
||||
|
warehouseRackList: [], |
||||
|
// commodity商品 |
||||
|
commodityKey: 1, |
||||
|
commodityLoading: false, |
||||
|
commodityQuery: { |
||||
|
current: 1, |
||||
|
size: 2, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '', |
||||
|
inOrg: "", |
||||
|
outOrg: "" |
||||
|
} |
||||
|
}, |
||||
|
commodityData: [], |
||||
|
isUpdata: false |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
computed: { |
||||
|
// 调拨数量 |
||||
|
totalQuantity() { |
||||
|
let quantity = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
quantity += Number(e.count) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.count = quantity |
||||
|
|
||||
|
return quantity |
||||
|
}, |
||||
|
// 调拨金额 |
||||
|
materialCost() { |
||||
|
let material = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
material += Number((Number(e.count) * Number(e.taxPrice))) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.amount = material.toFixed(2) |
||||
|
|
||||
|
return material.toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
|
||||
|
commodityInput(value) { |
||||
|
this.commodityQuery.params.name = value |
||||
|
this.commodityLoading = true |
||||
|
req.getGoods(this.commodityQuery).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.commodityLoading = false |
||||
|
this.commodityData = response.data.records |
||||
|
this.commodityQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.serviceLoading = false |
||||
|
this.commodityData = [] |
||||
|
this.commodityQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
commodityDelete(index) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1) |
||||
|
}, |
||||
|
commodityCurrentChange(value, row) { |
||||
|
row.inventorySid = value.sid |
||||
|
row.goodsSpuName = value.goodsSpuName |
||||
|
row.goodsSkuCode = value.goodsSkuCode |
||||
|
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec |
||||
|
row.unit = value.unit |
||||
|
row.warehouseName = value.warehouseName |
||||
|
row.warehouseSid = value.warehouseSid |
||||
|
row.warehouseArea = value.warehouseRackCode |
||||
|
row.warehouseAreasid = value.warehouseRackSid |
||||
|
row.taxPrice = value.taxPrice |
||||
|
row.stockCount = value.count |
||||
|
row.count = '' |
||||
|
row.amount = '' |
||||
|
document.body.click() |
||||
|
}, |
||||
|
|
||||
|
// 在头部标题上添加“新增”图标 |
||||
|
commodityHeader(h, { |
||||
|
column |
||||
|
}) { |
||||
|
return h( |
||||
|
'div', |
||||
|
[ |
||||
|
h('span', column.label), |
||||
|
h('i', { |
||||
|
class: 'add-btn-icon el-icon-plus', |
||||
|
style: 'color: red;font-size:20px', |
||||
|
on: { |
||||
|
click: this.commodityAdd // 点击执行函数 |
||||
|
} |
||||
|
}) |
||||
|
] |
||||
|
) |
||||
|
}, |
||||
|
commodityAdd() { |
||||
|
this.formobj.list.push({ |
||||
|
"sid": "", |
||||
|
"billSid": "", |
||||
|
"inventorySid": "", |
||||
|
"goodsSpuName": "", |
||||
|
"goodsSkuCode": "", |
||||
|
"goodsSkuOwnSpec": "", |
||||
|
"carModel": "", |
||||
|
"unit": "", |
||||
|
"warehouseSid": "", |
||||
|
"warehouseName": "", |
||||
|
"warehouseAreasid": "", |
||||
|
"warehouseArea": "", |
||||
|
"taxPrice": "", |
||||
|
"stockCount": "", |
||||
|
"inWarehouseSid": "", |
||||
|
"inWarehouseName": "", |
||||
|
"inWarehouseRackSid": "", |
||||
|
"inWarehouseRackCode": "", |
||||
|
"count": "", |
||||
|
"amount": "" |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
doGoodsDel(sid) { |
||||
|
console.log("doGoodsDel》》》》", sid) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.list.findIndex((item) => item.goodSpuSid === sid) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
indexMethod(index) { |
||||
|
return index + 1 |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
|
||||
|
// this.submitdisabled = true |
||||
|
// req.save(this.formobj) |
||||
|
// .then(resp => { |
||||
|
// if (resp.success) { |
||||
|
// this.submitdisabled = false |
||||
|
// this.$message({ |
||||
|
// showClose: true, |
||||
|
// type: 'success', |
||||
|
// message: resp.msg |
||||
|
// }) |
||||
|
// this.handleReturn('true') |
||||
|
// } else { |
||||
|
// this.submitdisabled = false |
||||
|
// // 根据resp.code进行异常情况处理 |
||||
|
// } |
||||
|
// }) |
||||
|
// .catch(() => { |
||||
|
// this.submitdisabled = false |
||||
|
// }) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"sourceBillSid": "", |
||||
|
"sourceBillNo": "", |
||||
|
"createBySid": "", |
||||
|
"createByName": "", |
||||
|
"createTime": "", |
||||
|
"busTypeKey": "", |
||||
|
"busTypeValue": "", |
||||
|
"supplierSid": "", |
||||
|
"supplierName": "", |
||||
|
"deliveryDate": "", |
||||
|
"billState": "", |
||||
|
"remarks": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgSid": "", |
||||
|
"list": [], |
||||
|
"pcList": [] |
||||
|
} |
||||
|
this.isUpdata = false |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
this.isUpdata = false |
||||
|
this.title = "【新增】" |
||||
|
console.log("showAdd", this.isUpdata); |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.isUpdata = true |
||||
|
this.title = "【编辑】" |
||||
|
console.log("showEdit", this.isUpdata); |
||||
|
var params = { |
||||
|
sid: row.sid |
||||
|
} |
||||
|
|
||||
|
req.init(params) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = {} |
||||
|
}) |
||||
|
}, |
||||
|
busTypeSelect(val) { |
||||
|
|
||||
|
}, |
||||
|
supplierNameSelect(val) { |
||||
|
|
||||
|
}, |
||||
|
getWarehouseList() { |
||||
|
req2.getWarehouses().then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseList = res.data |
||||
|
|
||||
|
console.log("aaaaaa", this.warehouseList); |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWarehouseAreaList(sid) { |
||||
|
var query = { |
||||
|
ckSid: sid |
||||
|
} |
||||
|
req2.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('>>>>>>>>>selectWarehouseName', choose) |
||||
|
row.warehouseName = choose[0].warehouseName |
||||
|
row.warehouseSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
selectWarehouseAreaCode(val) { |
||||
|
console.log("selectWarehouseAreaCode", val); |
||||
|
|
||||
|
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
||||
|
row.warehouseRackName = choose[0].areaCode |
||||
|
row.warehouseRackSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
batchAddAll() { |
||||
|
|
||||
|
for (var i = 0; i < this.formobj.list.length; i++) { |
||||
|
var item = this.formobj.list[i] |
||||
|
|
||||
|
var info = { |
||||
|
xh: i + 1, |
||||
|
goodsSkuSid: item.goodsSkuSid, |
||||
|
goodsSkuTitle: item.goodsSkuTitle, |
||||
|
goodsSkuCode: item.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: item.goodsSkuOwnSpec, |
||||
|
unit: item.unit, |
||||
|
warehouseSid: item.warehouseSid, |
||||
|
warehouseName: item.warehouseName, |
||||
|
warehouseRackSid: item.warehouseRackSid, |
||||
|
warehouseRackName: item.warehouseRackName, |
||||
|
shelfLife: item.shelfLife, |
||||
|
orderCount: item.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
doGoods(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.list.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
|
||||
|
for (var i = this.formobj.pcList.length - 1; i >= 0; i--) { |
||||
|
if (this.formobj.pcList[i].number === (index + 1)) { |
||||
|
this.formobj.pcList.splice(i, 1); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
doGoodsBatch(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品批次?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.pcList.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.pcList.splice(index, 1) |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
manufactureDateChange(row, val) { |
||||
|
|
||||
|
console.log("manufactureDateChange》》》》", val) |
||||
|
|
||||
|
row.manufactureDate = val |
||||
|
row.expirationDate = this.addDate(val, row.shelfLife) |
||||
|
|
||||
|
let reg = new RegExp('-', 'g') //g代表全部 |
||||
|
|
||||
|
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + row.expirationDate.replace(reg, '') |
||||
|
|
||||
|
|
||||
|
|
||||
|
this.$forceUpdate(); // 强制更新 |
||||
|
console.log("manufactureDateChange》》》》", row) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
addDate(date, days) { |
||||
|
var dates = new Date(date) |
||||
|
dates.setDate(dates.getDate() + days) |
||||
|
var year = dates.getFullYear() |
||||
|
var month = dates.getMonth() + 1 |
||||
|
var day = dates.getDate() |
||||
|
if (month < 9) { |
||||
|
month = "0" + month |
||||
|
} |
||||
|
if (day < 9) { |
||||
|
day = "0" + day |
||||
|
} |
||||
|
var time = year + '-' + month + '-' + day |
||||
|
return time |
||||
|
}, |
||||
|
|
||||
|
doAddBatch(row) { |
||||
|
const index = (this.formobj.list.findIndex((item) => item === row)) + 1 |
||||
|
console.log("doAddBatch》》》》", index) |
||||
|
console.log("doAddBatch》》》》", row) |
||||
|
|
||||
|
var info = { |
||||
|
xh: index, |
||||
|
goodsSkuSid: row.goodsSkuSid, |
||||
|
goodsSkuTitle: row.goodsSkuTitle, |
||||
|
goodsSkuCode: row.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: row.goodsSkuOwnSpec, |
||||
|
unit: row.unit, |
||||
|
warehouseSid: row.warehouseSid, |
||||
|
warehouseName: row.warehouseName, |
||||
|
warehouseRackSid: row.warehouseRackSid, |
||||
|
warehouseRackName: row.warehouseRackName, |
||||
|
shelfLife: row.shelfLife, |
||||
|
orderCount: row.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
console.log("aaaaaaaaaaa", info); |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
}, |
||||
|
commodityComputeYHAndXSJE(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if (Number(row.actualInCount) > Number(row.orderCount)) { |
||||
|
row.actualInCount = row.orderCount |
||||
|
|
||||
|
} |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE2(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if ((Number(row.rejectCount) + Number(row.actualInCount)) > Number(row.orderCount)) { |
||||
|
row.rejectCount = Number(row.orderCount) - Number(row.actualInCount) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE3(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2) |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE4(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2) |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
|
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,210 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>收货单</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div class="listconadd"> |
||||
|
|
||||
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
||||
|
<div class="title"> |
||||
|
<div>基础信息</div> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">制单人姓名</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">外部单号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">业务类型</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">供应商</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">到货日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.deliveryDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">单据状态</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billState }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
|
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><span class="addinputInfo">{{formobj.remarks}}</span></el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.list" border style="width: 100%;"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="warehouseName" align="center" width="180" /> |
||||
|
<el-table-column label="库位" prop="warehouseRackName" align="center" width="180" /> |
||||
|
<el-table-column label="预约数量" prop="orderCount" align="center" width="120" /> |
||||
|
<el-table-column label="实收数量" prop="actualInCount" align="center" width="120" /> |
||||
|
<el-table-column label="拒收数量" prop="rejectCount" align="center" width="120" /> |
||||
|
<el-table-column label="拒收原因" prop="rejectReason" align="center" width="180" /> |
||||
|
<el-table-column label="是否质检" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.isQuality" :disabled="true" size="small"> |
||||
|
<el-radio :label="0">需要</el-radio> |
||||
|
<el-radio :label="1">不需要</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="质检状态" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-radio-group v-model="scope.row.qualityState" :disabled="true" size="small"> |
||||
|
<el-radio :label="0">合格</el-radio> |
||||
|
<el-radio :label="1">不合格</el-radio> |
||||
|
</el-radio-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="载具说明" prop="packageRemark" align="center" width="180" /> |
||||
|
<el-table-column label="入库价" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="税额" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="含税单价" prop="taxPrice" align="center" width="100" /> |
||||
|
<el-table-column label="入库金额" prop="taxPrice" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
|
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品-批次</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column fixed label="商品列表序号" prop="xh" align="center" width="120" /> |
||||
|
<el-table-column fixed label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="库位" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" /> |
||||
|
<el-table-column label="生产日期" prop="manufactureDate" align="center" width="180" /> |
||||
|
<el-table-column label="有效期" prop="expirationDate" align="center" width="180" /> |
||||
|
<el-table-column label="数量" prop="batchCount" align="center" width="120" /> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/receivingGoods.js' |
||||
|
|
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
submitdisabled: false, |
||||
|
formobj: {}, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
indexMethod(index) { |
||||
|
return index + 1 |
||||
|
}, |
||||
|
|
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
|
||||
|
var params = { |
||||
|
sid: row.sid |
||||
|
} |
||||
|
req.init(params) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = {} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
||||
|
|
@ -0,0 +1,543 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>【新增】上架单</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div class="listconadd"> |
||||
|
|
||||
|
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="190px" class="formadd"> |
||||
|
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px"> |
||||
|
<div>基础信息</div> |
||||
|
</div> |
||||
|
<el-row class="first_row"> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">单据编号</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">{{formobj.billNo}}</span> |
||||
|
<!-- <el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%" clearable /> --> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">制单人姓名</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<!-- <span slot="label">{{formobj.createByName}}</span> --> |
||||
|
<el-input v-model="formobj.createByName" placeholder="" class="addinputw" style="width:100%" |
||||
|
clearable /> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">外部单号</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">{{formobj.sourceBillNo}}</span> |
||||
|
<!-- <el-form-item class="trightb_item"> |
||||
|
<el-select v-model="GiftBagGood.goodsSkuSid" filterable clearable placeholder="请选择" style="width:100%" |
||||
|
@change="orderTypeSelect"> |
||||
|
<el-option v-for="item in orderTypeList" :key="item.sid" :label="item.name" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> --> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">单据日期</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<!-- <span slot="label">{{formobj.createTime}}</span> --> |
||||
|
<el-date-picker v-model="formobj.createTime" type="date" style="width:100%" value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
|
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">单据状态</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">{{formobj.billState}}</span> |
||||
|
<!-- <el-input v-model="formobj.remarks" placeholder="" class="addinputw" |
||||
|
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="4" clearable /> --> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
<el-col :span="4" class="trightb"> |
||||
|
<el-form-item class="trightb_item"> |
||||
|
<span slot="label">备注</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
|
||||
|
<el-form-item class="trightb_item"> |
||||
|
<!-- <span slot="label">{{formobj.supplierName}}</span> --> |
||||
|
<el-input v-model="formobj.remarks" placeholder="" class="addinputw" |
||||
|
style="width: 100%; padding-bottom: 5px;" type="textarea" :rows="1" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
<div class="title" |
||||
|
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;"> |
||||
|
<div>商品列表</div> |
||||
|
</div> |
||||
|
<el-table v-loading="listLoading" :data="formobj.pcList" border style="width: 100%;" |
||||
|
:row-style="{height: '40px'}"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column fixed label="操作" wid align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="doGoodsBatch(scope.row)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" width="200" /> |
||||
|
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" /> |
||||
|
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" width="150" /> |
||||
|
<el-table-column label="单位" prop="unit" align="center" width="120" /> |
||||
|
<el-table-column label="仓库" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="库位" prop="unit" align="center" width="150" /> |
||||
|
<el-table-column label="批次号" prop="batchNumber" align="center" width="300" /> |
||||
|
<el-table-column label="上架数量" align="center" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.batchCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="载具编号" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.batchCount" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/receivingGoods.js' |
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
listLoading: false, |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"sourceBillSid": "", |
||||
|
"sourceBillNo": "", |
||||
|
"createBySid": "", |
||||
|
"createByName": "", |
||||
|
"createTime": "", |
||||
|
"busTypeKey": "", |
||||
|
"busTypeValue": "", |
||||
|
"supplierSid": "", |
||||
|
"supplierName": "", |
||||
|
"deliveryDate": "", |
||||
|
"billState": "新建", |
||||
|
"remarks": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgSid": "", |
||||
|
"list": [], |
||||
|
"pcList": [] |
||||
|
}, |
||||
|
hideUploadBtn: false, |
||||
|
busTypeList: [{ |
||||
|
name: "业务类型1", |
||||
|
sid: "1" |
||||
|
}, |
||||
|
{ |
||||
|
name: "业务类型2", |
||||
|
sid: "2" |
||||
|
} |
||||
|
], |
||||
|
supplierList: [], |
||||
|
warehouseList: [], |
||||
|
warehouseRackList: [] |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
computed: { |
||||
|
// 调拨数量 |
||||
|
totalQuantity() { |
||||
|
let quantity = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
quantity += Number(e.count) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.count = quantity |
||||
|
|
||||
|
return quantity |
||||
|
}, |
||||
|
// 调拨金额 |
||||
|
materialCost() { |
||||
|
let material = 0 |
||||
|
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length > 0) { |
||||
|
this.formobj.wmsInventoryAllocateBillDetailNewList.forEach((e) => { |
||||
|
material += Number((Number(e.count) * Number(e.taxPrice))) |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.amount = material.toFixed(2) |
||||
|
|
||||
|
return material.toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
doGoodsDel(sid) { |
||||
|
console.log("doGoodsDel》》》》", sid) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.list.findIndex((item) => item.goodSpuSid === sid) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
indexMethod(index) { |
||||
|
return index + 1 |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
|
||||
|
// this.submitdisabled = true |
||||
|
// req.save(this.formobj) |
||||
|
// .then(resp => { |
||||
|
// if (resp.success) { |
||||
|
// this.submitdisabled = false |
||||
|
// this.$message({ |
||||
|
// showClose: true, |
||||
|
// type: 'success', |
||||
|
// message: resp.msg |
||||
|
// }) |
||||
|
// this.handleReturn('true') |
||||
|
// } else { |
||||
|
// this.submitdisabled = false |
||||
|
// // 根据resp.code进行异常情况处理 |
||||
|
// } |
||||
|
// }) |
||||
|
// .catch(() => { |
||||
|
// this.submitdisabled = false |
||||
|
// }) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
"sid": "", |
||||
|
"billNo": "", |
||||
|
"sourceBillSid": "", |
||||
|
"sourceBillNo": "", |
||||
|
"createBySid": "", |
||||
|
"createByName": "", |
||||
|
"createTime": "", |
||||
|
"busTypeKey": "", |
||||
|
"busTypeValue": "", |
||||
|
"supplierSid": "", |
||||
|
"supplierName": "", |
||||
|
"deliveryDate": "", |
||||
|
"billState": "", |
||||
|
"remarks": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgSid": "", |
||||
|
"list": [], |
||||
|
"pcList": [] |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
|
||||
|
showAdd() { |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
|
||||
|
var params = { |
||||
|
sid: row.sid |
||||
|
} |
||||
|
|
||||
|
req.init(params) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = {} |
||||
|
}) |
||||
|
}, |
||||
|
busTypeSelect(val) { |
||||
|
|
||||
|
}, |
||||
|
supplierNameSelect(val) { |
||||
|
|
||||
|
}, |
||||
|
getWarehouseList() { |
||||
|
req2.getWarehouses().then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseList = res.data |
||||
|
|
||||
|
console.log("aaaaaa", this.warehouseList); |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getWarehouseAreaList(sid) { |
||||
|
var query = { |
||||
|
ckSid: sid |
||||
|
} |
||||
|
req2.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('>>>>>>>>>selectWarehouseName', choose) |
||||
|
row.warehouseName = choose[0].warehouseName |
||||
|
row.warehouseSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
selectWarehouseAreaCode(val) { |
||||
|
console.log("selectWarehouseAreaCode", val); |
||||
|
|
||||
|
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectWarehouseAreaCode', choose) |
||||
|
row.warehouseRackName = choose[0].areaCode |
||||
|
row.warehouseRackSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
batchAddAll() { |
||||
|
|
||||
|
for (var i = 0; i < this.formobj.list.length; i++) { |
||||
|
var item = this.formobj.list[i] |
||||
|
|
||||
|
var info = { |
||||
|
xh: i + 1, |
||||
|
goodsSkuSid: item.goodsSkuSid, |
||||
|
goodsSkuTitle: item.goodsSkuTitle, |
||||
|
goodsSkuCode: item.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: item.goodsSkuOwnSpec, |
||||
|
unit: item.unit, |
||||
|
warehouseSid: item.warehouseSid, |
||||
|
warehouseName: item.warehouseName, |
||||
|
warehouseRackSid: item.warehouseRackSid, |
||||
|
warehouseRackName: item.warehouseRackName, |
||||
|
shelfLife: item.shelfLife, |
||||
|
orderCount: item.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
doGoods(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.list.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
|
||||
|
for (var i = this.formobj.pcList.length - 1; i >= 0; i--) { |
||||
|
if (this.formobj.pcList[i].number === (index + 1)) { |
||||
|
this.formobj.pcList.splice(i, 1); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
doGoodsBatch(row) { |
||||
|
console.log("doGoodsDel》》》》", row) |
||||
|
|
||||
|
this.$confirm("是否确定删除此商品批次?", '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const index = this.formobj.pcList.findIndex((item) => item === row) |
||||
|
console.log("index》》》》", index) |
||||
|
this.formobj.pcList.splice(index, 1) |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
manufactureDateChange(row, val) { |
||||
|
|
||||
|
console.log("manufactureDateChange》》》》", val) |
||||
|
|
||||
|
row.manufactureDate = val |
||||
|
row.expirationDate = this.addDate(val, row.shelfLife) |
||||
|
|
||||
|
let reg = new RegExp('-', 'g') //g代表全部 |
||||
|
|
||||
|
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + row.expirationDate.replace(reg, '') |
||||
|
|
||||
|
|
||||
|
|
||||
|
this.$forceUpdate(); // 强制更新 |
||||
|
console.log("manufactureDateChange》》》》", row) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
addDate(date, days) { |
||||
|
var dates = new Date(date) |
||||
|
dates.setDate(dates.getDate() + days) |
||||
|
var year = dates.getFullYear() |
||||
|
var month = dates.getMonth() + 1 |
||||
|
var day = dates.getDate() |
||||
|
if (month < 9) { |
||||
|
month = "0" + month |
||||
|
} |
||||
|
if (day < 9) { |
||||
|
day = "0" + day |
||||
|
} |
||||
|
var time = year + '-' + month + '-' + day |
||||
|
return time |
||||
|
}, |
||||
|
|
||||
|
doAddBatch(row) { |
||||
|
const index = (this.formobj.list.findIndex((item) => item === row)) + 1 |
||||
|
console.log("doAddBatch》》》》", index) |
||||
|
console.log("doAddBatch》》》》", row) |
||||
|
|
||||
|
var info = { |
||||
|
xh: index, |
||||
|
goodsSkuSid: row.goodsSkuSid, |
||||
|
goodsSkuTitle: row.goodsSkuTitle, |
||||
|
goodsSkuCode: row.goodsSkuCode, |
||||
|
goodsSkuOwnSpec: row.goodsSkuOwnSpec, |
||||
|
unit: row.unit, |
||||
|
warehouseSid: row.warehouseSid, |
||||
|
warehouseName: row.warehouseName, |
||||
|
warehouseRackSid: row.warehouseRackSid, |
||||
|
warehouseRackName: row.warehouseRackName, |
||||
|
shelfLife: row.shelfLife, |
||||
|
orderCount: row.orderCount, |
||||
|
batchNumber: '', |
||||
|
manufactureDate: '', |
||||
|
batchCount: 0, |
||||
|
} |
||||
|
|
||||
|
console.log("aaaaaaaaaaa", info); |
||||
|
|
||||
|
this.formobj.pcList.push(info) |
||||
|
|
||||
|
}, |
||||
|
commodityComputeYHAndXSJE(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if (Number(row.actualInCount) > Number(row.orderCount)) { |
||||
|
row.actualInCount = row.orderCount |
||||
|
|
||||
|
} |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE2(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
if ((Number(row.rejectCount) + Number(row.actualInCount)) > Number(row.orderCount)) { |
||||
|
row.rejectCount = Number(row.orderCount) - Number(row.actualInCount) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE3(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2) |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
|
||||
|
commodityComputeYHAndXSJE4(row, val) { |
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
row.taxPrice = (Number(row.cost) * Number(row.taxAmount)).toFixed(2) |
||||
|
row.amount = (Number(row.actualInCount) * Number(row.taxPrice)).toFixed(2) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
||||
|
|
@ -0,0 +1,322 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="盘点列表" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
||||
|
{{ searchxianshitit }} |
||||
|
</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form :inline="true" class="tab-header"> |
||||
|
<el-form-item label="开始日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createDateStart" @change="selectTime1" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="结束日期"> |
||||
|
<el-date-picker v-model="queryParams.params.createDateEnd" @change="selectTime2" type="date" |
||||
|
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">盘点列表</div> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
<!-- Start 项目列表 --> |
||||
|
<div class=""> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
||||
|
@selection-change="selectionLineChangeHandle"> |
||||
|
<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 prop="billNo" label="单据编号" align="center" /> |
||||
|
<el-table-column prop="createDate" label="单据日期" align="center" /> |
||||
|
<el-table-column prop="createByName" label="制单人姓名" align="center" /> |
||||
|
<el-table-column prop="checkStateName" label="盘点状态" align="center" /> |
||||
|
<el-table-column prop="completeDate" label="完成时间" align="center" /> |
||||
|
<el-table-column prop="createOrgName" label="门店" align="center" /> |
||||
|
<el-table-column prop="profitCount" label="盘盈数量" align="center" /> |
||||
|
<el-table-column prop="profitAmount" label="盘盈金额" align="center" /> |
||||
|
<el-table-column prop="lossCount" label="盘亏数量" align="center" /> |
||||
|
<el-table-column prop="lossAmount" label="盈亏金额" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/stocktaking.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './stocktakingAdd.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'edit', |
||||
|
btnKey: 'toEdit', |
||||
|
btnLabel: '编辑' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
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) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
selectTime1() { |
||||
|
|
||||
|
}, |
||||
|
selectTime2() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
}, |
||||
|
toEdit(){ |
||||
|
if(this.selectionList.length!=1){ |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if(this.selectionList[0].checkState!=1){ |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "此记录已完成,不可重复编辑。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
toBuild() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req.exportExcel(this.queryParams.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '出入库明细_' + this.queryParams.params.createDateStart + '.xls' |
||||
|
const elink = document.createElement('a') |
||||
|
elink.download = fileName |
||||
|
elink.style.display = 'nonde' |
||||
|
elink.href = URL.createObjectURL(blob) |
||||
|
document.body.appendChild(elink) |
||||
|
elink.click() |
||||
|
URL.revokeObjectURL(elink.href) |
||||
|
document.body.removeChild(elink) |
||||
|
}).catch(() => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,412 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settle()">盘点</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding: 10px;"> |
||||
|
<div>商品列表</div> |
||||
|
<div v-if="formobj.billNo!=''">单号:{{formobj.billNo}}</div> |
||||
|
</div> |
||||
|
|
||||
|
<el-table :key="commodityKey" :data="formobj.wmsInventoryCheckbillDetailList" :index="index" border |
||||
|
style="width: 100%;"> |
||||
|
<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> |
||||
|
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" |
||||
|
layout="total, pager" :total="commodityQuery.total" /> |
||||
|
</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 prop="goodsSkuCode" label="商品编码" align="center" /> |
||||
|
<el-table-column prop="carModel" 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="taxPrice" label="单价" align="center" /> |
||||
|
<el-table-column prop="bookCount" label="账面数量" align="center" /> |
||||
|
<el-table-column label="实盘数量" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)" |
||||
|
v-model="scope.row.realCount" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="state" label="状态" align="center" width="100" /> |
||||
|
<el-table-column prop="profitandlossNumber" label="盈亏数" align="center" width="100" /> |
||||
|
<el-table-column prop="profitandlossAmount" label="盈亏金额" align="center" width="100" /> |
||||
|
</el-table> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<el-form-item><span>盘盈数量:{{ profitandNumber }} , 盘盈金额:{{ profitandPrice }} , 盘亏数量:{{ lossNumber }} , |
||||
|
盘库金额:{{ lossPrice }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="1"> |
||||
|
<el-form-item><span>备注</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="23"> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="请填写备注..." /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/stocktaking.js' |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
settleVisible: false, // |
||||
|
activeNames: '1', |
||||
|
index: 0, |
||||
|
|
||||
|
// commodity商品 |
||||
|
commodityKey: 1, |
||||
|
commodityLoading: false, |
||||
|
commodityQuery: { |
||||
|
current: 1, |
||||
|
size: 2, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '' |
||||
|
} |
||||
|
}, |
||||
|
commodityData: [], |
||||
|
formobj: { |
||||
|
"sid": "", |
||||
|
"remarks": "", |
||||
|
"billNo": "", |
||||
|
"createBySid": "", |
||||
|
"createDate": "", |
||||
|
"createUserSid": "", |
||||
|
"createByName": "", |
||||
|
"checkType": "", |
||||
|
"profitAmount": "", |
||||
|
"lossCount": "", |
||||
|
"lossAmount": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgSid": "", |
||||
|
"wmsInventoryCheckbillDetailList": [ |
||||
|
|
||||
|
] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
// 计算盘盈数量 |
||||
|
profitandNumber() { |
||||
|
let quantity = 0 |
||||
|
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) { |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
||||
|
if (Number(e.bookCount) < Number(e.realCount)) { |
||||
|
quantity += e.realCount - e.bookCount |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
this.formobj.profitCount = quantity |
||||
|
return quantity |
||||
|
}, |
||||
|
// 计算盘盈金额 |
||||
|
profitandPrice() { |
||||
|
let material = 0 |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
||||
|
if (Number(e.bookCount) < Number(e.realCount)) { |
||||
|
material += (e.realCount - e.bookCount) * e.taxPrice |
||||
|
} |
||||
|
}) |
||||
|
this.formobj.profitAmount = material.toFixed(2) |
||||
|
return material.toFixed(2) |
||||
|
}, |
||||
|
// 计算盘亏数量 |
||||
|
lossNumber() { |
||||
|
let quantity = 0 |
||||
|
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) { |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
||||
|
if (Number(e.bookCount) > Number(e.realCount)) { |
||||
|
quantity += e.realCount - e.bookCount |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
this.formobj.lossCount = quantity |
||||
|
|
||||
|
return quantity |
||||
|
}, |
||||
|
// 计算盘亏金额 |
||||
|
lossPrice() { |
||||
|
let material = 0 |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
||||
|
if (Number(e.bookCount) > Number(e.realCount)) { |
||||
|
material += (e.realCount - e.bookCount) * e.taxPrice |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
this.formobj.lossAmount = material.toFixed(2) |
||||
|
|
||||
|
return material.toFixed(2) |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】盘点记录' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【修改】盘点记录' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.init(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
|
||||
|
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
||||
|
this.commodityComputeYHAndXSJE(e, e.realCount) |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 在头部标题上添加“新增”图标 |
||||
|
commodityHeader(h, { |
||||
|
column |
||||
|
}) { |
||||
|
return h( |
||||
|
'div', |
||||
|
[ |
||||
|
h('span', column.label), |
||||
|
h('i', { |
||||
|
class: 'add-btn-icon el-icon-plus', |
||||
|
style: 'color: red;font-size:20px', |
||||
|
on: { |
||||
|
click: this.commodityAdd // 点击执行函数 |
||||
|
} |
||||
|
}) |
||||
|
] |
||||
|
) |
||||
|
}, |
||||
|
commodityAdd() { |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.push({ |
||||
|
"sid": "", |
||||
|
"state": "", |
||||
|
"billSid": "", |
||||
|
"inventorySid": "", |
||||
|
"warehouseSid": "", |
||||
|
"warehouseName": "", |
||||
|
"warehouseRackSid": "", |
||||
|
"warehouseRackCode": "", |
||||
|
"taxPrice": "", |
||||
|
"bookCount": "", |
||||
|
"realCount": "", |
||||
|
"profitandlossNumber": "", |
||||
|
"profitandlossAmount": "", |
||||
|
"picUrl": "" |
||||
|
}) |
||||
|
}, |
||||
|
commodityInput(value) { |
||||
|
this.commodityQuery.params.name = value |
||||
|
this.commodityLoading = true |
||||
|
req.getWarehousesGoods(this.commodityQuery).then((response) => { |
||||
|
if (response.success) { |
||||
|
this.commodityLoading = false |
||||
|
this.commodityData = response.data.records |
||||
|
this.commodityQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.commodityLoading = false |
||||
|
this.commodityData = [] |
||||
|
this.commodityQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
commodityDelete(index) { |
||||
|
this.formobj.wmsInventoryCheckbillDetailList.splice(index, 1) |
||||
|
}, |
||||
|
commodityCurrentChange(value, row) { |
||||
|
row.sid = value.sid |
||||
|
row.goodsName = value.goodsSpuName |
||||
|
row.goodsSkuCode = value.goodsSkuCode |
||||
|
row.goodsSkuOwnSpec = value.goodsSkuOwnSpec |
||||
|
row.unit = value.unit |
||||
|
row.warehouseName = value.warehouseName |
||||
|
row.warehouseSid = value.warehouseSid |
||||
|
row.warehouseRackCode = value.warehouseRackCode |
||||
|
row.bookCount = value.count |
||||
|
row.taxPrice = value.salesPrice |
||||
|
row.realCount = "" |
||||
|
row.profitandlossNumber = "" |
||||
|
row.profitandlossAmount = "" |
||||
|
document.body.click() |
||||
|
}, |
||||
|
// 计算状态 盈亏数量 盈亏金额 |
||||
|
commodityComputeYHAndXSJE(row, val) { |
||||
|
|
||||
|
console.log("aaa", row); |
||||
|
console.log("aaa", val); |
||||
|
|
||||
|
// 正常 |
||||
|
if (Number(row.bookCount) == Number(val)) { |
||||
|
row.state = "正常" |
||||
|
row.profitandlossNumber = "0" |
||||
|
row.profitandlossAmount = "0.00" |
||||
|
} |
||||
|
|
||||
|
// 盘盈 |
||||
|
if (Number(row.bookCount) < Number(val)) { |
||||
|
row.state = "盘盈" |
||||
|
row.profitandlossNumber = val - row.bookCount |
||||
|
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2) |
||||
|
} |
||||
|
|
||||
|
// 盘亏 |
||||
|
if (Number(row.bookCount) > Number(val)) { |
||||
|
row.state = "盘亏" |
||||
|
row.profitandlossNumber = val - row.bookCount |
||||
|
row.profitandlossAmount = ((val - row.bookCount) * row.taxPrice).toFixed(2) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.save(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '保存成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
settle() { |
||||
|
|
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.inven(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '操作成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
confirm() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.settlement(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '结算成功' |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
"sid": "", |
||||
|
"remarks": "", |
||||
|
"createBySid": "", |
||||
|
"createDate": "", |
||||
|
"createUserSid": "", |
||||
|
"createByName": "", |
||||
|
"checkType": "", |
||||
|
"checkState": "", |
||||
|
"profitCount": "", |
||||
|
"profitAmount": "", |
||||
|
"lossCount": "", |
||||
|
"lossAmount": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgName": "", |
||||
|
"createOrgSid": "", |
||||
|
"wmsInventoryCheckbillDetailList": [] |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.settleVisible = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
|
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue