|
@@ -41,7 +41,7 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col flex="auto">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
|
|
|
+ <a-button type="primary" @click="searchForm" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -49,6 +49,7 @@
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
+ v-if="hasVaild"
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
@@ -71,10 +72,7 @@
|
|
|
</template>
|
|
|
<!-- 包装数 -->
|
|
|
<template slot="baozh" slot-scope="text, record">
|
|
|
- <span v-if="record.packQty&&record.packQtyUnit">
|
|
|
- {{ record.packQty||'--' }}{{ record.unit }}/{{ record.packQtyUnit||'--' }}
|
|
|
- </span>
|
|
|
- <span v-else>--</span>
|
|
|
+ {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
|
|
|
</template>
|
|
|
<!-- 产品编码 -->
|
|
|
<template slot="code" slot-scope="text, record">
|
|
@@ -112,12 +110,23 @@
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
+ <div v-else>
|
|
|
+ <a-empty
|
|
|
+ :image="simpleImage"
|
|
|
+ :image-style="{
|
|
|
+ height: '60px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <span style="color:red" slot="description">请输入查询条件</span>
|
|
|
+ </a-empty>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</a-spin>
|
|
|
</a-drawer>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { Empty } from 'ant-design-vue'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import ProductType from '../../common/productType.js'
|
|
@@ -167,6 +176,7 @@ export default {
|
|
|
visible: this.showModal,
|
|
|
title: '添加产品',
|
|
|
tableHeight: 0,
|
|
|
+ simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
|
// 选择产品
|
|
|
addLoading: false,
|
|
|
spinning: false,
|
|
@@ -200,6 +210,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ hasVaild () {
|
|
|
+ return this.queryParam.code || this.queryParam.name || this.queryParam.productBrandSn || this.queryParam.productTypeSn1
|
|
|
+ },
|
|
|
tableWidth () {
|
|
|
let w = 1100
|
|
|
if (this.isDealerUp) {
|
|
@@ -246,6 +259,14 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
},
|
|
|
+ // 查询
|
|
|
+ searchForm () {
|
|
|
+ if (this.hasVaild) {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ } else {
|
|
|
+ this.$message.info('请输入查询条件')
|
|
|
+ }
|
|
|
+ },
|
|
|
// 重置产品库
|
|
|
resetSearchForm () {
|
|
|
this.queryParam = {
|
|
@@ -258,7 +279,9 @@ export default {
|
|
|
productTypeSn3: '' // 产品三级分类
|
|
|
}
|
|
|
this.productType = []
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ if (this.hasVaild) {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ }
|
|
|
},
|
|
|
onClose () {
|
|
|
this.$emit('close')
|