| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单据编号" prop="number"> |
| | | <!-- <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> --> |
| | | <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"> |
| | |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="发货日期" prop="sendTime"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.sendTime" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | import { getAddContract, getUpdateContract } from "@/api/sales/contractManage" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import codeMixin from "@/components/makepager/mixin/codeMixin" |
| | | import { getQuotationList } from "@/api/sales/quotation" |
| | | export default { |
| | | name: "AddContractManageDialog", |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.checkCode, 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, message: "请选择", trigger: "change" }], |
| | | contractName: [{ required: true, message: "请输入合同名称", trigger: "blur" }], |
| | | quotation_number: [{ required: true, message: "请选择销售报价单", trigger: "change" }] |
| | | }, |
| | | memberOptions: [], |
| | | statusOptions: [], // 合同状态 |
| | |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | // this.$store.dispatch("geQuotation") |
| | | if (this.editConfig.title !== "新建") { |
| | | this.isAddQuatation = false |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | }, |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddContract(params).then((res) => { |
| | | console.log(res) |
| | |
| | | quotation_id: this.quotationId || 0, |
| | | status_id: data.statusId || 0, |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | sendTime: data.sendTime || "" |
| | | } |
| | | return params |
| | | }, |
| | |
| | | } else if (value === "quotation") { |
| | | this.editSelCommonConfig.title = "报价单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.clientId = this.clientId |
| | | this.editSelCommonConfig.tableInfomation = [...this.quotationList] |
| | | } |
| | | }, |
| | |
| | | } else { |
| | | this.unflodCollapseStr = "收起" |
| | | this.isUnflod = true |
| | | } |
| | | }, |
| | | // 订单编码单独校验 |
| | | checkCode(rule, value, callback) { |
| | | if (this.editConfig.infomation.number && this.editConfig.infomation.number.length > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请输入单据编号")) |
| | | } |
| | | } |
| | | } |