{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/order/pay.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/views/order/pay.vue","mtime":1755072409180},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\nimport uploadFilePicMul from '@/components/base/uploadFilePicMul';\n\nimport { orderDetailApi, orderOfflineApi, orderOfflineReceivedApi } from '@/api/order';\nimport { expressAllApi, exportTempApi } from '@/api/logistics';\nimport { checkPermi } from '@/utils/permission'; // 权限判断函数\nimport { Debounce } from '@/utils/validate';\nconst validatePhone = (rule, value, callback) => {\n  if (!value) {\n    return callback(new Error('请填写手机号'));\n  } else if (!/^1[3456789]\\d{9}$/.test(value)) {\n    callback(new Error('手机号格式不正确!'));\n  } else {\n    callback();\n  }\n};\nexport default {\n  components: { uploadFilePicMul },\n  name: 'orderSend',\n  props: {\n    dataOne: Object,\n    title: {\n      type: String,\n      default: '线下支付确认',\n    },\n  },\n  watch: {\n    modals: {\n      handler(newVal, oldVal) {\n        if (newVal) {\n          this.getDetail(this.dataOne.orderNo);\n        }\n      },\n      deep: true,\n    },\n  },\n  data() {\n    return {\n      formItem: { fileList:[]},\n      modals: false,\n    };\n  },\n\n  created() {},\n  computed: {\n    isPay() {\n      return this.title === 'pay';\n    },\n  },\n  methods: {\n\n    getDetail(id) {\n      orderDetailApi(id)\n        .then((res) => {\n          this.formItem = {\n            ...res,\n\n            fileList: res.fileList || [],\n          };\n        })\n        .catch(() => {\n          this.formItem = {fileList:[]};\n        });\n    },\n    putSend() {\n      const tfl=this.$refs.uploadfile.fileList\n\n      console.log('xxxxxx', tfl, this.isPay);\n      if (!this.isPay && (tfl.length == 0||tfl.filter(ex=>ex.status===true).length==0)) {\n        this.$message.error('请上传凭证');\n        return false;\n      }\n      if (this.isPay) {\n        orderOfflineApi({\n          merMsg: this.formItem.merMsg,\n          orderNo: this.dataOne.orderNo,\n          fileList:tfl.map(ex=>({fileName:ex.name,fileUrl:ex.url})) ,\n        })\n        .then((res) => {\n          this.$message.success('操作成功');\n          this.$emit('refresh');\n          this.modals = false;\n        })\n        .catch(() => {\n          this.modals = false;\n        });\n      } else {\n        orderOfflineReceivedApi({\n        merMsg: this.formItem.merMsg,\n        orderNo: this.dataOne.orderNo,\n        fileList:tfl.map(ex=>({fileName:ex.name,fileUrl:ex.url})) ,\n      })\n        .then((res) => {\n          this.$message.success('操作成功');\n          this.$emit('refresh');\n          this.modals = false;\n        })\n        .catch(() => {\n          this.modals = false;\n        });\n      }\n      \n    },\n    handleSubmit(name) {\n      this.modals = false;\n    },\n    uploadSuccess(list) {\n      this.$set(this.formItem, 'fileList', list);\n    },\n\n    cancel(name) {\n      this.modals = false;\n    },\n  },\n};\n",null]}