|
@@ -68,8 +68,8 @@
|
|
|
<a-form-item label="产品名称"><a-input v-model.trim="productForm.productName" allowClear placeholder="请输入产品名称" /></a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled">重置</a-button>
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -80,7 +80,7 @@
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="record => record.id"
|
|
|
+ :rowKey="(record,index) => index"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:defaultLoadData="false"
|
|
@@ -160,7 +160,6 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
- disabled: false, // 查询重置
|
|
|
isInster: false, // 是否正在添加产品
|
|
|
openDepartUserModal: false, // 审核人员弹窗
|
|
|
delLoading: false,
|
|
@@ -175,7 +174,6 @@ export default {
|
|
|
chooseList: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
this.productForm.sparePartsReturnSn = this.$route.query.returnSn
|
|
|
return sparePartsReturnQueryPage(Object.assign(parameter, this.productForm)).then(res => {
|
|
|
let data
|
|
@@ -185,9 +183,6 @@ export default {
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
}
|
|
|
-
|
|
|
- this.$refs.partQuery.pageInit(this.supplierSn, this.sparePartsReturnSn)
|
|
|
- this.disabled = false
|
|
|
}
|
|
|
this.chooseList = data.list
|
|
|
return data
|
|
@@ -300,6 +295,8 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
_this.resetTable(false)
|
|
|
_this.getStatisticsData()
|
|
|
+ _this.getChooseList()
|
|
|
+ _this.$refs.partQuery.refreshLength()
|
|
|
}
|
|
|
_this.$message.info(res.message)
|
|
|
_this.delLoading = false
|
|
@@ -409,6 +406,7 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
this.getStatisticsData()
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ this.getChooseList()
|
|
|
}
|
|
|
this.isInster = false
|
|
|
this.spinning = false
|
|
@@ -423,6 +421,7 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.getStatisticsData()
|
|
|
+ this.getChooseList()
|
|
|
this.$refs.table.refresh(true)
|
|
|
}
|
|
|
this.isInster = false
|
|
@@ -460,6 +459,10 @@ export default {
|
|
|
this.getStatisticsData()
|
|
|
this.getBasicsData()
|
|
|
this.resetSearchForm(true)
|
|
|
+ this.getChooseList()
|
|
|
+ },
|
|
|
+ getChooseList () {
|
|
|
+ this.$refs.partQuery.pageInit(this.supplierSn, this.sparePartsReturnSn)
|
|
|
},
|
|
|
// 获取页面统计数据
|
|
|
getStatisticsData () {
|