Merge branch 'dev' of 47.94.45.65:angelo/web-retail-admin into test
This commit is contained in:
commit
a57de589f1
|
@ -776,3 +776,20 @@ export function get_sort(params) {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function resetInventoryUse(data) {
|
||||||
|
return request({
|
||||||
|
url: 'sale/manage/wares/resetInventoryUse',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getOutOfStockProduct(params) {
|
||||||
|
return request({
|
||||||
|
url: 'sale/manage/wares/list-no-sale',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,13 @@
|
||||||
>订单抵扣</el-button
|
>订单抵扣</el-button
|
||||||
> -->
|
> -->
|
||||||
</div>
|
</div>
|
||||||
|
<el-alert
|
||||||
|
style="width: fit-content"
|
||||||
|
:closable="false"
|
||||||
|
title="默认显示【在售】商品订单,如需查询【预售】【缺货】商品,请使用【非在售商品】进行追加查询"
|
||||||
|
type="error"
|
||||||
|
show-icon
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
@ -184,11 +191,7 @@
|
||||||
prop="preSaleStatusVal"
|
prop="preSaleStatusVal"
|
||||||
:label="'预售状态'"
|
:label="'预售状态'"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
prop="originalOrderCode"
|
|
||||||
:label="'原单号'"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
min-width="100px"
|
min-width="100px"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -801,12 +804,13 @@ export default {
|
||||||
})
|
})
|
||||||
} else if (index == 0) {
|
} else if (index == 0) {
|
||||||
this.$confirm('是否确定进行全部合单操作?').then((_) => {
|
this.$confirm('是否确定进行全部合单操作?').then((_) => {
|
||||||
del
|
const params = {
|
||||||
.deliverUnhandeldMerge(
|
...this.params,
|
||||||
Object.assign({}, this.params, {
|
pkWaresList: this.params.pkWaresList ? this.params.pkWaresList.split(',') : [],
|
||||||
mergeType: this.hdform.mergeType
|
mergeType: this.hdform.mergeType
|
||||||
})
|
}
|
||||||
)
|
del
|
||||||
|
.deliverUnhandeldMerge(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
|
|
|
@ -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"
|
:moren="moren"
|
||||||
/>
|
/>
|
||||||
<div class="thetopbox">
|
<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">
|
<template v-if="activeName == 0">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
@ -64,22 +64,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<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-col :span="4">
|
||||||
<el-form-item :label="'发货方式'" prop="deliveryWay">
|
<el-form-item :label="'发货方式'" prop="deliveryWay">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -282,7 +267,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('选择产品')" prop="productIdList">
|
<el-form-item :label="$t('非在售商品')" prop="pkWaresList">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="productLists"
|
v-model="productLists"
|
||||||
clearable
|
clearable
|
||||||
|
@ -315,11 +300,6 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :span="8">
|
||||||
<el-form-item :label="'创建日期'" prop="code">
|
<el-form-item :label="'创建日期'" prop="code">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
@ -1205,74 +1185,14 @@
|
||||||
<el-tab-pane v-if="menu3" name="2" :label="'立即发货'">
|
<el-tab-pane v-if="menu3" name="2" :label="'立即发货'">
|
||||||
<nowdelivery ref="nowdelivery" :params="queryParams" />
|
<nowdelivery ref="nowdelivery" :params="queryParams" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<OutOfStockProductList
|
||||||
:title="'添加'"
|
v-if="dialogVisible"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:close-on-click-modal="false"
|
:selected="selectedProductList"
|
||||||
width="45%"
|
@submit="handleSubmit"
|
||||||
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>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1286,14 +1206,16 @@ import nowdelivery from '@/components/Delivery/nowdelivery.vue'
|
||||||
import * as del from '@/api/delivery.js'
|
import * as del from '@/api/delivery.js'
|
||||||
import { getvertexValue } from '@/api/member'
|
import { getvertexValue } from '@/api/member'
|
||||||
import { getRouters } from '@/api/settle'
|
import { getRouters } from '@/api/settle'
|
||||||
import { productList } from '@/api/product'
|
import OutOfStockProductList from './components/OutOfStockProductList.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Fhqd',
|
name: 'Fhqd',
|
||||||
components: {
|
components: {
|
||||||
topBar,
|
topBar,
|
||||||
unhandeled,
|
unhandeled,
|
||||||
yihandeled,
|
yihandeled,
|
||||||
nowdelivery
|
nowdelivery,
|
||||||
|
OutOfStockProductList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -1309,7 +1231,7 @@ export default {
|
||||||
dialogList: [],
|
dialogList: [],
|
||||||
lsArr: [],
|
lsArr: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
productLists: [],
|
productLists: '',
|
||||||
systemAllList: [
|
systemAllList: [
|
||||||
{
|
{
|
||||||
label: '是',
|
label: '是',
|
||||||
|
@ -1368,7 +1290,7 @@ export default {
|
||||||
payTime: [],
|
payTime: [],
|
||||||
printTime: [], // 打印时间2
|
printTime: [], // 打印时间2
|
||||||
deliverTime: [], // 发货时间2
|
deliverTime: [], // 发货时间2
|
||||||
productIdList: [],
|
pkWaresList: [],
|
||||||
systemAll: 0
|
systemAll: 0
|
||||||
},
|
},
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
@ -1385,7 +1307,8 @@ export default {
|
||||||
menu2: false,
|
menu2: false,
|
||||||
menu3: false,
|
menu3: false,
|
||||||
menu4: false,
|
menu4: false,
|
||||||
vertexList: [] // 隶属体系
|
vertexList: [], // 隶属体系
|
||||||
|
selectedProductList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -1395,84 +1318,15 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clearProduct() {
|
clearProduct() {
|
||||||
this.tableData = []
|
this.selectedProductList = []
|
||||||
this.lsArr = []
|
this.queryParams.pkWaresList = []
|
||||||
this.queryParams.productIdList = []
|
this.productLists = ''
|
||||||
this.productLists = []
|
|
||||||
},
|
},
|
||||||
openDig() {
|
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.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 }) {
|
tableRowClassName({ row, rowIndex }) {
|
||||||
if (rowIndex % 2 == 1) {
|
if (rowIndex % 2 == 1) {
|
||||||
return 'warning-row'
|
return 'warning-row'
|
||||||
|
@ -1614,17 +1468,23 @@ export default {
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
reChongzhi() {
|
reChongzhi() {
|
||||||
|
this.selectedProductList = []
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 500,
|
pageSize: 500,
|
||||||
orderStatus: 1
|
orderStatus: 1
|
||||||
}
|
}
|
||||||
this.productLists = []
|
this.productLists = ''
|
||||||
this.getSearch()
|
this.getSearch()
|
||||||
},
|
},
|
||||||
// 展开折叠
|
// 展开折叠
|
||||||
changeActive() {
|
changeActive() {
|
||||||
this.isActive = !this.isActive
|
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(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue