|
@@ -16,35 +16,43 @@
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchForm">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="产品编码">
|
|
|
<a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
<a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="产品分类">
|
|
|
<ProductType id="productInfoList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="8" :sm="24">
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
<a-form-item label="产品品牌">
|
|
|
<ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="searchForm" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
|
|
|
+ <div class="actions-buttons">
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ ghost
|
|
|
+ id="outStock-save"
|
|
|
+ @click="handleSave"
|
|
|
+ style="padding: 0 20px;">批量添加</a-button>
|
|
|
+ <span style="font-weight: bold;margin-left:15px;" v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length">已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</span>
|
|
|
+ </div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable"
|
|
@@ -53,29 +61,13 @@
|
|
|
:rowKey="(record) => record.productSn"
|
|
|
rowKeyName="productSn"
|
|
|
:row-selection="{ columnWidth: 40 }"
|
|
|
+ :scroll="{ y:tableHeight }"
|
|
|
@rowSelection="rowSelectionFun"
|
|
|
:data="loadData"
|
|
|
:columns="columns"
|
|
|
- :scroll="{ y: 450 }"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</div>
|
|
|
- <!-- 按钮 -->
|
|
|
- <div class="btn-con">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- id="outStock-save"
|
|
|
- size="large"
|
|
|
- class="button-primary"
|
|
|
- @click="handleSave"
|
|
|
- style="padding: 0 36px;">批量添加</a-button>
|
|
|
- <a-button
|
|
|
- id="outStock-cancel"
|
|
|
- size="large"
|
|
|
- class="button-cancel"
|
|
|
- @click="isShow=false"
|
|
|
- style="padding: 0 60px;margin-left: 15px;">取消</a-button>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-spin>
|
|
@@ -121,6 +113,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
+ tableHeight: 0,
|
|
|
formItemLayout: {
|
|
|
labelCol: { span: 4 },
|
|
|
wrapperCol: { span: 20 }
|
|
@@ -133,7 +126,7 @@ export default {
|
|
|
{ title: '上次缺货数量', dataIndex: 'cancelQty', width: '18%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
- title: '上次采购缺货产品明细(采购单号:' + 'XS22456789' + ')',
|
|
|
+ title: '上次采购缺货产品明细',
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -162,6 +155,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setTableH () {
|
|
|
+ this.tableHeight = window.innerHeight - 330
|
|
|
+ },
|
|
|
// 产品分类 change
|
|
|
changeProductType (val, opt) {
|
|
|
this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
@@ -198,6 +194,7 @@ export default {
|
|
|
content: content,
|
|
|
okText: '好的',
|
|
|
centered: true,
|
|
|
+ zIndex: 1100,
|
|
|
onOk () {
|
|
|
_this.$refs.table.clearSelected() // 清空表格选中项
|
|
|
}
|
|
@@ -218,6 +215,7 @@ export default {
|
|
|
cancelText: '重新选择',
|
|
|
centered: true,
|
|
|
closable: true,
|
|
|
+ zIndex: 1100,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
const params = {
|
|
@@ -270,6 +268,9 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.onCancel()
|
|
|
+ } else {
|
|
|
+ this.setTableH()
|
|
|
+ this.title = this.title + '(采购单号:' + this.paramsData.purchaseBillNo + ')'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -279,12 +280,8 @@ export default {
|
|
|
<style lang="less" scoped>
|
|
|
.outStock-modal{
|
|
|
.outStock-con{
|
|
|
- .btn-con{
|
|
|
- text-align: center;
|
|
|
- margin: 30px 0 20px;
|
|
|
- .button-cancel{
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
+ .actions-buttons{
|
|
|
+ padding: 10px 0;
|
|
|
}
|
|
|
}
|
|
|
}
|