|
|
|
@ -91,8 +91,8 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
|
|
|
<el-button @click="handleReset">重置</el-button> |
|
|
|
<el-button type="primary" :disabled="loading" @click="handleSearch">查询</el-button> |
|
|
|
<el-button :disabled="loading" @click="handleReset">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
@ -104,6 +104,13 @@ |
|
|
|
v-loading="loading" |
|
|
|
style="width: 100%; margin-top: 10px" |
|
|
|
> |
|
|
|
<!-- 单据site是小site,只展示当前账号在登录大site下有权限的小site - rqrq --> |
|
|
|
<el-table-column |
|
|
|
prop="site" |
|
|
|
label="工厂" |
|
|
|
width="100" |
|
|
|
align="center" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="transDate" |
|
|
|
label="出入库时间" |
|
|
|
@ -256,6 +263,9 @@ export default { |
|
|
|
methods: { |
|
|
|
buildRequest() { |
|
|
|
const req = { ...this.query }; |
|
|
|
// 大site取登录工厂,账号用来限定该工厂下有权限的小site - rqrq |
|
|
|
req.site = this.$store.state.user.site || localStorage.getItem('site'); |
|
|
|
req.userName = localStorage.getItem('userName'); |
|
|
|
req.page = this.pageIndex; |
|
|
|
req.limit = this.pageSize; |
|
|
|
if(this.dateRange.startDate){ |
|
|
|
@ -275,7 +285,11 @@ export default { |
|
|
|
doSearch() { |
|
|
|
const req = this.buildRequest(); |
|
|
|
if (!req.site) { |
|
|
|
this.$message.warning("请先输入工厂编码"); |
|
|
|
this.$alert('当前工厂为空,无法查询出入库记录', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!req.userName) { |
|
|
|
this.$alert('当前账号为空,无法按小site权限查询', '错误', { confirmButtonText: '确定' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.loading = true; |
|
|
|
|