+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+ {{ item.waresName }} ({{ item.waresCode }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/logistics/delivery/index.vue b/src/views/logistics/delivery/index.vue
index 558d23d..b6e3acb 100644
--- a/src/views/logistics/delivery/index.vue
+++ b/src/views/logistics/delivery/index.vue
@@ -6,7 +6,7 @@
:moren="moren"
/>
-
+
@@ -64,22 +64,6 @@
-
-
-
-
-
-
-
-
-
-
-
+
{{ '搜索' }}
- {{ '重置' }}
+ {{ '重置' }}
@@ -1076,74 +1055,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ :selected="selectedProductList"
+ @submit="handleSubmit"
+ />
@@ -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,
@@ -1255,84 +1174,15 @@ export default {
},
methods: {
clearProduct() {
- this.tableData = []
- this.lsArr = []
+ this.selectedProductList = []
this.queryParams.productIdList = []
- this.productLists = []
+ 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.productIdList = products.map((item) => item.pkId).join(',')
+ this.productLists = products.map((item) => item.waresName).join(',')
}
}
}