|
@@ -26,7 +26,7 @@
|
|
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
|
|
|
<div>
|
|
|
|
|
|
- <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
|
|
|
+ <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
|
|
|
<el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
|
|
|
<el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
|
|
|
<el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
|
|
@@ -574,44 +574,50 @@
|
|
|
<!-- 查看备件 -->
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_seepart" :close-on-click-modal="false" width="90%">
|
|
|
<div>
|
|
|
- <el-table
|
|
|
- :key="tableKey"
|
|
|
- v-loading="listLoading"
|
|
|
- element-loading-text="给我一点时间"
|
|
|
- :data="seepartList"
|
|
|
- border
|
|
|
- fit
|
|
|
- highlight-current-row
|
|
|
- style="width: 100%;margin-bottom:30px"
|
|
|
- :row-style="rowStyle"
|
|
|
- :cell-style="cellStyle"
|
|
|
- class="elTable"
|
|
|
- height="500"
|
|
|
- >
|
|
|
- <!-- table表格 -->
|
|
|
- <el-table-column label="序号" align="center" type="index" width="50px" />
|
|
|
- <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="备件名称" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="备件规格" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="备件图片" prop="partCode" align="center" min-width="90">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-popover placement="right" title="" trigger="hover">
|
|
|
- <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
|
|
|
- <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="备件品牌" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="计量单位" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="现有库存" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="价格" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="牧场" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="负责人" prop="partCode" align="center" min-width="90" />
|
|
|
- <el-table-column label="联系方式" prop="partCode" align="center" min-width="90" />
|
|
|
- </el-table>
|
|
|
+ <el-input v-model="seepart.getdataListParm.parammaps.partName" placeholder="备件" style="width: 200px;" class="filter-item" />
|
|
|
+ <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="seepart_search">搜索</el-button>
|
|
|
+ <h3 v-if="seepartList.length == 0" style="text-align: center;height: 300px;line-height:300px;">呆滞库存查询(如可调拨使用,请优先消耗)</h3>
|
|
|
+ <div v-else>
|
|
|
+ <el-table
|
|
|
+ :key="seepart.tableKey"
|
|
|
+ v-loading="seepart.listLoading"
|
|
|
+ element-loading-text="给我一点时间"
|
|
|
+ :data="seepartList"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ style="width: 100%;margin-bottom:30px;margin-top:20px;"
|
|
|
+ :row-style="rowStyle"
|
|
|
+ :cell-style="cellStyle"
|
|
|
+ class="elTable"
|
|
|
+ height="300"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" align="center" type="index" width="50px" />
|
|
|
+ <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
|
|
|
+ <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
|
|
|
+ <el-table-column label="备件规格" prop="specification" align="center" min-width="90" />
|
|
|
+ <el-table-column label="备件图片" prop="picpath" align="center" min-width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover placement="right" title="" trigger="hover">
|
|
|
+ <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
|
|
|
+ <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备件品牌" prop="brand" align="center" min-width="90" />
|
|
|
+ <el-table-column label="计量单位" prop="unit" align="center" min-width="90" />
|
|
|
+ <el-table-column label="现有库存" sortable prop="reportery" align="center" min-width="60" />
|
|
|
+ <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
|
|
|
+ <el-table-column label="在库天数" sortable prop="daysInStorage" align="center" min-width="60" />
|
|
|
+ <el-table-column label="牧场" sortable prop="amount" align="center" min-width="60" />
|
|
|
+ <el-table-column label="负责人" prop="dutyPersonal" align="center" min-width="90" />
|
|
|
+ <el-table-column label="联系方式" prop="telphone" align="center" min-width="90" />
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="seepart.total>0" :total="seepart.total" :page.sync="seepart.getdataListParm.offset" :limit.sync="seepart.getdataListParm.pagecount" @pagination="get_seepart_data" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" :disabled="isokDisable" @click="apply_subscribe()">继续申购</el-button>
|
|
|
+ <el-button type="primary" :disabled="isokDisable" @click="form_add()">继续申购</el-button>
|
|
|
<el-button @click="dialogFormVisible_seepart = false;">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -784,6 +790,18 @@ export default {
|
|
|
providerList:[],
|
|
|
dialogFormVisible_seepart:false,
|
|
|
seepartList:[],
|
|
|
+ seepart:{
|
|
|
+ tableKey: 0,
|
|
|
+ listLoading: true,
|
|
|
+ total: 0,
|
|
|
+ getdataListParm: {
|
|
|
+ page: 1, offset: 1, pagecount: 10,
|
|
|
+ name:'getIdleSpareParts',
|
|
|
+ parammaps:{
|
|
|
+ partName:''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
apply_subscribeData:{},
|
|
|
myHeight:document.documentElement.clientHeight - 85- 150
|
|
|
}
|
|
@@ -1032,6 +1050,7 @@ export default {
|
|
|
this.getCreateDepartDownList()
|
|
|
this.dialogStatus = 'create'
|
|
|
this.dialogFormVisible = true
|
|
|
+ this.dialogFormVisible_seepart = false
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['createTemp'].clearValidate()
|
|
|
})
|
|
@@ -1098,19 +1117,35 @@ export default {
|
|
|
if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
|
|
|
this.createTemp.providerId = item.providerId
|
|
|
}
|
|
|
- if(this.dialogStatus==='special'){
|
|
|
- this.public_select(item)
|
|
|
- }else{
|
|
|
- this.dialogStatus = 'seepart'
|
|
|
- this.dialogFormVisible_seepart = true
|
|
|
- this.$refs.autocomplete.activated = false;
|
|
|
- this.seepartList = []
|
|
|
- this.apply_subscribeData = item
|
|
|
- }
|
|
|
+ this.public_select(item)
|
|
|
},
|
|
|
apply_subscribe(){
|
|
|
- this.public_select(this.apply_subscribeData)
|
|
|
- this.dialogFormVisible_seepart = false
|
|
|
+ this.dialogStatus = 'seepart'
|
|
|
+ this.seepartList = []
|
|
|
+ console.log(this.seepartList.length,'===')
|
|
|
+ this.dialogFormVisible_seepart = true
|
|
|
+ // this.apply_subscribeData = item
|
|
|
+ },
|
|
|
+ seepart_search(){
|
|
|
+ this.get_seepart_data()
|
|
|
+ },
|
|
|
+ get_seepart_data() {
|
|
|
+ this.seepart.listLoading = true
|
|
|
+ GetDataByName(this.seepart.getdataListParm).then(response => {
|
|
|
+ if (response.data.list !== null) {
|
|
|
+ console.log('table数据', response.data.list)
|
|
|
+ this.seepartList = response.data.list
|
|
|
+ this.seepart.pageNum = response.data.pageNum
|
|
|
+ this.seepart.pageSize = response.data.pageSize
|
|
|
+ } else {
|
|
|
+ this.seepartList = []
|
|
|
+ }
|
|
|
+ this.seepart.total = response.data.total
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.seepart.listLoading = false
|
|
|
+ }, 100)
|
|
|
+ })
|
|
|
},
|
|
|
public_select(item){
|
|
|
if (this.createTemp.providerId == '') {
|