| | |
| | | <el-row> |
| | | <el-col :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"> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择合同订单 --> |
| | | <!-- 销售明细单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | // import { getProductList } from "@/api/common/other" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import codeMixin from "@/components/makepager/mixin/codeMixin" |
| | | import { getSalesDetailsList } from "@/api/sales/salesDetails" |
| | | import { mapActions } from "vuex" |
| | | |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, message: "请输入销售退货单号", trigger: "blur" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: "blur" }], |
| | | repository: [{ required: true, message: "请选择退入仓库", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择负责人", trigger: "change" }], |
| | | salesDetailNumber: [{ required: true, message: "请选择销售明细单", trigger: "change" }] |
| | |
| | | }, |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | title: "销售明细单", |
| | | infomation: {}, |
| | | clientId: "" |
| | | }, |
| | | productId: 1, |
| | | isNoProduct: true, |
| | |
| | | returnDate: data.returnDate || "", |
| | | salesReturnStatusId: data.salesReturnStatusId || 0, |
| | | sourceId: this.SalesDetailsId, |
| | | sourceType: 1 |
| | | }, |
| | | codeRule: this.codeRule |
| | | sourceType: 1, |
| | | } |
| | | } |
| | | return params |
| | | }, |
| | |
| | | }, |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.clientId = item.id |
| | | this.editSelCommonConfig.clientId = item.id |
| | | await getSalesDetailsList({ |
| | | clientId: this.clientId |
| | | }).then((res) => { |
| | | this.getSalesDetailsFliter(res.data.list) |
| | | }) |
| | | } else if (value === "contract") { |
| | | console.log(item, item.number, "选择框66") |
| | | this.productTableList.tableData = item.products |
| | | this.tableData = item.products |
| | | this.SalesDetailsId = item.id |
| | |
| | | } else if (value === "contract") { |
| | | this.editSelCommonConfig.title = "销售明细单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | // this.editSelCommonConfig.salesDetailNumber = this.editConfig.infomation.salesDetailNumber |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | | async selClient(row, value) { |
| | | console.log(row, value) |
| | | if (value === "client") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.editSelCommonConfig.clientId = row.id |
| | | await getSalesDetailsList({ |
| | | clientId: row.id |
| | | }).then((res) => { |
| | | this.getSalesDetailsFliter(res.data.list) |
| | | }) |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = row.number |
| | | this.SalesDetailsId = row.id |
| | | this.productTableList.tableData = row.products |
| | | this.tableData = row.products |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.SalesDetailsId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |