| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="30%" |
| | | size="mini" |
| | | style="height: 60vh; overflow-x: hidden" |
| | | > |
| | |
| | | <el-form-item label="客户名称" prop="client_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | style="width:100%;" |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('client')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | <div |
| | | v-if="editConfig.infomation.client_name && editConfig.infomation.client_name.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('client')" |
| | | > |
| | | <i class="el-icon-remove-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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" style="width:100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会" prop="saleChanceId"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | style="width:100%" |
| | | v-model="editConfig.infomation.sale_chance_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('chance')"> |
| | | <i class="el-icon-edit-outline"></i> |
| | | <div |
| | | v-if="editConfig.infomation.sale_chance_name && editConfig.infomation.sale_chance_name.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('chance')" |
| | | > |
| | | <i class="el-icon-remove-outline"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width:100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售负责人" prop="memberId"> |
| | | <el-select |
| | | |
| | | v-model="editConfig.infomation.memberId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width:100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | <el-input v-model="editConfig.infomation.phone"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="收货地址" prop="address"> |
| | | <el-input |
| | | style="width:100%" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | | v-model="editConfig.infomation.address" |
| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="条款与条件" prop="conditions"> |
| | | <el-form-item label="条款与条件" prop="conditions" label-width="15%"> |
| | | <el-input |
| | | style="width:100%;" |
| | | type="textarea" |
| | | :autosize="{ minRows: 4 }" |
| | | v-model="editConfig.infomation.conditions" |
| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-form-item label="备注" prop="remark" label-width="15%"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2 }" |
| | |
| | | :edit-common-config="editSelectChanceConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 新建 收款计划 --> |
| | | <AddCollectionPlan v-if="addCollectionConfig.visible" :edit-common-config="addCollectionConfig" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAddSalesDetails, getUpdateSalesDetails } from "@/api/sales/salesDetails" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan" |
| | | export default { |
| | | name: "AddSalesDetailsDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan }, |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "60%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId, |
| | | productId: 1, |
| | | isNoProduct: true |
| | | isNoProduct: true, |
| | | addCollectionConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | amountTotal: 0 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | this.tableData.map((item) => { |
| | | this.amountTotal += item.total |
| | | }) |
| | | let config = { |
| | | amountTotal: this.amountTotal, |
| | | id: res.data.id |
| | | } |
| | | this.$emit("addCollectionPlanClick", config) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | signTime: data.signTime || "", |
| | | wechatOrderStatus: data.wechatOrderStatus || 0, |
| | | logisticCompany: data.logisticCompany || "", |
| | | logisticCost: parseInt(data.logisticCost) || 0, |
| | | logisticCost: data.logisticCost || 0, |
| | | logisticNumber: data.logisticNumber || "" |
| | | } |
| | | let params = {} |
| | |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | } |
| | | }, |
| | | selClientClick(value) { |
| | |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {}, |
| | | setTableForm() { |
| | | if (this.editConfig.title === "新建") { |
| | | if (this.editConfig.title === "新建" || this.editConfig.infomation.products.length === 0) { |
| | | this.tableData = [ |
| | | { |
| | | productId: this.productId, |
| | |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "销售单价", prop: "price", inputFloat: true }, |
| | | { label: "销售单价", prop: "price",inputFloat: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | | } |
| | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .iframe-dialog .el-dialog__body { |
| | | .el-form{ |
| | | .el-form-item{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | .basic-info { |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |