Commit bd87faea by T

借用贴标-手动结束单据及bug修复

parent 2446bd55
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<a-button <a-button
type="primary" type="primary"
class="actions" class="actions"
v-if="[1].includes(scope.row.SubmitState)&&[1].includes(scope.row.IsHaoCai)" v-if="[1].includes(scope.row.SubmitState)"
ghost ghost
round round
size="small" size="small"
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
<a-button <a-button
type="primary" type="primary"
class="actions" class="actions"
v-if="[2].includes(scope.row.SubmitState)&&[1].includes(scope.row.IsHaoCai)" v-if="[2].includes(scope.row.SubmitState)"
ghost ghost
round round
size="small" size="small"
...@@ -1379,24 +1379,50 @@ export default { ...@@ -1379,24 +1379,50 @@ export default {
{ {
stateName="撤销" stateName="撤销"
} }
const url = "/api/Borrow/ChangeState" ; //console.log(row)
this.$confirm("是否"+stateName+"该操作?", "提示", { //判断是贴标的则提示手动操作的不会自动生成出入库记录
confirmButtonText: "确定", if(row.IsHaoCai==0&&(SubmitState==2||SubmitState==3)){
cancelButtonText: "取消", const url = "/api/Borrow/ChangeState" ;
type: "warning", this.$confirm("是否确认该操作? 操作贴标的装备将不会自动生成对应的出入库记录", stateName, {
}) confirmButtonText: "确定",
.then(async () => { cancelButtonText: "取消",
const { data: res } = await this.$axios.post(url,this.editForm); type: "warning",
if (res.Success === true) {
this.getQueuData();
this.$message.success("已"+stateName);
} else {
this.$message.error(res.Remark);
}
}) })
.catch((e) => { .then(async () => {
this.$message.warning("已取消"+stateName+"操作"); const { data: res } = await this.$axios.post(url,this.editForm);
}); if (res.Success === true) {
this.getQueuData();
this.$message.success("已"+stateName);
} else {
this.$message.error(res.Remark);
}
})
.catch((e) => {
this.$message.warning("已取消"+stateName+"操作");
});
}else{
const url = "/api/Borrow/ChangeState" ;
this.$confirm("是否确认该操作?", stateName, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
const { data: res } = await this.$axios.post(url,this.editForm);
if (res.Success === true) {
this.getQueuData();
this.$message.success("已"+stateName);
} else {
this.$message.error(res.Remark);
}
})
.catch((e) => {
this.$message.warning("已取消"+stateName+"操作");
});
}
}, },
///人员选择 ///人员选择
......
...@@ -1263,12 +1263,13 @@ export default { ...@@ -1263,12 +1263,13 @@ export default {
{ {
stateName="撤销" stateName="撤销"
} }
const url = "/api/Borrow/ChangeState" ;
this.$confirm("是否"+stateName+"该操作?", "提示", { const url = "/api/Borrow/ChangeState" ;
confirmButtonText: "确定", this.$confirm("是否确认该操作?", stateName, {
cancelButtonText: "取消", confirmButtonText: "确定",
type: "warning", cancelButtonText: "取消",
}) type: "warning",
})
.then(async () => { .then(async () => {
const { data: res } = await this.$axios.post(url,this.editForm); const { data: res } = await this.$axios.post(url,this.editForm);
if (res.Success === true) { if (res.Success === true) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
style="width: 205px; float: left; margin-left: 1px" style="width: 205px; float: left; margin-left: 1px"
noOptionsText="暂无数据" noOptionsText="暂无数据"
:options="departOptions" :options="departOptions"
placeholder="请选择上级部门" placeholder="请选择部门"
:normalizer="normalizer" :normalizer="normalizer"
@select="selectDepart" @select="selectDepart"
/> />
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="outInExVisible = false">取 消</el-button> <el-button @click="outInExVisible = false">取 消</el-button>
<el-button type="primary" @click="submitOutInExForm()" <el-button :subLoading="subLoading" type="primary" @click="submitOutInExForm()"
>提交</el-button >提交</el-button
> >
</span> </span>
...@@ -162,6 +162,7 @@ export default { ...@@ -162,6 +162,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
subLoading:false,
input: "", input: "",
form: {}, form: {},
DepartName:"", DepartName:"",
...@@ -338,7 +339,8 @@ export default { ...@@ -338,7 +339,8 @@ export default {
}, },
//提交异常出库 //提交异常出库
async submitOutInExForm(){ async submitOutInExForm(){
console.log('oooo') //console.log('oooo')
if(this.outInExForm.submitUsrID==''|| this.outInExForm.submitUsrID==undefined){ if(this.outInExForm.submitUsrID==''|| this.outInExForm.submitUsrID==undefined){
return this.$message.warning('请选择对应的操作人员'); return this.$message.warning('请选择对应的操作人员');
...@@ -352,13 +354,19 @@ export default { ...@@ -352,13 +354,19 @@ export default {
this.outInExForm this.outInExForm
); );
//this.getQueuData(); //this.getQueuData();
//回调上一个弹窗的查看方法toPost-刷新
this.$emit('toPost')
this.outInExVisible=false; this.outInExVisible=false;
if (res.Success !== true) return this.$message.error(res.Remark); this.subLoading=true;
if (res.Success !== true){
this.subLoading=false; return this.$message.error(res.Remark);
}
else else
{ {
this.subLoading=false;
return this.$message.success('处理成功'); return this.$message.success('处理成功');
} }
}, },
// 分页功能 // 分页功能
// 每页显示条数发生改变时 // 每页显示条数发生改变时
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</el-dialog> </el-dialog>
<!-- 表单组件-引用异常出库页面 --> <!-- 表单组件-引用异常出库页面 -->
<outinExceptionHandling ref="outinExceptionHandling" /> <outinExceptionHandling ref="outinExceptionHandling" @toPost="toPost"/>
<!-- 分页功能 --> <!-- 分页功能 -->
<el-row type="flex" justify="center" align="middle"> <el-row type="flex" justify="center" align="middle">
...@@ -370,7 +370,9 @@ export default { ...@@ -370,7 +370,9 @@ export default {
onEnterPress() { onEnterPress() {
this.getQueuData(); this.getQueuData();
}, },
async toPost(){
this.getQueuData();
},
// stateFormat(row) { // stateFormat(row) {
// if (row.Type === 0) { // if (row.Type === 0) {
// return "入库"; // return "入库";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论