|
@@ -1,7 +1,19 @@
|
|
|
<!--收购管理-->
|
|
|
<template>
|
|
|
- <div class="content">
|
|
|
- <div class="header">
|
|
|
+ <div >
|
|
|
+ <BaseHeaderLayout :leftSpan="12">
|
|
|
+ <template slot="left">
|
|
|
+ <el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="selectVal" placeholder="请选择" @change="warehouseChange" style="margin:0 20px">
|
|
|
+ <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-checkbox v-model="checked" @change="allowEdit">允许手动编辑重量</el-checkbox>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </BaseHeaderLayout>
|
|
|
+ <!-- <div class="header">
|
|
|
<div>
|
|
|
<el-select v-model="selectVal" placeholder="请选择" @change="warehouseChange">
|
|
|
<el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
|
|
@@ -10,12 +22,12 @@
|
|
|
<el-checkbox v-model="checked" @change="allowEdit">允许手动编辑重量</el-checkbox>
|
|
|
</div>
|
|
|
<el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<el-dialog title="新增" :visible.sync="newAcquisitionDialogVisible" width="50%">
|
|
|
<acquisitionManagementAdd></acquisitionManagementAdd>
|
|
|
</el-dialog>
|
|
|
<div class="table-content">
|
|
|
- <el-table :data="tableData" style="width: 100%">
|
|
|
+ <el-table :data="tableData" style="width: 100%;margin-top: 20px" border height="780">
|
|
|
<el-table-column type="index" label="序号">
|
|
|
<template scope="scope">
|
|
|
<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
@@ -33,7 +45,6 @@
|
|
|
<el-table-column prop="deductWeight" label="扣重比"></el-table-column>
|
|
|
<el-table-column prop="saleLimit" label="销量上限(年/吨)"></el-table-column>
|
|
|
<el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
|
|
|
-
|
|
|
<el-table-column prop="status" label="状态"></el-table-column>
|
|
|
<el-table-column prop="passDate" label="通过时间"></el-table-column>
|
|
|
<el-table-column label="操作" width="300">
|
|
@@ -46,11 +57,12 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ <div class="paging">
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
:page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="deptBudgetTotal">
|
|
|
</el-pagination>
|
|
|
-
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -65,13 +77,8 @@
|
|
|
import acquisitionManagementAdd from './acquisitionManagementAdd.vue'
|
|
|
import { getHp } from '@/utils/getHasPermission'
|
|
|
export default {
|
|
|
-
|
|
|
- components: {
|
|
|
-
|
|
|
- },
|
|
|
- watch: {
|
|
|
-
|
|
|
- },
|
|
|
+ components: {},
|
|
|
+ watch: {},
|
|
|
data() {
|
|
|
return {
|
|
|
newAcquisitionDialogVisible: false,
|
|
@@ -120,7 +127,6 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
warehouseChange(e) {
|
|
|
- console.log(e)
|
|
|
let _obj = this.warehouseList.find((item) => {
|
|
|
return item.id === this.selectVal;
|
|
|
});
|
|
@@ -133,8 +139,6 @@
|
|
|
this.currentPage=1
|
|
|
this.pageSize = 10
|
|
|
this.getList()
|
|
|
- console.log(_obj)
|
|
|
-
|
|
|
},
|
|
|
newAcquisition(index, row, type) {
|
|
|
let _obj = {}
|
|
@@ -144,7 +148,6 @@
|
|
|
_obj = this.warehouseList.find((item) => {
|
|
|
return item.id === this.selectVal;
|
|
|
});
|
|
|
- console.log(_obj)
|
|
|
_query = {
|
|
|
warehouseId: _obj.id,
|
|
|
warehouseName: _obj.warehouseName,
|
|
@@ -171,12 +174,10 @@
|
|
|
selectWarehouseSelf({
|
|
|
compId: this.compId,
|
|
|
}).toPromise().then((response) => {
|
|
|
- console.log(response)
|
|
|
this.warehouseList = response
|
|
|
// if(this.userJurisdiction){
|
|
|
// this.warehouseList.unshift({warehouseName:response[0].flag})
|
|
|
// }
|
|
|
- console.log(this.warehouseList)
|
|
|
this.selectVal = this.warehouseList[0].id
|
|
|
if (this.warehouseList[0].allowEdit == 1) {
|
|
|
|
|
@@ -197,29 +198,22 @@
|
|
|
compId: this.compId,
|
|
|
|
|
|
}).toPromise().then((response) => {
|
|
|
- console.log(response)
|
|
|
for (let i = 0; i < response.records.length; i++) {
|
|
|
this.goodsNameList.push(response.records[i].goodsName)
|
|
|
}
|
|
|
this.tableData = response.records
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
})
|
|
|
},
|
|
|
allowEdit(val) {
|
|
|
- console.log(this.selectVal)
|
|
|
purchasePriceAllowEdit({
|
|
|
warehouseId: this.selectVal
|
|
|
}).toPromise().then((response) => {
|
|
|
-
|
|
|
- console.log(response)
|
|
|
// this.tableData = response.records
|
|
|
})
|
|
|
},
|
|
|
- handleEdit(index, row) {
|
|
|
- console.log(index, row);
|
|
|
- },
|
|
|
// 删除
|
|
|
delRow(index, row) {
|
|
|
- console.log(index, row);
|
|
|
//删除
|
|
|
this.$confirm('确定删除该条设置?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -251,7 +245,6 @@
|
|
|
purchasePriceLook({
|
|
|
id: row.id
|
|
|
}).toPromise().then((response) => {
|
|
|
- console.log(response.detailPrints)
|
|
|
// this.tableData = response.records
|
|
|
// this.getList()
|
|
|
localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
|
|
@@ -270,4 +263,10 @@
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
}
|
|
|
+ /deep/.el-table .cell{
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .paging{
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
</style>
|