|
|
@@ -63,13 +63,17 @@
|
|
|
>驳回
|
|
|
</el-button>
|
|
|
|
|
|
- <el-dropdown @command="(command) => handleCommand(command)" style="margin-left: 30px;">
|
|
|
- <span class="el-dropdown-link">更多<i class="el-icon-arrow-down el-icon--right"></i></span>
|
|
|
+ <el-dropdown
|
|
|
+ @command="(command) => handleCommand(command)"
|
|
|
+ style="margin-left: 30px"
|
|
|
+ >
|
|
|
+ <span class="el-dropdown-link"
|
|
|
+ >更多<i class="el-icon-arrow-down el-icon--right"></i
|
|
|
+ ></span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="cancel">作废</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
-
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
@@ -80,7 +84,7 @@
|
|
|
approveTaskWithVariablesAPI,
|
|
|
saleReturnUpdateAPI,
|
|
|
updateReceiptAPI,
|
|
|
- returnHandleProcessCancel,
|
|
|
+ returnHandleProcessCancel
|
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
import { EventBus } from './eventBus.js';
|
|
|
@@ -194,12 +198,17 @@
|
|
|
// 外协返修质检入库
|
|
|
async interiorStorageToOutsourcingQuality(data, pass) {
|
|
|
console.log(data);
|
|
|
- if (data.qualityInspector.qualityFile.length == 0) {
|
|
|
- return this.$message.error('请上传回执附件!');
|
|
|
- }
|
|
|
+ // if (data.qualityInspector.qualityFile.length == 0) {
|
|
|
+ // return this.$message.error('请上传回执附件!');
|
|
|
+ // }
|
|
|
let boolen = data.qualityInspectionStatus;
|
|
|
if (boolen) {
|
|
|
- await uploadQualityFile(data.qualityInspector);
|
|
|
+ if (
|
|
|
+ data.qualityInspector.qualityFile &&
|
|
|
+ data.qualityInspector.qualityFile.length > 0
|
|
|
+ ) {
|
|
|
+ await uploadQualityFile(data.qualityInspector);
|
|
|
+ }
|
|
|
approveTaskWithVariablesAPI({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
@@ -333,12 +342,17 @@
|
|
|
// 内部生产入库质检
|
|
|
async interiorProductionStorageQuality(data, pass) {
|
|
|
console.log(data);
|
|
|
- if (data.qualityInspector.qualityFile.length == 0) {
|
|
|
- return this.$message.error('请上传回执附件!');
|
|
|
- }
|
|
|
+ // if (data.qualityInspector.qualityFile.length == 0) {
|
|
|
+ // return this.$message.error('请上传回执附件!');
|
|
|
+ // }
|
|
|
let boolen = data.qualityInspectionStatus;
|
|
|
if (boolen) {
|
|
|
- await uploadQualityFile(data.qualityInspector);
|
|
|
+ if (
|
|
|
+ data.qualityInspector.qualityFile &&
|
|
|
+ data.qualityInspector.qualityFile.length > 0
|
|
|
+ ) {
|
|
|
+ await uploadQualityFile(data.qualityInspector);
|
|
|
+ }
|
|
|
approveTaskWithVariablesAPI({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
@@ -490,28 +504,31 @@
|
|
|
//更多
|
|
|
handleCommand(command) {
|
|
|
if (command === 'cancel') {
|
|
|
- this.$confirm("是否确认作废?", {
|
|
|
+ this.$confirm('是否确认作废?', {
|
|
|
type: 'warning',
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定'
|
|
|
- }).then(() => {
|
|
|
- returnHandleProcessCancel({
|
|
|
- id: this.taskId,
|
|
|
- reason: this.form.reason,
|
|
|
- businessId: this.businessId,
|
|
|
- }).then(() => {
|
|
|
- this.$emit('handleClose');
|
|
|
- }).catch(() => {
|
|
|
- this.$message.error("流程作废失败");
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ returnHandleProcessCancel({
|
|
|
+ id: this.taskId,
|
|
|
+ reason: this.form.reason,
|
|
|
+ businessId: this.businessId
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$emit('handleClose');
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error('流程作废失败');
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
+ }
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
EventBus.$off('getActiveCompValue');
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|