|
@@ -69,27 +69,33 @@
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
|
</div>
|
|
|
- <div class="t-title" style="display: flex;align-items: center;justify-content: space-between;padding:5px 0;">
|
|
|
- <div style="border-left:2px solid #eee;padding:0 5px;font-weight: bold;font-size:14px;">{{ shelfName||'' }}</div>
|
|
|
- <div></div>
|
|
|
+ <div v-show="isSearchFlag">
|
|
|
+ <div class="t-title" style="display: flex;align-items: center;justify-content: space-between;padding:5px 0;">
|
|
|
+ <div style="border-left:2px solid #eee;padding:0 5px;font-weight: bold;font-size:14px;">{{ shelfName||'' }}</div>
|
|
|
+ <div></div>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <template slot="type" slot-scope="text, record">
|
|
|
+ <div>
|
|
|
+ {{ record.productTypeSn2 }}->{{ record.productTypeSn3 }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </div>
|
|
|
+ <div class="unChoose" v-show="!isSearchFlag">
|
|
|
+ <a-icon type="exclamation-circle" theme="filled" :style="{ fontSize: '18px', color: '#ff9900', verticalAlign: 'sub', marginRight: '5px' }" />
|
|
|
+ <span>请选择一个货架后点击查询按钮</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- vin -->
|
|
|
- <template slot="vin" slot-scope="text, record">
|
|
|
- <div>
|
|
|
- <span class="table-td-link" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -125,6 +131,7 @@ export default {
|
|
|
productTypeSn2: undefined, // 产品二级分类
|
|
|
productTypeSn3: undefined // 产品三级分类
|
|
|
},
|
|
|
+ isSearchFlag: false,
|
|
|
time: [],
|
|
|
rules: {
|
|
|
'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
|
|
@@ -160,14 +167,14 @@ export default {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: ' productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品品牌', dataIndex: 'brandSn', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品分类', dataIndex: 'type', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '适配有货次数', dataIndex: 'cishu', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
- { title: '适配缺货次数', dataIndex: 'que', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
- { title: '最近VIN扫描时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
|
|
|
+ { title: '产品品牌', dataIndex: 'brandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', slots: { title: 'type' }, scopedSlots: { customRender: 'type' }, width: '10%', align: 'center' },
|
|
|
+ { title: '适配有货次数', dataIndex: 'isStockCount', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
+ { title: '适配缺货次数', dataIndex: 'notStockCount', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
|
|
|
+ { title: '最近VIN扫描时间', dataIndex: 'scanVinDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
|
|
|
]
|
|
|
return arr
|
|
|
}
|
|
@@ -192,6 +199,7 @@ export default {
|
|
|
handleSearch () {
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
+ this.isSearchFlag = true
|
|
|
this.$refs.table.refresh(true)
|
|
|
} else {
|
|
|
console.log('error submit!!')
|
|
@@ -201,6 +209,7 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
+ this.isSearchFlag = false
|
|
|
this.queryParam = {
|
|
|
beginDate: '',
|
|
|
endDate: '',
|
|
@@ -216,7 +225,7 @@ export default {
|
|
|
this.time = []
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.$refs.table.clearTable()
|
|
|
- this.$refs.table.refresh(true)
|
|
|
+ this.handleSearch()
|
|
|
if (this.advanced) {
|
|
|
this.$refs.scanDate.resetDate()
|
|
|
}
|
|
@@ -248,20 +257,16 @@ export default {
|
|
|
handleDetail (row) {
|
|
|
this.curItem = row
|
|
|
this.showDetail = true
|
|
|
- },
|
|
|
- pageInit () {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
- this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
// 如果是新页签打开,则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab) {
|
|
|
- this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
},
|
|
@@ -270,3 +275,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+ .unChoose {
|
|
|
+ text-align: center;
|
|
|
+ margin: 280px 0 340px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+</style>
|