| | |
| | | <!-- </el-col>--> |
| | | <el-col v-if="isUnflod" :span="12"> |
| | | <el-form-item label="单据编号" prop="number"> |
| | | <WordInput |
| | | <el-input |
| | | 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" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | |
| | | <span v-else-if="method == 0" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> |
| | | <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> --> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddMasterOrder, getUpdateMasterOrder } from "@/api/sales/masterOrder" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import WordInput from "@/components/wordInput.vue" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import codeMixin from "@/components/makepager/mixin/codeMixin" |
| | | export default { |
| | | name: "QuotationDialog", |
| | | mixins: [codeMixin], |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { WordInput, SelectClientDialog }, |
| | | components: { SelectClientDialog }, |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | client_name: [{ required: true, message: "请选择", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }] |
| | | member_id: [{ required: true, validator: this.validateMemberId, trigger: "change" }] |
| | | }, |
| | | memberOptions: [], |
| | | unflodCollapseStr: "收起", |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | if (this.editConfig.title === "新建") { |
| | | let username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | this.memberOptions.map((item) => { |
| | | if (item.username == username) { |
| | | this.editConfig.infomation.member_id = item.id |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddMasterOrder(params).then((res) => { |
| | | console.log(res) |
| | |
| | | money: data.money || 0, |
| | | number: data.number || "", |
| | | start_time: data.start_time || "", |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | codeStandID: data.ID |
| | | } |
| | | return params |
| | | }, |
| | |
| | | this.unflodCollapseStr = "收起" |
| | | this.isUnflod = true |
| | | } |
| | | }, |
| | | // 负责人自定义校验规则 |
| | | validateMemberId(rule, value, callback) { |
| | | if (this.editConfig.infomation?.member_id > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请选择负责人")) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | ::v-deep { |
| | | .iframe-dialog .el-dialog__body { |
| | | .basic-info { |
| | | min-height: 250px; |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |