|
@@ -163,28 +163,51 @@ import dialogTemplate from "@/components/dialogTemplate/index";
|
|
|
this.$emit('onSuccess')
|
|
|
},
|
|
|
onCheck () {
|
|
|
- this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '审核'?this.$t('反审核'):this.$t('审核')}${this.$t(`该发货单`)}`, this.$t('提示'), {
|
|
|
- confirmButtonText: this.$t('确定'),
|
|
|
- cancelButtonText: this.$t('取消'),
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": this.mainData.status === '审核'?20221114135703:20221114135603,
|
|
|
- "version":1,
|
|
|
- "content": {
|
|
|
+ if (this.mainData.status == '审核'){
|
|
|
+ this.$prompt(this.$t('反审核原因'), this.$t('确定反审核该发货单吗?'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ }).then(async ({ value }) => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221114135703,
|
|
|
+ "content": {
|
|
|
+ "sa_dispatchid": this.$route.query.id,
|
|
|
+ "uncheckreason":value
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: this.$t('取消')
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '审核'?this.$t('反审核'):this.$t('审核')}${this.$t(`该发货单`)}`, this.$t('提示'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": this.mainData.status === '审核'?20221114135703:20221114135603,
|
|
|
+ "version":1,
|
|
|
+ "content": {
|
|
|
"sa_dispatchid":this.$route.query.id
|
|
|
- }
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.queryMainData()
|
|
|
- this.$refs.product && this.$refs.product.listData()
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: this.$t('已取消')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ this.$refs.product && this.$refs.product.listData()
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: this.$t('已取消')
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
onReCheck() {
|
|
|
this.$confirm(`${this.$t(`确定`)}${this.mainData.status === '复核'?this.$t('反复核'):this.$t('复核')}${this.$t(`该发货单`)}`, this.$t('提示'), {
|