完善验货入库
This commit is contained in:
43
src/api/inStorage/inspectionGoods.js
Normal file
43
src/api/inStorage/inspectionGoods.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 查询分页列表
|
||||
listPage: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/purchaseinventorybill/listPage',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询商品
|
||||
getGoodsSelectList: function(params) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/basegoodssku/getSelectList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 保存验货入库
|
||||
saveInspection: function(data) {
|
||||
return request({
|
||||
url: '/wms/apiadmin/purchaseinventorybill/inspectionWarehousing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -204,6 +204,15 @@ export const constantRoutes = [
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/inspectionGoods/inspectionGoods',
|
||||
component: () => import('@/views/inStorage/inspectionGoods/inspectionGoods'),
|
||||
name: 'InspectionGoods',
|
||||
meta: {
|
||||
title: '验货入库',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/upShelf/index',
|
||||
component: () => import('@/views/inStorage/upShelf/index'),
|
||||
|
||||
559
src/views/inStorage/inspectionGoods/inspectionGoods.vue
Normal file
559
src/views/inStorage/inspectionGoods/inspectionGoods.vue
Normal file
@@ -0,0 +1,559 @@
|
||||
<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.storageTimeStart" 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.storageTimeEnd" 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.warehouseRackSid" placeholder="请选择库位" style="width: 200px;">
|
||||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品">
|
||||
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;">
|
||||
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :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>
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick">
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="billStateValue" label="状态" align="center" />
|
||||
<el-table-column prop="billNo" label="入库单号" align="center" />
|
||||
<el-table-column prop="total" label="商品总额" align="center" />
|
||||
<el-table-column prop="totalWeight" label="商品总重量(kg)" align="center" />
|
||||
<el-table-column prop="totalVolume" label="商品总体积(m³)" align="center" />
|
||||
<el-table-column prop="totalQuantity" label="商品总数" align="center" />
|
||||
<el-table-column prop="supplierName" label="供应商" align="center" />
|
||||
<el-table-column prop="carrier" label="承运商" align="center" />
|
||||
<el-table-column prop="waybillNumber" label="运单号" align="center" />
|
||||
<el-table-column prop="shipper" label="货主" align="center" />
|
||||
<el-table-column prop="storageTime" label="入库时间" align="center" />
|
||||
<el-table-column prop="operatorName" label="操作员" align="center" />
|
||||
<el-table-column prop="operatorTime" 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 class="">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane name="first" label="入库明细">
|
||||
<el-table :data="goodsDetailList" border style="width: 100%">
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
||||
<el-table-column prop="goodsBarCode" label="商品条码" align="center" />
|
||||
<el-table-column prop="specValue" label="规格值" align="center" />
|
||||
<el-table-column prop="boxBarCode" label="箱条码" align="center" />
|
||||
<el-table-column prop="boxSpc" label="箱规格" align="center" />
|
||||
<el-table-column prop="unit" label="单位" align="center" />
|
||||
<el-table-column prop="price" label="成本单价" align="center" />
|
||||
<el-table-column prop="totalPrice" label="总价" align="center" />
|
||||
<el-table-column prop="count" label="数量" align="center" />
|
||||
<el-table-column prop="auxiliaryUnit" label="辅助单位" align="center" />
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" />
|
||||
<el-table-column prop="batchNumber" label="生产批次号" align="center" />
|
||||
<el-table-column prop="warehouseRackName" label="入库库位" align="center" />
|
||||
<el-table-column prop="remarks" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="two" label="单据备注">
|
||||
<el-form ref="dataForm" class="formaddcopy02" :model="billRemarks">
|
||||
<el-row class="first_row">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">买家留言</div>
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.buyerMessage }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">备注</div>
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.reamrks }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">系统备注</div>
|
||||
<el-form-item> <span class="addinputInfo">{{ billRemarks.systemRemarks }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="three" label="操作日志">
|
||||
<el-table :data="operationList" border style="width: 100%">
|
||||
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column prop="createTime" label="操作时间" width="250" align="center" />
|
||||
<el-table-column prop="userName" label="操作账号" width="180" align="center" />
|
||||
<el-table-column prop="content" label="操作内容" align="center" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</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" />
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inStorage/inspectionGoods.js'
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||
import req3 from '@/api/goods/goods.js'
|
||||
import req4 from '@/api/inStorage/deliveryNotice.js'
|
||||
import req5 from '@/api/inStorage/receivingGoods.js'
|
||||
import {
|
||||
typeValues,
|
||||
} from '@/api/Common/dictcommons'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './inspectionGoodsAdd.vue'
|
||||
import divInfo from './inspectionGoodsInfo.vue'
|
||||
export default {
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: "first",
|
||||
activeIndex: "first",
|
||||
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: 'plus',
|
||||
// btnKey: 'toEdit',
|
||||
// btnLabel: '编辑'
|
||||
// },
|
||||
// {
|
||||
// type: 'danger',
|
||||
// size: 'small',
|
||||
// icon: 'del',
|
||||
// btnKey: 'doDel',
|
||||
// btnLabel: '删除'
|
||||
// },
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"billNo": "", //单据编号
|
||||
"billType": "1", //单据类型 0采购 1验货
|
||||
"externalNo": "", //外部单号
|
||||
"sourceBillNo": "", //来源单号(入库预约)
|
||||
"warehouseRackSid": "", //库位sid
|
||||
"storageTimeStart": "", //入库开始时间
|
||||
"storageTimeEnd": "", //入库结束时间
|
||||
"carrier": "", //承运商
|
||||
"waybillNumber": "", //运单号
|
||||
"goodsSkuSid": "", //商品sid
|
||||
"shipper": "", //货主
|
||||
"menuUrl": "", //菜单路由
|
||||
"orgPath": "", //组织全路径sid
|
||||
"userSid": "" //用户sid
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
selectionList: [],
|
||||
billStateList: [{
|
||||
name: "新建",
|
||||
sid: "0"
|
||||
},
|
||||
{
|
||||
name: "已完成",
|
||||
sid: "1"
|
||||
}
|
||||
],
|
||||
warehouseRackList: [],
|
||||
goodsList: [],
|
||||
goodsDetailList: [],
|
||||
billRemarks: {},
|
||||
operationList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
|
||||
typeValues({
|
||||
type: 'receiveState'
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.billStateList = res.data
|
||||
}
|
||||
})
|
||||
|
||||
req2.warehouserackListAll({
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseRackList = res.data
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
req3.getGoodsListAllByOrg({
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsList = res.data
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
handleClick(table) {
|
||||
console.log("handleClick", table.name);
|
||||
if (this.rowItemSid == '') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
showClose: true,
|
||||
message: '暂无数据'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.activeIndex = table.name
|
||||
// 入库明细
|
||||
if (table.name == 'first') {
|
||||
this.goodsDetailList = []
|
||||
req5.selectByBillSid(this.rowItemSid).then((resp) => {
|
||||
if (resp.success && resp.data != null) {
|
||||
this.goodsDetailList = resp.data.list
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
// 单据备注
|
||||
if (table.name == 'two') {
|
||||
this.billRemarks = {}
|
||||
// req.orderRackDistributionDetail({
|
||||
// sid: this.rowItemSid
|
||||
// }).then((resp) => {
|
||||
|
||||
// if (resp.success && resp.data != null) {
|
||||
// this.billRemarks = resp.data
|
||||
// }
|
||||
// }).catch(() => {})
|
||||
}
|
||||
// 操作记录
|
||||
if (table.name == 'three') {
|
||||
this.operationList = []
|
||||
req4.operationrecordDetails({
|
||||
sid: this.rowItemSid
|
||||
}).then((resp) => {
|
||||
if (resp.success && resp.data != null) {
|
||||
this.operationList = resp.data
|
||||
}
|
||||
}).catch(() => {})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
rowItemClick(row) {
|
||||
console.log("row", row);
|
||||
|
||||
if (row.sid == '') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
showClose: true,
|
||||
message: '暂无数据'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.rowItemSid = row.sid
|
||||
var table = {
|
||||
name: this.activeIndex
|
||||
}
|
||||
this.handleClick(table)
|
||||
},
|
||||
|
||||
|
||||
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 'toEdit':
|
||||
this.toEdit()
|
||||
break
|
||||
case 'doDel':
|
||||
this.doDel()
|
||||
break
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
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: '请至少选择一条记录进行删除操作'
|
||||
})
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
|
||||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
|
||||
this.queryParams.params.menuUrl = this.$route.path
|
||||
req.listPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
this.rowItemSid = ''
|
||||
this.goodsDetailList = []
|
||||
this.billRemarks = {}
|
||||
this.operationList = []
|
||||
this.rowItemClick(this.dataList[0])
|
||||
|
||||
} 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: {
|
||||
"billNo": "", //单据编号
|
||||
"billType": "1", //单据类型 0采购 1验货
|
||||
"externalNo": "", //外部单号
|
||||
"sourceBillNo": "", //来源单号(入库预约)
|
||||
"warehouseRackSid": "", //库位sid
|
||||
"storageTimeStart": "", //入库开始时间
|
||||
"storageTimeEnd": "", //入库结束时间
|
||||
"carrier": "", //承运商
|
||||
"waybillNumber": "", //运单号
|
||||
"goodsSkuSid": "", //商品sid
|
||||
"shipper": "", //货主
|
||||
"menuUrl": "", //菜单路由
|
||||
"orgPath": "", //组织全路径sid
|
||||
"userSid": "" //用户sid
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
|
||||
},
|
||||
|
||||
toEdit() {
|
||||
if (this.selectionList.length != 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)
|
||||
},
|
||||
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
|
||||
.must {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.first_row {
|
||||
border-top: 1px solid #E0E3EB;
|
||||
}
|
||||
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
421
src/views/inStorage/inspectionGoods/inspectionGoodsAdd.vue
Normal file
421
src/views/inStorage/inspectionGoods/inspectionGoodsAdd.vue
Normal file
@@ -0,0 +1,421 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-show="viewState == 1">
|
||||
<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="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
|
||||
<el-row class="first_row">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">单据编号</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.billNo }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">制单人</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">制单日期</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorTime }}</span></el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="must">*</span> 入库时间</div>
|
||||
<el-form-item prop="storageTime"> <el-date-picker v-model="formobj.storageTime" type="date"
|
||||
class="addinputw addinputInfo" value-format="yyyy-MM-dd" placeholder="选择日期">
|
||||
</el-date-picker></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty"><span class="must">*</span> 供应商</div>
|
||||
<el-form-item prop="supplierName"> <el-select v-model="formobj.supplierName" filterable clearable
|
||||
class="addinputw addinputInfo" @change="supplierNameSelect">
|
||||
<el-option v-for="item in supplierList" :key="item.sid" :label="item.supplierName" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">货主</div>
|
||||
<el-form-item><el-input v-model="formobj.shipper" placeholder="" class="addinputw addinputInfo"
|
||||
clearable /></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"
|
||||
clearable /></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="title titleOne">
|
||||
<div>商品列表</div>
|
||||
<div>
|
||||
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">选择商品</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border>
|
||||
<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="delGoods(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="goodsSpuName" align="center" width="200" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" width="150" />
|
||||
<el-table-column label="规格" prop="ownSpec" align="center" width="150" />
|
||||
<el-table-column label="单位" prop="goodsUnitName" align="center" width="120" />
|
||||
<el-table-column label="成本单价" prop="costPrice" align="center" width="120" />
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" width="120" />
|
||||
<el-table-column label="商品数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.count" clearable placeholder=""
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
|
||||
@input="commodityComputeYHAndXSJE(scope.row,$event)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.warehouseRackName" clearable placeholder="请选择"
|
||||
@change="selectWarehouseAreaCode(scope.row,$event)">
|
||||
<el-option v-for="(item,i) in warehouseRackList" :key="i" :label="item.rackCode" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="生产日期" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.batch" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"
|
||||
@change="manufactureDateChange(scope.row,$event)">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="生产日期" prop="batch" align="center" width="150" />
|
||||
<el-table-column label="批次号" prop="batch" align="center" width="150" />
|
||||
<el-table-column label="明细备注" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="focusAssumptionInput" v-model="scope.row.remarks" clearable placeholder="" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择商品 -->
|
||||
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inStorage/inspectionGoods.js'
|
||||
import req2 from '@/api/baseinfo/goodsShelves/goodsShelves.js'
|
||||
import {
|
||||
getCurrentDate
|
||||
} from '@/utils/index.js'
|
||||
import chooseproducts from './relation/chooseproducts'
|
||||
import {
|
||||
choiceSupplierInfo,
|
||||
} from '@/api/Common/dictcommons'
|
||||
export default {
|
||||
components: {
|
||||
chooseproducts,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "【新增】",
|
||||
viewState: 1,
|
||||
listLoading: false,
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
"sid": "",
|
||||
"userSid": window.sessionStorage.getItem('userSid'),
|
||||
"operatorName": window.sessionStorage.getItem('name'),
|
||||
"billNo": '',
|
||||
"operatorTime": getCurrentDate(),
|
||||
"storageTime": "", //入库时间
|
||||
"supplierName": "",
|
||||
"supplierSid": "",
|
||||
"shipper": "",
|
||||
"useOrgSid": window.sessionStorage.getItem('defaultDeptSid'), //使用组织sid
|
||||
"createOrgSid": window.sessionStorage.getItem('orgSid'), //创建组织sid
|
||||
"remarks": "", //备注
|
||||
"list": []
|
||||
|
||||
},
|
||||
hideUploadBtn: false,
|
||||
supplierList: [],
|
||||
warehouseRackList: [],
|
||||
rules: {
|
||||
storageTime: [{
|
||||
required: true,
|
||||
message: '入库时间不能为空',
|
||||
trigger: 'change'
|
||||
}],
|
||||
supplierName: [{
|
||||
required: true,
|
||||
message: '请选择供应商',
|
||||
trigger: 'change'
|
||||
}],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
|
||||
methods: {
|
||||
|
||||
init() {
|
||||
var query = {
|
||||
orgPath: window.sessionStorage.getItem('orgSidPath')
|
||||
}
|
||||
req2.warehouserackListAll(query).then((res) => {
|
||||
if (res.success) {
|
||||
this.warehouseRackList = res.data
|
||||
console.log("aaaaaa", this.warehouseRackList);
|
||||
}
|
||||
})
|
||||
|
||||
// 供应商
|
||||
choiceSupplierInfo({
|
||||
createOrgSid: window.sessionStorage.getItem('orgSidPath')
|
||||
}).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.supplierList = resp.data
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
this.$refs['form_obj'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.formobj.list.length == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '请添加商品'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
for (var i = 0; i < this.formobj.list.length; i++) {
|
||||
var item = this.formobj.list[i]
|
||||
if (Number(item.count) == 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '商品数量不能为空或0'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (item.warehouseRackName == '' || item.warehouseRackSid == '') {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: '入库库位不能为空'
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.submitdisabled = true
|
||||
req.saveInspection(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": "",
|
||||
"userSid": window.sessionStorage.getItem('userSid'),
|
||||
"operatorName": window.sessionStorage.getItem('name'),
|
||||
"billNo": '',
|
||||
"operatorTime": getCurrentDate(),
|
||||
"storageTime": "", //入库时间
|
||||
"supplierName": "",
|
||||
"supplierSid": "",
|
||||
"shipper": "",
|
||||
"useOrgSid": window.sessionStorage.getItem('defaultDeptSid'), //使用组织sid
|
||||
"createOrgSid": window.sessionStorage.getItem('orgSid'), //创建组织sid
|
||||
"remarks": "", //备注
|
||||
"list": []
|
||||
}
|
||||
this.submitdisabled = false
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
this.title = "【新增】"
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form_obj'].clearValidate()
|
||||
})
|
||||
this.init()
|
||||
this.title = "【修改】"
|
||||
var params = {
|
||||
sid: row.sid
|
||||
}
|
||||
req.init(params)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
},
|
||||
supplierNameSelect(val) {
|
||||
console.log("supplierNameSelect", val);
|
||||
const choose = this.supplierList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>supplierNameSelect', choose)
|
||||
this.formobj.supplierName = choose[0].supplierName
|
||||
this.formobj.supplierSid = choose[0].sid
|
||||
},
|
||||
selectWarehouseAreaCode(row, val) {
|
||||
console.log("selectWarehouseAreaCode", val);
|
||||
const choose = this.warehouseRackList.filter((item) => item.sid == val)
|
||||
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
|
||||
row.warehouseRackName = choose[0].rackCode
|
||||
row.warehouseRackSid = choose[0].sid
|
||||
},
|
||||
backData(value) {
|
||||
this.viewState = 1
|
||||
|
||||
this.formobj.list = value
|
||||
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
seleGoods() {
|
||||
this.viewState = 2
|
||||
const aa = []
|
||||
this.$refs['divSp'].showData(aa, this.formobj.createOrgSid)
|
||||
},
|
||||
delGoods(index) {
|
||||
this.formobj.list.splice(index, 1)
|
||||
},
|
||||
commodityComputeYHAndXSJE(row, val) {
|
||||
row.totalPrice = (Number(row.costPrice) * Number(row.count)).toFixed(2)
|
||||
|
||||
},
|
||||
manufactureDateChange(row, val) {
|
||||
|
||||
console.log("manufactureDateChange》》》》", val)
|
||||
|
||||
row.manufactureDate = val
|
||||
var expirationDate = this.addDate(val, row.shelfLife)
|
||||
|
||||
let reg = new RegExp('-', 'g') //g代表全部
|
||||
|
||||
row.batchNumber = this.formobj.deliveryDate.replace(reg, '') + " - " + 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
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
|
||||
.must {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.first_row {
|
||||
border-top: 1px solid #E0E3EB;
|
||||
}
|
||||
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
152
src/views/inStorage/inspectionGoods/inspectionGoodsInfo.vue
Normal file
152
src/views/inStorage/inspectionGoods/inspectionGoodsInfo.vue
Normal file
@@ -0,0 +1,152 @@
|
||||
<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">
|
||||
<el-row class="first_row">
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">单据编号</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.billNo }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">制单人</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">制单日期</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.operatorTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">入库时间</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.storageTime }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">供应商</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.supplierName }}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="span-sty">货主</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.shipper }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div class="span-sty">备注</div>
|
||||
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="title">
|
||||
<div>商品列表</div>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="listLoading" :data="formobj.list" border>
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="商品名称" prop="goodsSkuTitle" align="center" />
|
||||
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
|
||||
<el-table-column label="规格" prop="specValue" align="center" />
|
||||
<el-table-column label="单位" prop="unit" align="center" />
|
||||
<el-table-column label="成本单价" prop="price" align="center" />
|
||||
<el-table-column label="总价" prop="totalPrice" align="center" />
|
||||
<el-table-column label="商品数量" prop="count" align="center" />
|
||||
<el-table-column label="库位" prop="warehouseRackName" align="center" />
|
||||
<el-table-column label="生产日期" prop="batchNumber" align="center" />
|
||||
<el-table-column label="批次号" prop="batchNumber" align="center" />
|
||||
<el-table-column label="明细备注" prop="remarks" align="center" />
|
||||
</el-table>
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/inStorage/receivingGoods.js'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
formobj: {},
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.formobj = {
|
||||
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
showAdd() {},
|
||||
showEdit(row) {
|
||||
req.selectByBillSid(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = {}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-form-item__error {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
|
||||
.must {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.first_row {
|
||||
border-top: 1px solid #E0E3EB;
|
||||
}
|
||||
|
||||
.titleOne {
|
||||
padding: 7px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
164
src/views/inStorage/inspectionGoods/relation/chooseproducts.vue
Normal file
164
src/views/inStorage/inspectionGoods/relation/chooseproducts.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<div class="tab-header webtop">
|
||||
<div>选择商品</div>
|
||||
<div>
|
||||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<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="120px" class="tab-header">
|
||||
<el-form-item label="商品名称" class="searchlist">
|
||||
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品编码" class="searchlist">
|
||||
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<div class="">
|
||||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column width="50px" type="selection" align="center" />
|
||||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
|
||||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
|
||||
<el-table-column prop="ownSpec" label="规格" align="center" />
|
||||
<el-table-column prop="goodsUnitName" label="单位" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/pagination'
|
||||
import req from '@/api/inStorage/inspectionGoods.js'
|
||||
export default {
|
||||
name: 'SelectVehicle',
|
||||
components: {
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '隐藏查询条件',
|
||||
tableKey: 0,
|
||||
sids: [],
|
||||
list: [],
|
||||
number: '',
|
||||
listLoading: false,
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 5,
|
||||
params: {
|
||||
createOrgSid: '',
|
||||
goodsSpuName: '',
|
||||
goodsSkuCode: '',
|
||||
},
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
// 查询列表信息
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
req.getGoodsSelectList(this.listQuery).then((response) => {
|
||||
this.listLoading = false
|
||||
if (response.success) {
|
||||
this.listQuery.total = response.data.total
|
||||
this.list = response.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询按钮
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置按钮
|
||||
handleReset() {
|
||||
this.listQuery.current = 1
|
||||
this.listQuery.size = 5
|
||||
this.listQuery.total = 0
|
||||
this.listQuery.params.goodsSpuName = ''
|
||||
this.listQuery.params.goodsSkuCode = ''
|
||||
this.getList()
|
||||
},
|
||||
handleSelectionChange(row) {
|
||||
this.sids = row
|
||||
},
|
||||
showData(value, createOrgSid) {
|
||||
// const aa = []
|
||||
// if (value.length > 0) {
|
||||
// for (var i = 0; i < value.length; i++) {
|
||||
// aa.push(value[i].saleVehSid)
|
||||
// }
|
||||
// this.listQuery.params.saleVehSids = aa
|
||||
// } else {
|
||||
// this.listQuery.params.saleVehSids = []
|
||||
// }``
|
||||
this.listQuery.params.createOrgSid = createOrgSid
|
||||
this.listQuery.current = 1
|
||||
this.listQuery.size = 5
|
||||
this.listQuery.total = 0
|
||||
this.getList()
|
||||
},
|
||||
// 添加修改返回
|
||||
AddUpdateReturn() {
|
||||
if (this.sids.length > 0) {
|
||||
this.$emit('backData', this.sids)
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
message: '请至少选择一条记录进行操作',
|
||||
type: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
// 返回
|
||||
handleReturn() {
|
||||
this.$emit('doback')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -387,19 +387,20 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"inStotageBillNo": "",
|
||||
"sourceBillNo": "",
|
||||
"preBillNo": "",
|
||||
"warehouseRackName": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"carrierName": "",
|
||||
"waybillNumber": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
"billNo": "", //单据编号
|
||||
"billType": "0", //单据类型 0采购 1验货
|
||||
"externalNo": "", //外部单号
|
||||
"sourceBillNo": "", //来源单号(入库预约)
|
||||
"warehouseRackSid": "", //库位sid
|
||||
"storageTimeStart": "", //入库开始时间
|
||||
"storageTimeEnd": "", //入库结束时间
|
||||
"carrier": "", //承运商
|
||||
"waybillNumber": "", //运单号
|
||||
"goodsSkuSid": "", //商品sid
|
||||
"shipper": "", //货主
|
||||
"menuUrl": "", //菜单路由
|
||||
"orgPath": "", //组织全路径sid
|
||||
"userSid": "" //用户sid
|
||||
}
|
||||
},
|
||||
sids: [],
|
||||
@@ -593,19 +594,20 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
"inStotageBillNo": "",
|
||||
"sourceBillNo": "",
|
||||
"preBillNo": "",
|
||||
"warehouseRackName": "",
|
||||
"inStotageStartTime": "",
|
||||
"inStotageEndTime": "",
|
||||
"carrierName": "",
|
||||
"waybillNumber": "",
|
||||
"goodsSkuSid": "",
|
||||
"supplierSid": "",
|
||||
"menuUrl": "",
|
||||
"orgPath": "",
|
||||
"userSid": ""
|
||||
"billNo": "", //单据编号
|
||||
"billType": "0", //单据类型 0采购 1验货
|
||||
"externalNo": "", //外部单号
|
||||
"sourceBillNo": "", //来源单号(入库预约)
|
||||
"warehouseRackSid": "", //库位sid
|
||||
"storageTimeStart": "", //入库开始时间
|
||||
"storageTimeEnd": "", //入库结束时间
|
||||
"carrier": "", //承运商
|
||||
"waybillNumber": "", //运单号
|
||||
"goodsSkuSid": "", //商品sid
|
||||
"shipper": "", //货主
|
||||
"menuUrl": "", //菜单路由
|
||||
"orgPath": "", //组织全路径sid
|
||||
"userSid": "" //用户sid
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-table-column prop="onlineOrderNumber" width="120" label="线上订单号" align="center" />
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" />
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" />
|
||||
<el-table-column prop="inventoryStatus" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" />
|
||||
<el-table-column label="承运商" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -112,60 +112,6 @@
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div> -->
|
||||
|
||||
<!-- 列表底部信息 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
|
||||
@selection-change="selectionLineChangeHandle" @row-click="rowItemClick">
|
||||
<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="externalState" width="100" label="外部状态" align="center" />
|
||||
<el-table-column prop="billNo" width="150" label="订单号" align="center" />
|
||||
<el-table-column prop="externalOrderNumber" width="150" label="外部单号" align="center" />
|
||||
<el-table-column prop="onlineOrderNumber" width="150" label="线上订单号" align="center" />
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" />
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" />
|
||||
<el-table-column prop="inventoryStatus" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" />
|
||||
<el-table-column label="承运商" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.carrierValue" placeholder="请选择" @change="selectCarrier(scope.row,$event)">
|
||||
<el-option v-for="(item,i) in carrierList" :key="i" :label="item.dictValue" :value="item.dictKey">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运单号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-input ref="" v-model="scope.row.waybillNumber" clearable placeholder=""
|
||||
@change="itemWaybillNumber(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryMethod" width="100" label="配送方式" align="center" />
|
||||
<el-table-column prop="buyer" width="100" label="买家" align="center" />
|
||||
<el-table-column prop="consignee" width="100" label="收货人" align="center" />
|
||||
<el-table-column prop="address" width="250" label="详细地址" align="center" />
|
||||
<el-table-column prop="mobile" width="120" label="手机号" align="center" />
|
||||
<el-table-column prop="actualPayment" width="80" label="实付" align="center" />
|
||||
<el-table-column prop="discount" width="80" label="优惠" align="center" />
|
||||
<el-table-column prop="freight" min-width="80" label="运费" align="center" />
|
||||
<el-table-column prop="weight" width="80" label="重量" align="center" />
|
||||
<el-table-column prop="weightEstimation" width="80" label="估重" align="center" />
|
||||
<el-table-column prop="volume" width="80" label="体积" align="center" />
|
||||
<el-table-column prop="quantity" width="100" label="商品总数" align="center" />
|
||||
<el-table-column prop="orderTime" width="160" label="下单时间" align="center" />
|
||||
<el-table-column prop="deliveryTime" width="160" label="到货时间" align="center" />
|
||||
<el-table-column prop="latestDeliveryTime" width="160" 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 class="">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
@@ -710,7 +656,7 @@
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
this.rowItemClick(this.dataList[0])
|
||||
this.rowItemSid=''
|
||||
this.from = {
|
||||
first: [],
|
||||
two: [],
|
||||
@@ -721,6 +667,8 @@
|
||||
five: {},
|
||||
six: []
|
||||
}
|
||||
this.rowItemClick(this.dataList[0])
|
||||
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
@@ -989,6 +937,7 @@
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-table-column prop="onlineOrderNumber" width="150" label="线上订单号" align="center" />
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" />
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" />
|
||||
<el-table-column prop="inventoryStatus" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" />
|
||||
<el-table-column label="承运商" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -669,7 +669,7 @@
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
this.rowItemClick(this.dataList[0])
|
||||
this.rowItemSid=''
|
||||
this.from = {
|
||||
first: [],
|
||||
two: [],
|
||||
@@ -680,6 +680,8 @@
|
||||
five: {},
|
||||
six: []
|
||||
}
|
||||
this.rowItemClick(this.dataList[0])
|
||||
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-table-column prop="onlineOrderNumber" width="150" label="线上订单号" align="center" />
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" />
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" />
|
||||
<el-table-column prop="inventoryStatus" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" />
|
||||
<el-table-column label="承运商" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -654,7 +654,7 @@
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
this.rowItemClick(this.dataList[0])
|
||||
this.rowItemSid=''
|
||||
this.from = {
|
||||
first: [],
|
||||
two: [],
|
||||
@@ -665,6 +665,8 @@
|
||||
five: {},
|
||||
six: []
|
||||
}
|
||||
this.rowItemClick(this.dataList[0])
|
||||
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-table-column prop="onlineOrderNumber" width="150" label="线上订单号" align="center" />
|
||||
<el-table-column prop="paymentTime" width="160" label="付款时间" align="center" />
|
||||
<el-table-column prop="outboundType" width="120" label="出库类型" align="center" />
|
||||
<el-table-column prop="inventoryStatus" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="inventoryStatusValue" width="120" label="库存状态" align="center" />
|
||||
<el-table-column prop="shipper" width="100" label="货主" align="center" />
|
||||
<el-table-column label="承运商" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -664,7 +664,7 @@
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
this.rowItemClick(this.dataList[0])
|
||||
this.rowItemSid=''
|
||||
this.from = {
|
||||
first: [],
|
||||
two: [],
|
||||
@@ -675,6 +675,8 @@
|
||||
five: {},
|
||||
six: []
|
||||
}
|
||||
this.rowItemClick(this.dataList[0])
|
||||
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
@@ -995,6 +997,7 @@
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user