| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | <!-- <el-input v-model="editConfig.infomation.number"></el-input> --> |
| | | <el-input |
| | | style="width: 85%" |
| | | v-if=" |
| | | editConfig.title == '修改' || |
| | | (editConfig.title == '新建' && codenumer && (explain != '' || isIdDisabled)) |
| | | " |
| | | :disabled="editConfig.title != '新建'" |
| | | v-model="editConfig.infomation.number" |
| | | placeholder="请输入编码" |
| | | > |
| | | </el-input> |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c; width: 85%" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | style="width: 63%" |
| | | > |
| | | <el-option |
| | | v-for="item in memberOptions" |
| | | :key="item.id" |
| | | v-for="(item, index) in memberOptions" |
| | | :key="index" |
| | | :label="item.username" |
| | | :value="item.userName" |
| | | > |
| | |
| | | createContract, |
| | | updateSupplier, |
| | | getIndustryList, |
| | | getSupplierTypeList, |
| | | getSupplierTypeList |
| | | // downloadContract |
| | | // previewContract |
| | | } from "@/api/supplierManage/supplier" |
| | |
| | | import download from "downloadjs" |
| | | // import { renderAsync } from "docx-preview" |
| | | import axios from "axios" |
| | | import codeMixin from "@/components/mixin/codeMixin" |
| | | export default { |
| | | name: "AddSupplierDialog", |
| | | mixins: [codeMixin], |
| | | props: { |
| | | addCommonConfig: { |
| | | type: Object, |
| | |
| | | components: { EditDropdownDialog }, |
| | | computed: { |
| | | headers() { |
| | | const authorization = "Bearer "+document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1")|| '' |
| | | const authorization = |
| | | "Bearer " + document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1") || "" |
| | | return { authorization } |
| | | } |
| | | }, |
| | |
| | | message: "请输入正确的邮箱格式", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | ], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }] |
| | | }, |
| | | supplierTypeOptions: [{ id: 1, name: "供应商类型1" }], // 供应商类型 |
| | | industryOptions: [{ id: 1, name: "所属行业1" }], // 所属行业 |
| | |
| | | if (this.editConfig.title === "修改") { |
| | | // this.previewContract() |
| | | } |
| | | this.formInfo() |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | | this.objCode.type = "供应商编码" |
| | | this.objCode.codeStandID = "" |
| | | if (this.editConfig.infomation.codeStandardID) { |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandardID |
| | | } |
| | | this.getRCodeStandardList() |
| | | }, |
| | | // 销售负责人 |
| | | async getMemberList() { |
| | | await getMemberListFromGrpc({ |
| | |
| | | detailAddress: data.detailAddress || "", |
| | | email: data.email || "", |
| | | fileId: this.file_id || 0, |
| | | id: data.ID || 0, |
| | | id: data.id || 0, |
| | | industry: data.industry || "", |
| | | name: data.name || "", |
| | | number: data.number || "", |
| | | phone: data.phone || "", |
| | | responsiblePersonName: data.responsiblePersonName || document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1"), |
| | | responsiblePersonName: |
| | | data.responsiblePersonName || document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1"), |
| | | status: data.status || 0, |
| | | supplierType: data.supplierType || "", |
| | | url: data.url || "" |
| | |
| | | // window.open(routeUrl.href, "_blank") |
| | | // } |
| | | // } |
| | | async previewClick() { |
| | | this.previewUrl = "/api/previewContract?id=" + this.file_id |
| | | if (this.file_name.includes("pdf")) { |
| | | async previewClick() { |
| | | this.previewUrl = "/api/previewContract?id=" + this.file_id |
| | | if (this.file_name.includes("pdf")) { |
| | | console.log("是pdf文件") |
| | | await axios.get(this.previewUrl, { headers: { "Authorization":"Bearer "+ document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1")} }) |
| | | .then(response => { |
| | | window.open(this.previewUrl, "_blank") |
| | | console.log("response",response,this.previewUrl) |
| | | }) |
| | | .catch(error => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | console.log(this.previewUrl,"看看是啥子") |
| | | let routeUrl = this.$router.resolve({ |
| | | path: "/PreviewFile", |
| | | query: { |
| | | //要传的参数 |
| | | previewUrl: this.previewUrl |
| | | } |
| | | }) |
| | | window.open(routeUrl.href, "_blank") |
| | | } |
| | | await axios |
| | | .get(this.previewUrl, { |
| | | headers: { |
| | | Authorization: "Bearer " + document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | } |
| | | }) |
| | | .then((response) => { |
| | | window.open(this.previewUrl, "_blank") |
| | | console.log("response", response, this.previewUrl) |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error) |
| | | }) |
| | | } else { |
| | | console.log(this.previewUrl, "看看是啥子") |
| | | let routeUrl = this.$router.resolve({ |
| | | path: "/PreviewFile", |
| | | query: { |
| | | //要传的参数 |
| | | previewUrl: this.previewUrl |
| | | } |
| | | }) |
| | | window.open(routeUrl.href, "_blank") |
| | | } |
| | | } |
| | | } |
| | | } |