|
@@ -65,6 +65,16 @@
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="出库仓库">
|
|
|
|
+ <chooseWarehouse ref="outWarehouse" id="productInfoList-outWarehouse" isPermission v-model="queryParam.outWarehouseSn"></chooseWarehouse>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="退货仓库">
|
|
|
|
+ <chooseWarehouse ref="returnWarehouse" id="productInfoList-returnWarehouse" isPermission v-model="queryParam.returnWarehouseSn"></chooseWarehouse>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
|
|
@@ -246,12 +256,13 @@ import ProductBrand from '@/views/common/productBrand.js'
|
|
import productTypeAll from '@/views/common/productTypeAll.js'
|
|
import productTypeAll from '@/views/common/productTypeAll.js'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
import importGuideModal from './importGuideModal.vue'
|
|
|
|
+import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
// 接口
|
|
// 接口
|
|
import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport, saveBatchImportProduct, importSaveBatch, updateHaltProdFlag } from '@/api/product'
|
|
import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport, saveBatchImportProduct, importSaveBatch, updateHaltProdFlag } from '@/api/product'
|
|
export default {
|
|
export default {
|
|
name: 'ProductInfoList',
|
|
name: 'ProductInfoList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, productTypeAll, rangeDate, importGuideModal },
|
|
|
|
|
|
+ components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, productTypeAll, rangeDate, importGuideModal, chooseWarehouse },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -272,7 +283,9 @@ export default {
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
state: undefined, // 产品状态
|
|
state: undefined, // 产品状态
|
|
pricingState: undefined, // 定价状态
|
|
pricingState: undefined, // 定价状态
|
|
- picFlag: undefined// 产品图片
|
|
|
|
|
|
+ picFlag: undefined, // 产品图片
|
|
|
|
+ outWarehouseSn: undefined, // 出库仓库
|
|
|
|
+ returnWarehouseSn: undefined// 退货仓库
|
|
},
|
|
},
|
|
productType: [], // 产品类型
|
|
productType: [], // 产品类型
|
|
|
|
|
|
@@ -280,7 +293,7 @@ export default {
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品名称', dataIndex: 'name', align: 'left', width: '14%', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'name', align: 'left', width: '12%', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'code', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'code', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -292,6 +305,8 @@ export default {
|
|
{ title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '停产状态', width: '6%', align: 'center', scopedSlots: { customRender: 'stopStatus' } },
|
|
{ title: '停产状态', width: '6%', align: 'center', scopedSlots: { customRender: 'stopStatus' } },
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '5%', align: 'center' },
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '5%', align: 'center' },
|
|
|
|
+ { title: '出库仓库', dataIndex: 'outWarehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
],
|
|
],
|
|
loadingAudit: false, // 审核按钮加载状态
|
|
loadingAudit: false, // 审核按钮加载状态
|
|
@@ -351,21 +366,14 @@ export default {
|
|
// 批量导入产品
|
|
// 批量导入产品
|
|
hanldeOk (obj) {
|
|
hanldeOk (obj) {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- if (obj && obj.type && obj.type == 'offline') { // 下线导入
|
|
|
|
- importSaveBatch(obj).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- this.spinning = false
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- saveBatchImportProduct(obj).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- this.spinning = false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // importSaveBatch 下线导入
|
|
|
|
+ const ajaxName = obj && obj.type && obj.type == 'offline' ? importSaveBatch : saveBatchImportProduct
|
|
|
|
+ ajaxName(obj).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 审核
|
|
// 审核
|
|
handleAudit (row) {
|
|
handleAudit (row) {
|
|
@@ -380,10 +388,8 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -420,10 +426,8 @@ export default {
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -484,10 +488,8 @@ export default {
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -525,6 +527,8 @@ export default {
|
|
this.queryParam.pricingState = undefined
|
|
this.queryParam.pricingState = undefined
|
|
this.queryParam.picFlag = undefined
|
|
this.queryParam.picFlag = undefined
|
|
this.queryParam.haltProdFlag = undefined
|
|
this.queryParam.haltProdFlag = undefined
|
|
|
|
+ this.queryParam.outWarehouseSn = undefined
|
|
|
|
+ this.queryParam.returnWarehouseSn = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
if (this.advanced) {
|
|
if (this.advanced) {
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.rangeDate.resetDate()
|
|
@@ -554,10 +558,8 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -580,10 +582,8 @@ export default {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
|
|
+ _this.spinning = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|