|
|
|
@ -192,6 +192,15 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="busQuery.limit"
|
|
|
|
|
@current-change="loadBussinessTypeList"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="busTotal"
|
|
|
|
|
:current-page="busQuery.page"
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -217,7 +226,7 @@
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="addUserQuery.limit"
|
|
|
|
|
@current-change="loadUserList"
|
|
|
|
|
@current-change="getAddUserList"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="addUserTotal"
|
|
|
|
|
:current-page="addUserQuery.page"
|
|
|
|
@ -257,6 +266,15 @@
|
|
|
|
|
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="bussinessTypeQuery.limit"
|
|
|
|
|
@current-change="addBussinessType"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="bussinessTypeTotal"
|
|
|
|
|
:current-page="bussinessTypeQuery.page"
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
|
|
|
|
|
>取消
|
|
|
|
@ -868,24 +886,15 @@ export default {
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
},
|
|
|
|
|
loadLinkData(row) {
|
|
|
|
|
let query = {
|
|
|
|
|
code: row.code
|
|
|
|
|
};
|
|
|
|
|
this.currentCode = row.code;
|
|
|
|
|
this.currentRow = row;
|
|
|
|
|
//加载用户数据
|
|
|
|
|
warehouseUserList(query).then((res) => {
|
|
|
|
|
this.userData = res.data;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("用户数据加载失败");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//加载单据类型数据
|
|
|
|
|
warehouseBussinessTypeList(query).then((res) => {
|
|
|
|
|
this.bussinessTypeData = res.data;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("单据类型数据加载失败");
|
|
|
|
|
});
|
|
|
|
|
this.userQuery.code = this.currentCode;
|
|
|
|
|
this.userQuery.page = 1;
|
|
|
|
|
this.busQuery.code = this.currentCode;
|
|
|
|
|
this.busQuery.page = 1;
|
|
|
|
|
this.loadUserList();
|
|
|
|
|
this.loadBussinessTypeList();
|
|
|
|
|
},
|
|
|
|
|
getAddUserList(val) {
|
|
|
|
|
this.addUserQuery.page = val;
|
|
|
|
@ -908,10 +917,14 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addUser() {
|
|
|
|
|
addUser(val) {
|
|
|
|
|
if (this.currentCode == null || this.currentCode == "") {
|
|
|
|
|
this.$message.error("请先选择仓库");
|
|
|
|
|
} else {
|
|
|
|
|
if (val === null || val === undefined) {
|
|
|
|
|
this.addUserQuery.page = 1;
|
|
|
|
|
this.addUserTotal = 0;
|
|
|
|
|
}
|
|
|
|
|
this.userFormVisible = true;
|
|
|
|
|
this.getAddUserList(1);
|
|
|
|
|
}
|
|
|
|
@ -920,15 +933,27 @@ export default {
|
|
|
|
|
loadUserList(val) {
|
|
|
|
|
if (val != null) {
|
|
|
|
|
this.userQuery.page = val;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
//加载用户数据
|
|
|
|
|
warehouseUserList(this.userQuery).then((res) => {
|
|
|
|
|
this.userData = res.data.list;
|
|
|
|
|
this.userTotal = res.data.total;
|
|
|
|
|
this.userData = res.data.list || [];
|
|
|
|
|
this.userTotal = res.data.total || 0;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("用户数据加载失败")
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
loadBussinessTypeList(val) {
|
|
|
|
|
if (val != null) {
|
|
|
|
|
this.busQuery.page = val;
|
|
|
|
|
}
|
|
|
|
|
//加载单据类型数据
|
|
|
|
|
warehouseBussinessTypeList(this.busQuery).then((res) => {
|
|
|
|
|
this.bussinessTypeData = res.data.list || [];
|
|
|
|
|
this.busTotal = res.data.total || 0;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("单据类型数据加载失败");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleUserSelectionChange(row) {
|
|
|
|
|
let _this = this;
|
|
|
|
|
_this.selectUserList = [];
|
|
|
|
@ -958,27 +983,25 @@ export default {
|
|
|
|
|
let loadParam = {
|
|
|
|
|
code: this.currentCode
|
|
|
|
|
};
|
|
|
|
|
//重新加载数据
|
|
|
|
|
warehouseUserList(loadParam).then((res) => {
|
|
|
|
|
this.userData = res.data;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
});
|
|
|
|
|
this.loadUserList();
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("添加失败");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addBussinessType() {
|
|
|
|
|
addBussinessType(val) {
|
|
|
|
|
if (this.currentCode == null || this.currentCode == "") {
|
|
|
|
|
this.$message.error("请先选择仓库");
|
|
|
|
|
} else {
|
|
|
|
|
this.bussinessTypeFormVisible = true;
|
|
|
|
|
let query = {
|
|
|
|
|
enabled: true,
|
|
|
|
|
customerId: this.$store.getters.customerId
|
|
|
|
|
};
|
|
|
|
|
getJoinBussinessType(query).then((res) => {
|
|
|
|
|
if (val === null || val === undefined) {
|
|
|
|
|
this.bussinessTypeQuery.page = 1;
|
|
|
|
|
} else {
|
|
|
|
|
this.bussinessTypeQuery.page = val;
|
|
|
|
|
}
|
|
|
|
|
getJoinBussinessType(this.bussinessTypeQuery).then((res) => {
|
|
|
|
|
this.selectBussinessTypeList = [];
|
|
|
|
|
this.bussinessTypeList = res.data.list;
|
|
|
|
|
this.bussinessTypeList = res.data.list || [];
|
|
|
|
|
this.bussinessTypeTotal = res.data.total || 0;
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
that.$nextTick(() => {
|
|
|
|
@ -1007,15 +1030,11 @@ export default {
|
|
|
|
|
bussinessTypes: JSON.stringify(this.selectBussinessTypeList)
|
|
|
|
|
};
|
|
|
|
|
saveWarehouseBussinessType(query).then((res) => {
|
|
|
|
|
this.$message.success("添加成功");
|
|
|
|
|
//重新加载数据表格
|
|
|
|
|
let loadParam = {
|
|
|
|
|
code: this.currentCode
|
|
|
|
|
};
|
|
|
|
|
warehouseBussinessTypeList(loadParam).then((res) => {
|
|
|
|
|
this.bussinessTypeData = res.data;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("添加成功");
|
|
|
|
|
//重新加载数据表格
|
|
|
|
|
this.loadBussinessTypeList();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|