|
|
@@ -110,9 +110,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-search-option="{scope}">
|
|
|
- 入库时间:
|
|
|
+ <el-input v-model="searchContent" placeholder="核销码 / 供货商名 / 手机号" size="medium" style="width:240px;" :clearable="true" ref="itemSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
|
|
|
+
|
|
|
+ <el-select size="medium" v-model="currentCgStaffName" placeholder="采购人" style="width:150px;margin-left:10px;" @change="getCgStaff" :clearable="true">
|
|
|
+ <el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <span style="font-size:22px;margin-left:20px;">入库时间:</span>
|
|
|
<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
|
- end-placeholder="结束日期" :picker-options="pickerOptions" size="mini" style="margin-right:20px;">
|
|
|
+ end-placeholder="结束日期" :picker-options="pickerOptions" size="medium">
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
|
|
|
@@ -120,30 +126,6 @@
|
|
|
|
|
|
<order-detail ref="orderDetail" :orderOperate="optionData" />
|
|
|
|
|
|
- <el-dialog title="添加供货商" :visible.sync="addPop" width="600px" center :close-on-click-modal="false">
|
|
|
- <div>
|
|
|
- <div class="accounts-list">
|
|
|
- 名称
|
|
|
- <el-input style="width: 80%" v-model="name"></el-input>
|
|
|
- </div>
|
|
|
- <div class="accounts-list">
|
|
|
- 所在地
|
|
|
- <div class="accounts-center">
|
|
|
- <el-button :type="location == 0?'primary':''" @click="location=0" size="small">上游</el-button>
|
|
|
- <el-button :type="location == 1?'primary':''" @click="location=1" size="small">本地</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="accounts-list" style="margin-top:20px;">
|
|
|
- <span></span>
|
|
|
- <div class="accounts-center">
|
|
|
- <el-button @click="resetAdd()">取消</el-button>
|
|
|
- <el-button type="primary" @click="confirmAdd()" style="margin-left:80px;">确认</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -188,7 +170,11 @@ export default {
|
|
|
startTime:'',
|
|
|
endTime:'',
|
|
|
searchTime:'',
|
|
|
+ name:'',
|
|
|
currentDateList:[],
|
|
|
+ staffList:[],
|
|
|
+ currentCgStaffName:'',
|
|
|
+ currentCgStaffId:0,
|
|
|
pickerOptions: {
|
|
|
shortcuts: [{
|
|
|
text: '最近一周',
|
|
|
@@ -233,10 +219,32 @@ export default {
|
|
|
that.$router.push({path:'/in/add',query})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.itemSearchRef.focus()
|
|
|
+ })
|
|
|
+
|
|
|
+ that.$service.shopAdmin.getAllStaff().then(res => {
|
|
|
+ that.staffList = res.list
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCgStaff(e){
|
|
|
+ this.currentCgStaffId = e
|
|
|
+ this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
+ },
|
|
|
+ changeSearch(){
|
|
|
+ let that = this
|
|
|
+ if(this.T != null){
|
|
|
+ clearTimeout(this.T)
|
|
|
+ }
|
|
|
+ this.T = setTimeout(function(){
|
|
|
+ that.app.refresh({ status: that.tabIndex,searchTime:that.searchTime,startTime:that.startTime,endTime:that.endTime,search:that.searchContent,cgStaffId:that.currentCgStaffId})
|
|
|
+ },700)
|
|
|
+ },
|
|
|
exportData(){
|
|
|
- this.$service.purchaseOrder.getOrderList({status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.searchContent,export:1,pageSize:9999999}).then(res => {
|
|
|
+ this.$service.purchaseOrder.getOrderList({status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,export:1,pageSize:9999999}).then(res => {
|
|
|
if(res.file){
|
|
|
window.location.href = res.file
|
|
|
}
|
|
|
@@ -246,17 +254,12 @@ export default {
|
|
|
this.$prompt('请输入货位号','提示',{confirmButtonText:'确定',cancelButtonText:'取消'}).then(({value}) => {
|
|
|
this.$service.purchaseOrder.modifySeatSn({ seatSn: value,id:info.id}).then(data => {
|
|
|
this.$notify({ title: '成功', message: '操作成功', type: 'success'})
|
|
|
- this.app.refresh({ status: this.tabIndex})
|
|
|
+ this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
confirmAdd(){
|
|
|
|
|
|
- },
|
|
|
- resetAdd(){
|
|
|
- this.addPop = false
|
|
|
- this.location = 0
|
|
|
- this.name = ''
|
|
|
},
|
|
|
addGhs(){
|
|
|
let query = {}
|
|
|
@@ -339,7 +342,7 @@ export default {
|
|
|
this.$confirm('确认取消?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
|
this.$service.purchaseOrder.cancelOrder({id:item.id}).then(data => {
|
|
|
this.$notify({ title: '已取消', message: '操作成功', type: 'success'})
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.searchContent})
|
|
|
+ this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -350,7 +353,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeTab(tab, e) {
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.searchContent});
|
|
|
+ this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId});
|
|
|
},
|
|
|
getSearchDate(){
|
|
|
if (this.$util.isEmpty(this.currentDateList)) {
|
|
|
@@ -362,7 +365,7 @@ export default {
|
|
|
this.startTime = this.currentDateList[0]
|
|
|
this.endTime = this.currentDateList[1]
|
|
|
}
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.searchContent})
|
|
|
+ this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
@@ -381,6 +384,15 @@ export default {
|
|
|
if(this.$route.query.endTime){
|
|
|
this.endTime = this.$route.query.endTime
|
|
|
}
|
|
|
+
|
|
|
+ //采购人
|
|
|
+ if(this.$route.query.currentCgStaffId){
|
|
|
+ this.currentCgStaffId = this.$route.query.currentCgStaffId
|
|
|
+ }
|
|
|
+ if(this.$route.query.currentCgStaffName){
|
|
|
+ this.currentCgStaffName = this.$route.query.currentCgStaffName
|
|
|
+ }
|
|
|
+
|
|
|
ctx.service(this.$service.purchaseOrder)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
@@ -494,26 +506,17 @@ export default {
|
|
|
layout: ['slot-column-option']
|
|
|
}
|
|
|
})
|
|
|
- .set('dict', {
|
|
|
- search: {
|
|
|
- keyWord: 'name'
|
|
|
- }
|
|
|
- })
|
|
|
- .set('search', {
|
|
|
- key: { placeholder: '核销码 / 订单号 / 供货商名称' }
|
|
|
- })
|
|
|
.set('layout', [
|
|
|
['slot-tabs'],
|
|
|
- ['slot-search-option','search-key','slot-new-cg','flex1','slot-export-order'],
|
|
|
+ ['slot-search-option','slot-new-cg','flex1','slot-export-order'],
|
|
|
['data-table'],
|
|
|
['flex1', 'pagination']
|
|
|
])
|
|
|
.on('refresh', async (params, { next }) => {
|
|
|
- let asset = await next(params);
|
|
|
- this.searchContent = params.name?params.name:''
|
|
|
+ let asset = await next(params)
|
|
|
})
|
|
|
.done();
|
|
|
- app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.searchContent})
|
|
|
+ app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
}
|
|
|
}
|
|
|
};
|