|
@@ -36,6 +36,27 @@
|
|
入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
|
|
入库金额 <strong>{{ (productTotal&&(productTotal.totalPrice || productTotal.totalPrice==0)) ? productTotal.totalPrice : '--' }}</strong>
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
|
|
+ <!-- 筛选条件 -->
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品编码" prop="productCode">
|
|
|
|
+ <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品名称" prop="productName">
|
|
|
|
+ <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
|
+ </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" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
@@ -91,6 +112,10 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
|
|
+ queryParam: {
|
|
|
|
+ productCode: '',
|
|
|
|
+ productName: ''
|
|
|
|
+ },
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
@@ -104,7 +129,7 @@ export default {
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- return sparePartsDetailList(Object.assign(parameter, { sn: this.$route.params.sn })).then(res => {
|
|
|
|
|
|
+ return sparePartsDetailList(Object.assign(parameter, this.queryParam, { sparePartsSn: this.$route.params.sn })).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
@@ -112,7 +137,7 @@ export default {
|
|
// 小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
// 小计 由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
|
|
data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
|
|
data.list[i].subtotal = getOperationalPrecision(data.list[i].productCost || 0, data.list[i].productQty)
|
|
}
|
|
}
|
|
- this.getDetailCount(Object.assign(parameter, { sn: this.$route.params.sn }))
|
|
|
|
|
|
+ this.getDetailCount(Object.assign(parameter, { sparePartsSn: this.$route.params.sn }))
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -155,6 +180,12 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 重置
|
|
|
|
+ resetSearchForm () {
|
|
|
|
+ this.queryParam.productCode = ''
|
|
|
|
+ this.queryParam.productName = ''
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
// 导入产品
|
|
// 导入产品
|
|
hanldeOk (obj) {
|
|
hanldeOk (obj) {
|
|
sparePartsDetailBatchInsert(obj).then(res => {
|
|
sparePartsDetailBatchInsert(obj).then(res => {
|