Merge branch 'bd-test' of gitee.com:cabbage_qd/web-base-admin into bd-online
This commit is contained in:
commit
2f4fe3c9a1
|
@ -769,3 +769,11 @@ export function resetInventoryUse(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutOfStockProduct(params) {
|
||||
return request({
|
||||
url: 'sale/manage/wares/list-no-sale',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getSystemSourceList() {
|
||||
return request({
|
||||
url: '/system//pub/enums/product-source',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getOrderSyncFailList(params) {
|
||||
return request({
|
||||
url: '/sale/manage/order-sync/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateOrderSyncStatus(data) {
|
||||
return request({
|
||||
url: '/sale/manage/order-sync/updateStatus',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getProductList(params) {
|
||||
return request({
|
||||
url: '/sale/manage/all-product/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function addProductInfo(params) {
|
||||
return request({
|
||||
url: '/sale/manage/all-product/save',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function updateProductInfo(params) {
|
||||
return request({
|
||||
url: '/sale/manage/all-product/update',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteProduct(id) {
|
||||
return request({
|
||||
url: `/sale/manage/all-product/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function updateProductInventory(params) {
|
||||
return request({
|
||||
url: '/sale/manage/all-product/change-inventory',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductDetailsList(params) {
|
||||
return request({
|
||||
url: '/sale/manage/all-product-detail/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
|
@ -41,6 +41,13 @@
|
|||
@click="orderDk"
|
||||
>订单抵扣</el-button>
|
||||
</div>
|
||||
<el-alert
|
||||
style="width: fit-content"
|
||||
:closable="false"
|
||||
title="默认显示【在售】商品订单,如需查询【预售】【缺货】商品,请使用【非在售商品】进行追加查询"
|
||||
type="error"
|
||||
show-icon
|
||||
/>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
@ -184,11 +191,6 @@
|
|||
prop="preSaleStatusVal"
|
||||
:label="'预售状态'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="originalOrderCode"
|
||||
:label="'原单号'"
|
||||
/>
|
||||
<el-table-column
|
||||
min-width="100px"
|
||||
align="center"
|
||||
|
@ -776,12 +778,13 @@ export default {
|
|||
})
|
||||
} else if (index == 0) {
|
||||
this.$confirm('是否确定进行全部合单操作?').then((_) => {
|
||||
const params = {
|
||||
...this.params,
|
||||
pkWaresList: this.params.pkWaresList ? this.params.pkWaresList.split(',') : [],
|
||||
mergeType: this.hdform.mergeType
|
||||
}
|
||||
del
|
||||
.deliverUnhandeldMerge(
|
||||
Object.assign({}, this.params, {
|
||||
mergeType: this.hdform.mergeType
|
||||
})
|
||||
)
|
||||
.deliverUnhandeldMerge(params)
|
||||
.then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
|
|
|
@ -3474,6 +3474,39 @@ export const constantRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/whole-network',
|
||||
name: 'WholeNetwork',
|
||||
component: Layout,
|
||||
meta: { title: '全网管理', icon: 'info', icon1: 'infoSel' },
|
||||
children: [
|
||||
{
|
||||
path: 'productManage',
|
||||
name: 'WholeNetworkProductManageList',
|
||||
component: () => import('@/views/wholeNetwork/productManage/index'),
|
||||
meta: { title: '全网产品管理' }
|
||||
},
|
||||
{
|
||||
path: 'productManageSummary',
|
||||
name: 'WholeNetworkProductManageSummary',
|
||||
component: () => import('@/views/wholeNetwork/productManage/summary'),
|
||||
meta: { title: '全网产品统计' }
|
||||
},
|
||||
{
|
||||
path: 'orderSyncFail',
|
||||
name: 'WholeNetworkOrderSyncFail',
|
||||
component: () => import('@/views/wholeNetwork/orderSyncFail/index'),
|
||||
meta: { title: '同步失败订单' }
|
||||
},
|
||||
{
|
||||
path: 'productManageDetails',
|
||||
name: 'WholeNetworkProductManageDetails',
|
||||
component: () => import('@/views/wholeNetwork/productManage/details'),
|
||||
meta: { title: '全网产品管理详情' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// 404 page must be placed at the end !!!
|
||||
{ path: '*', redirect: '/404', hidden: true },
|
||||
|
|
|
@ -475,8 +475,13 @@ export default {
|
|||
text: '证件(反面)',
|
||||
checked: true,
|
||||
prop: 'idCardBack'
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
text: '详细地址',
|
||||
checked: true,
|
||||
prop: 'address'
|
||||
}
|
||||
|
||||
],
|
||||
moren: 'RealInfo',
|
||||
topList: [
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
<el-input v-model="queryParams.phone" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'商品编号'" prop="commodityCode">
|
||||
<el-input
|
||||
|
@ -150,7 +151,22 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="是否加购" prop="addPurchaseFlag">
|
||||
<el-select
|
||||
v-model="queryParams.addPurchaseFlag"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in addPurchaseFlagList"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'">
|
||||
<el-date-picker
|
||||
|
@ -462,7 +478,12 @@
|
|||
prop="remark"
|
||||
:label="'备注'"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="isMakerGiftVal"
|
||||
label="商品类型"
|
||||
min-width="160px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
|
@ -537,7 +558,17 @@ export default {
|
|||
shippingTypeList: [],
|
||||
payTypeList: [],
|
||||
total: 0,
|
||||
vertexList: []
|
||||
vertexList: [],
|
||||
addPurchaseFlagList: [
|
||||
{
|
||||
label: '是',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'发货方式'" prop="deliveryWay">
|
||||
<el-select
|
||||
|
@ -141,6 +140,22 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="是否加购" prop="addPurchaseFlag">
|
||||
<el-select
|
||||
v-model="queryParams.addPurchaseFlag"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in addPurchaseFlagList"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="'创建日期'" prop="teamCode">
|
||||
<el-date-picker
|
||||
|
@ -250,18 +265,19 @@
|
|||
prop="memberCode"
|
||||
:label="'会员编号'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="vertexName"
|
||||
:label="'隶属体系'"
|
||||
min-width="120"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
v-if="dataList[3].key"
|
||||
align="center"
|
||||
prop="memberName"
|
||||
:label="'会员姓名'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="vertexName"
|
||||
:label="'隶属体系'"
|
||||
min-width="120"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
v-if="dataList[4].key"
|
||||
|
@ -544,6 +560,16 @@ export default {
|
|||
],
|
||||
|
||||
multipleSelection: [],
|
||||
addPurchaseFlagList: [
|
||||
{
|
||||
label: '是',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
value: 1
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
vertexId: '',
|
||||
pageNum: 1,
|
||||
|
|
|
@ -0,0 +1,243 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="选择非在售商品"
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="1000px"
|
||||
top="50px"
|
||||
center
|
||||
class="out-of-stock-dialog"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="cpHeight">
|
||||
<el-form ref="form" :model="queryParams" label-width="90px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品编号" prop="waresCode">
|
||||
<el-input v-model="form.waresCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品名称" prop="waresName">
|
||||
<el-input v-model="form.waresName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品状态" prop="preSaleStatus">
|
||||
<el-select
|
||||
v-model="form.preSaleStatus"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in presaleList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="primary" @click="getDataList">搜索</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-tag v-for="item in selection" :key="item.pkId" effect="plain" size="small" closable class="tag-item" type="info" @close="removeSelectedHandle(item)">
|
||||
{{ item.waresName }} ({{ item.waresCode }})
|
||||
</el-tag>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
:data="dialogList"
|
||||
style="width: 100%"
|
||||
row-key="pkId"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="selectionChangeHandle"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
:reserve-selection="true"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column align="center" prop="cover1" :label="'产品主图'">
|
||||
<template slot-scope="scope">
|
||||
<img style="width: 40px; height: 40px" :src="scope.row.cover1" alt="">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="waresName"
|
||||
label="商品名称"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="waresCode"
|
||||
label="商品编号"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="specialAreaVal"
|
||||
label="所属专区"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="preSaleStatusVal"
|
||||
label="预售状态"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{ '取消' }}</el-button>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{
|
||||
'确认'
|
||||
}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/product.js'
|
||||
export default {
|
||||
name: 'OutOfStockProductList',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
selected: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogList: [],
|
||||
presaleList: [],
|
||||
total: 0,
|
||||
selection: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
form: {
|
||||
productName: '',
|
||||
productCode: '',
|
||||
preSaleStatus: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:visible', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.selection = [...this.selected]
|
||||
this.getPreSaleStatus()
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getPreSaleStatus() {
|
||||
api.presale_status().then((res) => {
|
||||
this.presaleList = res.data
|
||||
})
|
||||
},
|
||||
removeSelectedHandle(product) {
|
||||
const tempIdx = this.selection.findIndex((item) => item.pkId === product.pkId)
|
||||
if (~tempIdx) {
|
||||
this.$refs.tableRef.toggleRowSelection(this.selection[tempIdx], false)
|
||||
this.selection.splice(tempIdx, 1)
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
api.getOutOfStockProduct(this.queryParams).then(
|
||||
(res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1
|
||||
item.isGift = 0
|
||||
})
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
this.updateTableSelection()
|
||||
}
|
||||
)
|
||||
},
|
||||
updateTableSelection() {
|
||||
this.$nextTick(() => {
|
||||
if (this.selection.length) {
|
||||
this.selection.forEach((item) => {
|
||||
const row = this.dialogList.find((row) => row.pkId === item.pkId)
|
||||
if (row) {
|
||||
this.$refs.tableRef.toggleRowSelection(row, true)
|
||||
this.$refs.tableRef.doLayout()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getDataList() {
|
||||
this.queryParams.pageNum = 1
|
||||
api.getOutOfStockProduct({
|
||||
...this.queryParams,
|
||||
...this.form
|
||||
}).then((res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1
|
||||
item.isGift = 0
|
||||
})
|
||||
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
this.updateTableSelection()
|
||||
})
|
||||
},
|
||||
selectionChangeHandle(rows) {
|
||||
this.selection = rows
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
onSubmit() {
|
||||
this.$emit('submit', this.selection)
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cpHeight {
|
||||
height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.out-of-stock-dialog {
|
||||
::v-deep .el-dialog__body {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
|
@ -6,7 +6,7 @@
|
|||
:moren="moren"
|
||||
/>
|
||||
<div class="thetopbox">
|
||||
<el-form ref="form" :model="queryParams" label-width="80px">
|
||||
<el-form ref="form" :model="queryParams" label-width="90px">
|
||||
<template v-if="activeName == 0">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
|
@ -64,22 +64,6 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'预售状态'" prop="preSaleStatus">
|
||||
<el-select
|
||||
v-model="queryParams.preSaleStatus"
|
||||
clearable
|
||||
:placeholder="'请选择'"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in presaleStatusList"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'发货方式'" prop="deliveryWay">
|
||||
<el-select
|
||||
|
@ -237,13 +221,8 @@
|
|||
<el-input v-model="queryParams.recPhone" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="'原单号'" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.originalOrderCode"
|
||||
/> </el-form-item></el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('选择产品')" prop="productIdList">
|
||||
<el-form-item label="非在售商品" prop="pkWaresList">
|
||||
<el-input
|
||||
v-model="productLists"
|
||||
clearable
|
||||
|
@ -1049,7 +1028,7 @@
|
|||
<div class="searchbox" style="margin-left: 20px">
|
||||
<el-button class="searchbtn" @click="getSearch(1)">
|
||||
{{ '搜索' }}</el-button>
|
||||
<el-button @click="reChongzhi"> {{ '重置' }}</el-button>
|
||||
<el-button @click="resetHandle"> {{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<div class="openClose" @click="changeActive">
|
||||
|
@ -1076,74 +1055,14 @@
|
|||
<el-tab-pane v-if="menu3" name="2" :label="'立即发货'">
|
||||
<nowdelivery ref="nowdelivery" :params="queryParams" />
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="'添加'"
|
||||
<OutOfStockProductList
|
||||
v-if="dialogVisible"
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="45%"
|
||||
center
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="cpHeight">
|
||||
<el-input
|
||||
v-model="select.productName"
|
||||
:placeholder="'请输入'"
|
||||
prefix-icon="el-icon-search"
|
||||
@keyup.enter.native="getDataList"
|
||||
/>
|
||||
<div style="height: 10px" />
|
||||
<el-table
|
||||
ref="lessonTableRef"
|
||||
:data="dialogList"
|
||||
style="width: 100%"
|
||||
:row-key="
|
||||
(row) => {
|
||||
return row.pkProduct;
|
||||
}
|
||||
"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="dialogChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
:reserve-selection="true"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column align="center" prop="cover" :label="'产品主图'">
|
||||
<template slot-scope="scope">
|
||||
<img class="bgImg" :src="scope.row.cover" alt="">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
:label="'产品名称'"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productCode"
|
||||
:label="'产品编号'"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">{{ '取消' }}</el-button>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{
|
||||
'确认'
|
||||
}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
:selected="selectedProductList"
|
||||
@submit="handleSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -1156,14 +1075,15 @@ import yihandeled from '@/components/Delivery/yihandeled.vue'
|
|||
import nowdelivery from '@/components/Delivery/nowdelivery.vue'
|
||||
import * as del from '@/api/delivery.js'
|
||||
import { getRouters } from '@/api/settle'
|
||||
import { productList } from '@/api/product'
|
||||
import OutOfStockProductList from './components/OutOfStockProductList.vue'
|
||||
export default {
|
||||
name: 'Fhqd',
|
||||
components: {
|
||||
topBar,
|
||||
unhandeled,
|
||||
yihandeled,
|
||||
nowdelivery
|
||||
nowdelivery,
|
||||
OutOfStockProductList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -1175,10 +1095,8 @@ export default {
|
|||
}
|
||||
],
|
||||
dialogVisible: false,
|
||||
dialogList: [],
|
||||
lsArr: [],
|
||||
tableData: [],
|
||||
productLists: [],
|
||||
|
||||
productLists: '',
|
||||
select: {},
|
||||
orderTypeList: [], // 订单类型
|
||||
orderStatusList: [], // 订单状态
|
||||
|
@ -1196,6 +1114,7 @@ export default {
|
|||
yesornoList: [], // 二次发货
|
||||
storehouseList: [], // 发货仓库
|
||||
total: '',
|
||||
selectedProductList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
|
@ -1230,7 +1149,7 @@ export default {
|
|||
payTime: [],
|
||||
printTime: [], // 打印时间2
|
||||
deliverTime: [], // 发货时间2
|
||||
productIdList: []
|
||||
pkWaresList: []
|
||||
},
|
||||
isActive: true,
|
||||
areaData: [],
|
||||
|
@ -1255,84 +1174,15 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
clearProduct() {
|
||||
this.tableData = []
|
||||
this.lsArr = []
|
||||
this.queryParams.productIdList = []
|
||||
this.productLists = []
|
||||
this.selectedProductList = []
|
||||
this.queryParams.pkWaresList = []
|
||||
this.productLists = ''
|
||||
},
|
||||
openDig() {
|
||||
this.select = {}
|
||||
productList(Object.assign({ isPutOn: 0 }, this.queryParams)).then(
|
||||
(res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1
|
||||
item.pkProduct = item.pkProduct
|
||||
item.isGift = 0
|
||||
})
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
)
|
||||
this.dialogVisible = true
|
||||
this.select = {}
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
getDataList() {
|
||||
productList(
|
||||
Object.assign({ isPutOn: 0 }, this.queryParams, this.select)
|
||||
).then((res) => {
|
||||
res.rows.forEach((item) => {
|
||||
item.quantity = 1
|
||||
item.pkProduct = item.pkProduct
|
||||
item.isGift = 0
|
||||
})
|
||||
this.dialogList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
},
|
||||
dialogChange(val) {
|
||||
this.lsArr = val
|
||||
},
|
||||
onSubmit() {
|
||||
// this.tableData = []
|
||||
this.lsArr.forEach((item) => {
|
||||
this.tableData.push(item)
|
||||
})
|
||||
// this.tableData = this.clearArr(this.tableData)
|
||||
this.dialogVisible = false
|
||||
this.dialogList.forEach((row) => {
|
||||
this.$refs.lessonTableRef.toggleRowSelection(row, false)
|
||||
})
|
||||
// 判断重复
|
||||
const arr = this.tableData
|
||||
let isTrue = false
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
// 首次遍历数组
|
||||
for (var j = i + 1; j < arr.length; j++) {
|
||||
// 再次遍历数组
|
||||
if (arr[i].productCode == arr[j].productCode) {
|
||||
if (arr[i].isGift == arr[j].isGift) {
|
||||
isTrue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isTrue) {
|
||||
this.$message.error('请勿选择重复的商品')
|
||||
this.tableData = []
|
||||
this.lsArr = []
|
||||
this.queryParams.productIdList = []
|
||||
this.productLists = []
|
||||
return
|
||||
}
|
||||
this.queryParams.productIdList = []
|
||||
this.productLists = []
|
||||
this.tableData.forEach((item) => {
|
||||
this.queryParams.productIdList.push(item.pkId)
|
||||
this.productLists.push(item.productName)
|
||||
})
|
||||
},
|
||||
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row'
|
||||
|
@ -1477,7 +1327,8 @@ export default {
|
|||
})
|
||||
},
|
||||
// 重置
|
||||
reChongzhi() {
|
||||
resetHandle() {
|
||||
this.selectedProductList = []
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
|
@ -1488,6 +1339,11 @@ export default {
|
|||
// 展开折叠
|
||||
changeActive() {
|
||||
this.isActive = !this.isActive
|
||||
},
|
||||
handleSubmit(products) {
|
||||
this.selectedProductList = [...products]
|
||||
this.queryParams.pkWaresList = products.map((item) => item.pkId).join(',')
|
||||
this.productLists = products.map((item) => item.waresName).join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,307 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="defaultSelected"
|
||||
/>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单号" prop="orderCode">
|
||||
<el-input v-model="select.orderCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="产品名称" prop="productName">
|
||||
<el-input v-model="select.productName" clearable />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间范围" prop="timeRange">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
clearable
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="timeRangeHandleChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button
|
||||
class="my_search"
|
||||
@click="
|
||||
() => {
|
||||
getSearch();
|
||||
resetPageNum();
|
||||
}
|
||||
"
|
||||
>
|
||||
{{ '搜索' }}</el-button>
|
||||
<el-button class="my_reset" @click="resetHandle">
|
||||
{{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop" />
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
height="700px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderCode"
|
||||
label="订单号"
|
||||
width="180px"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderProductDetail"
|
||||
label="产品明细列表"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-for="item in scope.row.orderProductDetail" :key="item.pkId">
|
||||
<span style="font-size: 12px;">仓储编号:{{ item.wmsCode }} </span>
|
||||
<span style="margin-left: 8px; font-size: 12px;">变动数量:{{ item.changeNum }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="statusVal"
|
||||
label="同步状态"
|
||||
width="80px"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
label="创建时间"
|
||||
width="170px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="colsele"
|
||||
label="操作"
|
||||
width="100px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.status === 1"
|
||||
v-hasButtons="['WholeNetworkOrderSyncFailUpdate']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #48b2fd; padding: 0"
|
||||
@click="handleProcessed(scope.row)"
|
||||
>
|
||||
手动处理
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderSyncFailList, updateOrderSyncStatus } from '@/api/wholeNetwork/orderSync'
|
||||
import topBar from '@/components/topBar'
|
||||
import { getMonthFirstDay, getMonthLastDay } from '@/utils/date'
|
||||
const initSearch = {
|
||||
ordeCode: ''
|
||||
}
|
||||
export default {
|
||||
name: 'WholeNetworkOrderSyncFail',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultSelected: 'orderSyncFail',
|
||||
topList: [
|
||||
{
|
||||
name: '同步失败订单',
|
||||
path: 'orderSyncFail'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
loading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
timeRange: [
|
||||
],
|
||||
select: {
|
||||
...initSearch
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
updateDialogVisible: false,
|
||||
isEdit: false,
|
||||
productInfo: {
|
||||
remark: ''
|
||||
},
|
||||
updateInventoryVisible: false,
|
||||
inventoryInfo: {
|
||||
inventory: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSearch()
|
||||
},
|
||||
methods: {
|
||||
handleProcessed({ pkId }) {
|
||||
this.$confirm('是否确认手动处理该订单?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
updateOrderSyncStatus({ pkId, status: 0 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('手动处理成功')
|
||||
this.getSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
timeRangeHandleChange(timeRange) {
|
||||
this.queryParams.startDate = timeRange?.[0] || null
|
||||
this.queryParams.endDate = timeRange?.[1] || null
|
||||
},
|
||||
resetHandle() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
}
|
||||
this.timeRange = []
|
||||
|
||||
this.select = {
|
||||
...initSearch
|
||||
|
||||
}
|
||||
this.getSearch()
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
...this.select
|
||||
}
|
||||
getOrderSyncFailList(params).then((res) => {
|
||||
this.loading = false
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
resetPageNum() {
|
||||
this.queryParams.pageNum = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-image-viewer__close {
|
||||
right: 500px;
|
||||
}
|
||||
::v-deep .dizhi .el-cascader {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #009b58;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn3 {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,136 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="600px"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item required label="仓储编号" prop="wmsCode">
|
||||
<el-input v-model="form.wmsCode" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 10px;" required label="产品名称" prop="productName">
|
||||
<el-input v-model="form.productName" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 10px;" required label="封面图" prop="cover">
|
||||
<ImageUpload v-model="form.cover" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 10px;" label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" :maxlength="200" show-word-limit type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addProductInfo, updateProductInfo } from '@/api/wholeNetwork/productManage'
|
||||
import ImageUpload from '@/components/ImageUpload'
|
||||
export default {
|
||||
name: 'UpdateDialog',
|
||||
components: {
|
||||
ImageUpload
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
productInfo: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
wmsCode: '',
|
||||
productName: '',
|
||||
cover: '',
|
||||
remark: ''
|
||||
},
|
||||
rules: {
|
||||
wmsCode: [
|
||||
{ required: true, message: '请输入仓储编号', trigger: 'blur' }
|
||||
],
|
||||
productName: [
|
||||
{ required: true, message: '请输入产品名称', trigger: 'blur' }
|
||||
],
|
||||
cover: [
|
||||
{ required: true, message: '请上传封面图', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.isEdit ? '编辑' : '添加'
|
||||
},
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
set(value) {
|
||||
this.$emit('update:visible', value)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isEdit) {
|
||||
this.form = {
|
||||
...this.productInfo
|
||||
}
|
||||
console.log(this.form)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.isEdit) {
|
||||
updateProductInfo(this.form).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogVisible = false
|
||||
this.$emit('success')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const params = {
|
||||
...this.form,
|
||||
inventory: ''
|
||||
}
|
||||
addProductInfo(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('添加成功')
|
||||
this.dialogVisible = false
|
||||
this.$emit('success')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,96 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="变动库存"
|
||||
:visible.sync="dialogVisible"
|
||||
width="600px"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-alert
|
||||
title="如果扣减库存,则输入负数。"
|
||||
type="error"
|
||||
show-icon
|
||||
/>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="100px">
|
||||
<el-form-item required label="变动数量" prop="inventory">
|
||||
<el-input v-model="form.inventory" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateProductInventory } from '@/api/wholeNetwork/productManage'
|
||||
export default {
|
||||
name: 'UpdateInventory',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
inventoryInfo: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
inventory: ''
|
||||
},
|
||||
rules: {
|
||||
inventory: [
|
||||
{ required: true, message: '请输入库存数量', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogVisible: {
|
||||
get() {
|
||||
return this.visible
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:visible', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form = {
|
||||
...this.inventoryInfo,
|
||||
inventory: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
updateProductInventory(this.form).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('修改库存成功')
|
||||
this.$emit('success')
|
||||
this.dialogVisible = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,286 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="defaultSelected"
|
||||
/>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="来源系统" prop="source">
|
||||
<el-select v-model="form.source" clearable>
|
||||
<el-option v-for="item in systemSourceList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="来源订单号" prop="orderCode">
|
||||
<el-input v-model="form.orderCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时间范围" prop="timeRange">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
clearable
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="timeRangeHandleChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button
|
||||
class="my_search"
|
||||
@click="
|
||||
() => {
|
||||
getSearch();
|
||||
resetPageNum();
|
||||
}
|
||||
"
|
||||
>
|
||||
搜索</el-button>
|
||||
<el-button class="my_reset" @click="resetHandle">
|
||||
重置</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button v-hasButtons="['WholeNetworkProductManageDetailsExport']" size="small" class="thebtn1" @click="handleExport">
|
||||
{{ '导出' }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
height="700px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="sourceVal"
|
||||
label="来源系统"
|
||||
width="90px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="orderCode"
|
||||
label="来源订单号"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="changeNum"
|
||||
label="变动数量"
|
||||
width="100px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="remark"
|
||||
label="变动说明"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="creationTime"
|
||||
label="创建时间"
|
||||
width="180px"
|
||||
/>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import topBar from '@/components/topBar'
|
||||
import { getSystemSourceList } from '@/api/wholeNetwork'
|
||||
import { getProductDetailsList } from '@/api/wholeNetwork/productManage'
|
||||
const initSearch = {
|
||||
startDate: null,
|
||||
endDate: null
|
||||
}
|
||||
export default {
|
||||
name: 'WholeNetworkProductManageDetails',
|
||||
components: {
|
||||
topBar
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
defaultSelected: 'productManageDetails',
|
||||
topList: [
|
||||
{
|
||||
name: '全网产品管理详情',
|
||||
path: 'productManageDetails'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
loading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
|
||||
},
|
||||
form: {
|
||||
...initSearch
|
||||
},
|
||||
total: 0,
|
||||
pkId: '',
|
||||
timeRange: [],
|
||||
systemSourceList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pkId = this.$route.query.pkId
|
||||
this.getSystemSourceList()
|
||||
this.getSearch()
|
||||
},
|
||||
methods: {
|
||||
getSystemSourceList() {
|
||||
getSystemSourceList().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.systemSourceList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'/sale/manage/all-product-detail/export',
|
||||
{ ...this.queryParams, ...this.form },
|
||||
`${'全网产品管理'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
timeRangeHandleChange() {
|
||||
this.form.startDate = this.timeRange?.[0] || null
|
||||
this.form.endDate = this.timeRange?.[1] || null
|
||||
},
|
||||
resetHandle() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
}
|
||||
this.timeRange = []
|
||||
this.getSearch()
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
...this.form,
|
||||
pkAllProduct: this.pkId
|
||||
}
|
||||
getProductDetailsList(params).then((res) => {
|
||||
this.loading = false
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
resetPageNum() {
|
||||
this.queryParams.pageNum = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-image-viewer__close {
|
||||
right: 500px;
|
||||
}
|
||||
::v-deep .dizhi .el-cascader {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #009b58;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn3 {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,392 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<topBar
|
||||
v-if="topList.length > 0"
|
||||
:top-list="topList"
|
||||
:moren="defaultSelected"
|
||||
/>
|
||||
<div class="thetopbox">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="仓储编号" prop="productName">
|
||||
<el-input v-model="select.wmsCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="产品名称" prop="productName">
|
||||
<el-input v-model="select.productName" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="时间范围" prop="timeRange">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:clearable="false"
|
||||
:range-separator="'至'"
|
||||
:start-placeholder="'开始日期'"
|
||||
:end-placeholder="'结束日期'"
|
||||
@change="changeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<div class="searchbox">
|
||||
<el-button
|
||||
class="my_search"
|
||||
@click="
|
||||
() => {
|
||||
getSearch();
|
||||
resetPageNum();
|
||||
}
|
||||
"
|
||||
>
|
||||
{{ '搜索' }}</el-button>
|
||||
<el-button class="my_reset" @click="resetHandle">
|
||||
{{ '重置' }}</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="maintop">
|
||||
<div class="mainbtn">
|
||||
<el-button v-hasButtons="['WholeNetworkProductManageListAdd']" size="small" class="addBtn" @click="addHandle">
|
||||
新增</el-button>
|
||||
<el-button v-hasButtons="['WholeNetworkProductManageListExport']" size="small" class="thebtn1" @click="handleExport">
|
||||
导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
height="700px"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#EEEEEE' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column prop="colsele" type="selection" width="55" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="cover"
|
||||
label="封面图"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.cover" alt="" style="width: 50px; height: 50px;">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="wmsCode"
|
||||
label="仓储编号"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="productName"
|
||||
label="产品名称"
|
||||
min-width="180px"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="inventory"
|
||||
label="库存数量"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="remark"
|
||||
label="备注"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="colsele"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #48b2fd; padding: 0"
|
||||
@click.native.prevent="goDetail(scope.row)"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['WholeNetworkProductManageListUpdate']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: rgb(55, 191, 70); padding: 0"
|
||||
@click.native.prevent="updateHandle(scope.row)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['WholeNetworkProductManageListUpdateInventory']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="padding: 0; color: #f3a900"
|
||||
@click.native.prevent="updateInventoryHandle(scope.row)"
|
||||
>
|
||||
修改库存
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasButtons="['WholeNetworkProductManageListDel']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="padding: 0; color: #c8161d"
|
||||
@click.native.prevent="delHandle(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getSearch"
|
||||
/>
|
||||
<UpdateDialog
|
||||
v-if="updateDialogVisible"
|
||||
:visible.sync="updateDialogVisible"
|
||||
:is-edit="isEdit"
|
||||
:product-info="productInfo"
|
||||
@success="getSearch"
|
||||
/>
|
||||
<UpdateInventory
|
||||
v-if="updateInventoryVisible"
|
||||
:visible.sync="updateInventoryVisible"
|
||||
:inventory-info="inventoryInfo"
|
||||
@success="getSearch"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getProductList, deleteProduct } from '@/api/wholeNetwork/productManage'
|
||||
import topBar from '@/components/topBar'
|
||||
import { getMonthFirstDay, getMonthLastDay } from '@/utils/date'
|
||||
import UpdateDialog from './components/UpdateDialog.vue'
|
||||
import UpdateInventory from './components/UpdateInventory.vue'
|
||||
const initSearch = {
|
||||
productName: '',
|
||||
wmsCode: ''
|
||||
}
|
||||
export default {
|
||||
name: 'WholeNetworkProductManageList',
|
||||
components: {
|
||||
topBar,
|
||||
UpdateDialog,
|
||||
UpdateInventory
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
defaultSelected: 'productManage',
|
||||
topList: [
|
||||
{
|
||||
name: '全网产品管理',
|
||||
path: 'productManage'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
loading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
},
|
||||
timeRange: [
|
||||
getMonthFirstDay(),
|
||||
getMonthLastDay()
|
||||
],
|
||||
select: {
|
||||
...initSearch
|
||||
},
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
updateDialogVisible: false,
|
||||
isEdit: false,
|
||||
productInfo: {
|
||||
remark: ''
|
||||
},
|
||||
updateInventoryVisible: false,
|
||||
inventoryInfo: {
|
||||
inventory: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSearch()
|
||||
},
|
||||
methods: {
|
||||
delHandle(val) {
|
||||
this.$confirm('是否确认删除该数据?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
deleteProduct(val.pkId).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('删除成功')
|
||||
this.getSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
updateHandle(val) {
|
||||
this.isEdit = true
|
||||
this.productInfo = val
|
||||
this.updateDialogVisible = true
|
||||
},
|
||||
addHandle() {
|
||||
this.isEdit = false
|
||||
this.productInfo = {
|
||||
remark: ''
|
||||
}
|
||||
this.updateDialogVisible = true
|
||||
},
|
||||
updateInventoryHandle(val) {
|
||||
this.inventoryInfo = val
|
||||
this.updateInventoryVisible = true
|
||||
},
|
||||
goDetail(val) {
|
||||
this.$router.push({
|
||||
path: 'productManageDetails',
|
||||
query: {
|
||||
pkId: val.pkId
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then((_) => {
|
||||
this.download(
|
||||
'/sale/manage/all-product/export',
|
||||
Object.assign({}, this.queryParams, this.select),
|
||||
`${'全网产品管理'}${new Date().getTime()}.xlsx`
|
||||
)
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
resetHandle() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 50
|
||||
}
|
||||
|
||||
this.select = {
|
||||
...initSearch
|
||||
|
||||
}
|
||||
this.getSearch()
|
||||
},
|
||||
getSearch() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
...this.select
|
||||
}
|
||||
getProductList(params).then((res) => {
|
||||
this.loading = false
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
resetPageNum() {
|
||||
this.queryParams.pageNum = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-image-viewer__close {
|
||||
right: 500px;
|
||||
}
|
||||
::v-deep .dizhi .el-cascader {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-range-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-table thead {
|
||||
color: #000000;
|
||||
}
|
||||
::v-deep .el-table .warning-row {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
padding: 10px 20px;
|
||||
background: #f9f9f9;
|
||||
font-size: 14px;
|
||||
.thetopbox {
|
||||
padding: 15px 20px 15px 0;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
.searchbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 40px;
|
||||
}
|
||||
.searchtitle {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.searchbtn {
|
||||
background: #08143f;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
//margin-top: 20px;
|
||||
background: #f9f9f9;
|
||||
//border-radius: 8px;
|
||||
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||
|
||||
.maintop {
|
||||
display: flex;
|
||||
// padding: 10px 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.mainbtn {
|
||||
.thebtn1 {
|
||||
color: #ffffff;
|
||||
background: #ffad41;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn2 {
|
||||
color: #ffffff;
|
||||
background: #009b58;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
.thebtn3 {
|
||||
color: #ffffff;
|
||||
background: #c8161d;
|
||||
width: 68px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-empty description="开发中..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'WholeNetworkProductManageSummary'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue