所有涉及到产品的增加单位回显、收款计划增加金额不能为零、销售明细单未确认状态显示修改
| | |
| | | ite.number = item.number |
| | | ite.price = item.price |
| | | ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.unit = item.unit |
| | | } |
| | | }) |
| | | }, |
| | |
| | | ite.number = item.number |
| | | ite.price = item.price |
| | | ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.unit = item.unit |
| | | } |
| | | }) |
| | | }, |
| | |
| | | ite.number = "" |
| | | ite.price = 0 |
| | | ite.total = 0 |
| | | ite.unit = "" |
| | | } |
| | | }) |
| | | this.$emit("clearupProduct", this.tableList.tableData) |
| | |
| | | methods: { |
| | | setData(status) { |
| | | if (status === 0) { |
| | | this.options = ["跟进中", "失败关闭", "升级到客户", "升级到客户和销售机会"] |
| | | this.options = ["跟进中", "升级到客户", "升级到客户和销售机会", "失败关闭"] |
| | | this.value = "跟进中" |
| | | this.value1 = "跟进中" |
| | | } else if (status === 1) { |
| | | this.options = ["失败关闭", "升级到客户", "升级到客户和销售机会"] |
| | | this.options = ["升级到客户", "升级到客户和销售机会", "失败关闭"] |
| | | this.value = "失败关闭" |
| | | this.value1 = "失败关闭" |
| | | } else if (status === -1) { |
| | |
| | | " |
| | | ></el-input> |
| | | <div v-else-if="item.date"> |
| | | <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 130px"> |
| | | <el-date-picker |
| | | v-model="scope.row[item.prop]" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | size="mini" |
| | | style="width: 130px" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | <div v-else @click="delClick(scope.row)"><i class="el-icon-delete"></i></div> |
| | |
| | | // 保存 |
| | | saveClick() { |
| | | this.sumTotalAmount() |
| | | console.log(this.amount) |
| | | if (this.editConfig.title === "新建") { |
| | | if (this.principalId === 0) { |
| | | this.$message.error("请选择收款计划负责人") |
| | | } else if (this.amount === 0) { |
| | | this.$message.error("收款金额不能为0") |
| | | } else if (this.amount !== this.planAmount) { |
| | | this.$message.error("收款计划和未计划金额不一致,请重算") |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }, |
| | | droppedClick(){ |
| | | droppedClick() { |
| | | this.editConfig.visible = false |
| | | this.$parent.getData() |
| | | }, |
| | |
| | | setDate(str, monthNumber) { |
| | | console.log(str.split("-")) |
| | | let dateArr = str.split("-") |
| | | let year = parseInt(dateArr[0]) |
| | | let month = parseInt(dateArr[1]) + monthNumber |
| | | // 月份和 |
| | | let monthCount = parseInt(dateArr[1]) + monthNumber |
| | | // 年 |
| | | let year = monthCount > 12 ? parseInt(dateArr[0]) + 1 : parseInt(dateArr[0]) |
| | | // 月 |
| | | let month = monthCount > 12 ? monthCount - 12 : monthCount |
| | | // 日 |
| | | let day = parseInt(dateArr[2]) |
| | | |
| | | return year + "-" + month + "-" + day |
| | | }, |
| | | principalClick(val) { |
| | |
| | | <el-input |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && |
| | | codenumer && |
| | | (explain != '' || isIdDisabled)) |
| | | (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" |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | |
| | | <el-input v-model="editConfig.infomation.subject" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="client_name"> |
| | | <div class="custom-name"> |
| | |
| | | } |
| | | " |
| | | value-key="number" |
| | | :disabled="this.editCommonConfig.infomation.id?true:false" |
| | | :disabled="this.editCommonConfig.infomation.id ? true : false" |
| | | @select="handleSelectClient('serviceContract', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <template v-if='!this.editCommonConfig.infomation.id'> |
| | | <div class="common-select-btn" @click="selClientClick('serviceContract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.serviceContract_Number && |
| | | editConfig.infomation.serviceContract_Number.length > 0 |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('serviceContract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </template> |
| | | <template v-if="!this.editCommonConfig.infomation.id"> |
| | | <div class="common-select-btn" @click="selClientClick('serviceContract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if=" |
| | | editConfig.infomation.serviceContract_Number && |
| | | editConfig.infomation.serviceContract_Number.length > 0 |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('serviceContract')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | } |
| | | " |
| | | value-key="number" |
| | | :disabled="this.editCommonConfig.infomation.id?true:false" |
| | | :disabled="this.editCommonConfig.infomation.id ? true : false" |
| | | @select="handleSelectClient('contract', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <template v-if='!this.editCommonConfig.infomation.id'> |
| | | <div class="common-select-btn" @click="selClientClick('contract')"> |
| | | <template v-if="!this.editCommonConfig.infomation.id"> |
| | | <div class="common-select-btn" @click="selClientClick('contract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["change",'blur' ] }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }], |
| | | subject: [{ required: true, message: "请输入主题", trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | invoiceTypeId: [{ required: true, message: "请选择票据类型", trigger: "change" }], |
| | |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | SalesDetailsId: this.editCommonConfig.infomation.id, |
| | | serviceContractId: this.editCommonConfig.infomation.id, |
| | | tableData: [] |
| | | tableData: [], |
| | | productId: 1, |
| | | isNoProduct: true |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$store.dispatch("geSalesDetails") |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo(); |
| | | this.formInfo() |
| | | }, |
| | | watch:{ |
| | | 'editCommonConfig.visible'(val){ |
| | | if(val){ |
| | | watch: { |
| | | "editCommonConfig.visible"(val) { |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | | this.objCode.type='销售发票编码' |
| | | this.objCode.codeStandID = '' |
| | | if(this.editConfig.infomation.codeStandID){ |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID; |
| | | formInfo() { |
| | | this.objCode.type = "销售发票编码" |
| | | this.objCode.codeStandID = "" |
| | | if (this.editConfig.infomation.codeStandID) { |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID |
| | | } |
| | | this.getRCodeStandardList(); |
| | | this.getRCodeStandardList() |
| | | }, |
| | | getCommonData() { |
| | | getAllData().then((res) => { |
| | |
| | | this.getInvoiceTypeList() |
| | | this.getInvoiceStatusList() |
| | | this.getCourierCompanyList() |
| | | this.$set(this.editConfig.infomation,'serviceContract_Number',this.editCommonConfig.infomation.keyword) |
| | | this.$set(this.editConfig.infomation,'contract_number',this.editCommonConfig.infomation.keyword) |
| | | this.$set(this.editConfig.infomation, "serviceContract_Number", this.editCommonConfig.infomation.keyword) |
| | | this.$set(this.editConfig.infomation, "contract_number", this.editCommonConfig.infomation.keyword) |
| | | }, |
| | | async getInvoiceTypeList() { |
| | | const res=await getInvoiceTypeList() |
| | | if (res.code == 200) { |
| | | this.invoiceTypeOptions = res.data.data |
| | | } |
| | | const res = await getInvoiceTypeList() |
| | | if (res.code == 200) { |
| | | this.invoiceTypeOptions = res.data.data |
| | | } |
| | | }, |
| | | async getInvoiceStatusList() { |
| | | const res=await getInvoiceStatusList() |
| | | if (res.code == 200) { |
| | | this.invoiceStatusOptions = res.data.data |
| | | } |
| | | const res = await getInvoiceStatusList() |
| | | if (res.code == 200) { |
| | | this.invoiceStatusOptions = res.data.data |
| | | } |
| | | }, |
| | | async getCourierCompanyList() { |
| | | const res=await getCourierCompanyList() |
| | | if (res.code == 200) { |
| | | this.courierCompanyOptions = res.data.data |
| | | } |
| | | const res = await getCourierCompanyList() |
| | | if (res.code == 200) { |
| | | this.courierCompanyOptions = res.data.data |
| | | } |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | |
| | | products: this.tableData, |
| | | sourceId: this.editConfig.sourceType === 1 ? this.SalesDetailsId : this.serviceContractId, |
| | | sourceType: this.editConfig.sourceType, |
| | | number:data.number || "", |
| | | number: data.number || "", |
| | | subject: data.subject || "", |
| | | taxpayerIdNumber: data.taxpayerIdNumber || "" |
| | | } |
| | |
| | | <el-input |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && |
| | | codenumer && |
| | | (explain != '' || isIdDisabled)) |
| | | (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" |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur","change"] }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | quotationName: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }], |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | } else { |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | this.showSummary.show = true |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | this.productTableList.tableData = this.tableData |
| | |
| | | <el-input |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && |
| | | codenumer && |
| | | (explain != '' || isIdDisabled)) |
| | | (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" |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | |
| | | import { getAddSalesRefund, getUpdateSalesRefund } from "@/api/sales/refundForm" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import {getBankAccountList, getPaymentTypeList} from "@/api/common/payment" |
| | | import { getBankAccountList, getPaymentTypeList } from "@/api/common/payment" |
| | | import codeMixin from "@/components/makepager/mixin/codeMixin" |
| | | import { getSalesReturnList } from "@/api/sales/salesReturn" |
| | | import { mapActions } from "vuex" |
| | |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }] |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getReturnListFliter"]), |
| | |
| | | this.getBankAccountList() |
| | | }, |
| | | async getCommonData() { |
| | | const res=await getAllData() |
| | | if(res.code==200){ |
| | | this.memberOptions = res.data.member? res.data.member:[] |
| | | const res = await getAllData() |
| | | if (res.code == 200) { |
| | | this.memberOptions = res.data.member ? res.data.member : [] |
| | | } |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.$set(this.editConfig.infomation, "memberId", this.editConfig.infomation.memberId) |
| | | this.getPaymentTypeList() |
| | | }, |
| | | getPaymentTypeList() { |
| | | getPaymentTypeList().then(res=>{ |
| | | getPaymentTypeList().then((res) => { |
| | | if (res.code === 200) { |
| | | this.paymentTypeListOptions = res.data.data ?? [] |
| | | } |
| | | this.$set(this.editConfig.infomation,'paymentTypeId',this.editConfig.infomation.paymentTypeId) |
| | | this.$set(this.editConfig.infomation, "paymentTypeId", this.editConfig.infomation.paymentTypeId) |
| | | }) |
| | | }, |
| | | getBankAccountList() { |
| | | getBankAccountList().then(res=>{ |
| | | getBankAccountList().then((res) => { |
| | | if (res.code === 200) { |
| | | this.accountOptions = res.data.data? res.data.data:[] |
| | | this.accountOptions = res.data.data ? res.data.data : [] |
| | | } |
| | | this.$set(this.editConfig.infomation,'bankAccountId',this.editConfig.infomation.bankAccountId) |
| | | this.$set(this.editConfig.infomation, "bankAccountId", this.editConfig.infomation.bankAccountId) |
| | | }) |
| | | }, |
| | | // 保存 |
| | |
| | | reason: data.reason || "", |
| | | refundDate: data.refundDate || "", |
| | | sourceId: this.sourceId || 0, |
| | | sourceType: 1, |
| | | sourceType: 1 |
| | | } |
| | | } |
| | | return params |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | } else { |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | this.showSummary.show = true |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | this.productTableList.tableData = this.tableData |
| | |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.tableData.map((item) => { |
| | | this.amountTotal += item.total |
| | | this.selProductData.map((item) => { |
| | | this.amountTotal += parseFloat(item.total) |
| | | }) |
| | | let config = { |
| | | amountTotal: this.amountTotal, |
| | |
| | | { label: "产品名称", prop: "name", isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price" }, |
| | | { label: "价税合计", prop: "total" } |
| | | ] |
| | |
| | | data() { |
| | | // 产品信息 |
| | | const productColumn = [ |
| | | { label: "产品编号", prop: "Id", default: true }, |
| | | { label: "产品名称", prop: "Name" }, |
| | | { label: "数量", prop: "Amount" }, |
| | | { label: "单位", prop: "Unit" }, |
| | | { label: "发货单", prop: "shipOrder" }, |
| | | { label: "产品编号", prop: "id", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "数量", prop: "amount" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "发货单", prop: "invoice" }, |
| | | { label: "承运商", prop: "carrier" }, |
| | | { label: "运单号", prop: "waybillNumber" }, |
| | | { label: "销售单价", prop: "SalePrice", price: true }, |
| | | { label: "价税合计", prop: "Valorem", price: true } |
| | | { label: "销售单价", prop: "salePrice", price: true }, |
| | | { label: "价税合计", prop: "valorem", price: true } |
| | | ] |
| | | // 库存信息 |
| | | const inventoryColumn = [ |
| | | { label: "产品编号", prop: "Id", default: true }, |
| | | { label: "产品名称", prop: "Name" }, |
| | | { label: "订单数量", prop: "OrderAmount" }, |
| | | { label: "仓库", prop: "Warehouse" }, |
| | | { label: "在库数量", prop: "Amount" }, |
| | | { label: "可用库存", prop: "AvailableNumber" }, |
| | | { label: "单位", prop: "Unit" } |
| | | { label: "产品编号", prop: "id", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "订单数量", prop: "orderAmount" }, |
| | | { label: "仓库", prop: "warehouse" }, |
| | | { label: "在库数量", prop: "amount" }, |
| | | { label: "可用库存", prop: "availableNumber" }, |
| | | { label: "单位", prop: "unit" } |
| | | ] |
| | | // 制造信息 |
| | | const makeColumn = [ |
| | | { label: "生产订单", prop: "OrderId", default: true }, |
| | | { label: "产品名称", prop: "ProductName" }, |
| | | { label: "订单状态", prop: "OrderStatus" }, |
| | | { label: "工单编号", prop: "WorkOrderId" }, |
| | | { label: "工单状态", prop: "WorkOrderStatus" }, |
| | | { label: "计划开始时间", prop: "StartTime" }, |
| | | { label: "计划结束时间", prop: "EndTime" } |
| | | { label: "生产订单", prop: "orderId", default: true }, |
| | | { label: "产品名称", prop: "productName" }, |
| | | { label: "订单状态", prop: "orderStatus" }, |
| | | { label: "工单编号", prop: "workOrderId" }, |
| | | { label: "工单状态", prop: "workOrderStatus" }, |
| | | { label: "计划开始时间", prop: "startTime" }, |
| | | { label: "计划结束时间", prop: "endTime" } |
| | | ] |
| | | return { |
| | | tableList: {}, |
| | |
| | | show: false, |
| | | sumProp: [ |
| | | "receiveTotalAmount", |
| | | "total", |
| | | "amountTotal", |
| | | "amountReceivable", |
| | | "invoicedAmount", |
| | | "uninvoicedAmount", |
| | |
| | | { label: "签约日期", prop: "signTime" }, |
| | | { label: "交付日期", prop: "deliveryDate" }, |
| | | { label: "订单来源", prop: "source" }, |
| | | { label: "合计", prop: "total", price: true }, |
| | | { label: "合计", prop: "amountTotal", price: true }, |
| | | { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getStatus } |
| | | ], |
| | | showCol: ["订单编号", "销售负责人", "签约日期", "交付日期", "订单来源", "合计", "状态"], |
| | |
| | | if (res.data.count > 0) { |
| | | this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {} |
| | | let row = this.tableList.tableInfomation[0] |
| | | this.getProductInventoryInfo(row.number) |
| | | this.getProductInventoryInfo(row) |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | |
| | | }) |
| | | }, |
| | | // 获取产品/库存信息 |
| | | async getProductInventoryInfo(number) { |
| | | await getProductInventoryInfo(number).then((res) => { |
| | | console.log(res) |
| | | this.productTableList.tableInfomation = res.data |
| | | }) |
| | | async getProductInventoryInfo(row) { |
| | | console.log(row.status, "状态", row) |
| | | if (row.status === 1) { |
| | | this.productTableList.tableInfomation = row.products |
| | | } else { |
| | | await getProductInventoryInfo(row.number).then((res) => { |
| | | console.log(res) |
| | | this.productTableList.tableInfomation = res.data |
| | | }) |
| | | } |
| | | }, |
| | | // 获取制造信息 |
| | | async getProductOrderInfo(number) { |
| | |
| | | this.tableBottomColumn = this.productColumn |
| | | this.showBottomCol = this.showProductCol |
| | | this.setBottomList() |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } else if (this.TabsIndex == 1) { |
| | | this.isClickProduct = false |
| | | this.isClickInventory = true |
| | |
| | | this.tableBottomColumn = this.inventoryColumn |
| | | this.showBottomCol = this.showInventoryCol |
| | | this.setBottomList() |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } else if (this.TabsIndex == 2) { |
| | | this.isClickProduct = false |
| | | this.isClickInventory = false |
| | |
| | | console.log(row, column, event) |
| | | this.selectRow = row |
| | | if (this.TabsIndex == 0) { |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } else if (this.TabsIndex == 1) { |
| | | this.getProductInventoryInfo(this.selectRow.number) |
| | | this.getProductInventoryInfo(this.selectRow) |
| | | } else if (this.TabsIndex == 2) { |
| | | this.getProductOrderInfo(this.selectRow.number) |
| | | } |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | <el-input |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && |
| | | codenumer && |
| | | (explain != '' || isIdDisabled)) |
| | | (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" |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | master_order_number: [{ required: true, message: "请选择或创建销售总单", trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择", trigger: "change" }] |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.$set(this.editConfig.infomation, "memberId", this.editConfig.infomation.memberId) |
| | | this.dataProcess() |
| | | } |
| | | }) |
| | |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | | product: this.tableData, |
| | | codeStandID: data.ID, |
| | | codeStandID: data.ID |
| | | } |
| | | return params |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | } else { |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | this.showSummary.show = true |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | this.productTableList.tableData = this.tableData |
| | |
| | | <el-input |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && |
| | | codenumer && |
| | | (explain != '' || isIdDisabled)) |
| | | (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" |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <!-- <WordInput |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur",'change'] }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | signTime: [{ required: true, message: "请选择", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.memberOptions = res.data.member |
| | | this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) |
| | | this.$set(this.editConfig.infomation, "memberId", this.editConfig.infomation.memberId) |
| | | this.contractTypeOptions = res.data.serviceContractType |
| | | this.$set(this.editConfig.infomation,'serviceContractTypeId',this.editConfig.infomation.serviceContractTypeId) |
| | | this.$set( |
| | | this.editConfig.infomation, |
| | | "serviceContractTypeId", |
| | | this.editConfig.infomation.serviceContractTypeId |
| | | ) |
| | | this.contractStatusOptions = res.data.serviceContractStatus |
| | | this.$set(this.editConfig.infomation,'serviceContractStatusId',this.editConfig.infomation.serviceContractStatusId) |
| | | this.$set( |
| | | this.editConfig.infomation, |
| | | "serviceContractStatusId", |
| | | this.editConfig.infomation.serviceContractStatusId |
| | | ) |
| | | // this.currencyOptions = res.data.currency |
| | | } |
| | | }) |
| | |
| | | typeId: 0, |
| | | serviceContractTypeId: data.serviceContractTypeId || 0, |
| | | serviceContractStatusId: data.serviceContractStatusId || 0, |
| | | codeStandID: data.ID, |
| | | codeStandID: data.ID |
| | | } |
| | | return params |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | } else { |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | this.showSummary.show = true |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | | ] |
| | | this.productTableList.tableData = this.tableData |