|
|
|
@ -3,339 +3,367 @@ |
|
|
|
<template #btn> |
|
|
|
<template #btn> |
|
|
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button> |
|
|
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<Descriptions |
|
|
|
<div v-if="showMergeOrder"> |
|
|
|
:title="`线索信息-${info.name}`" |
|
|
|
<div style="color: red"> |
|
|
|
:data="info" |
|
|
|
查询到该客户已有成交订单,请选择订单进行合并,不选择则生成独立订单 |
|
|
|
:schema="showSchema" |
|
|
|
</div> |
|
|
|
:columns="2" |
|
|
|
<el-radio-group v-model="mergeOrderId" style="width: 100%"> |
|
|
|
labelWidth="130px" |
|
|
|
<el-radio |
|
|
|
:defaultShow="false" |
|
|
|
v-for="item in mergeOrderList" |
|
|
|
/> |
|
|
|
:key="item.signOrderId" |
|
|
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="100px" class="mt-20px"> |
|
|
|
:label="item.signOrderId" |
|
|
|
<el-row> |
|
|
|
:value="item.signOrderId" |
|
|
|
<!-- 驾校招生模式 --> |
|
|
|
style="width: 100%; margin: 15px 0" |
|
|
|
<template v-if="appStore.getAppInfo?.instanceType == 1"> |
|
|
|
> |
|
|
|
|
|
|
|
<div class="flex justify-between"> |
|
|
|
|
|
|
|
<div class="mr-20px">订单编号:{{ item.signOrderId }}</div> |
|
|
|
|
|
|
|
<div class="mr-20px">登记时间:{{ item.dealDate }}</div> |
|
|
|
|
|
|
|
<div>线索来源:{{ item.source }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-radio> |
|
|
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
|
|
|
<Descriptions |
|
|
|
|
|
|
|
:title="`线索信息-${info.name}`" |
|
|
|
|
|
|
|
:data="info" |
|
|
|
|
|
|
|
:schema="showSchema" |
|
|
|
|
|
|
|
:columns="2" |
|
|
|
|
|
|
|
labelWidth="130px" |
|
|
|
|
|
|
|
:defaultShow="false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="100px" class="mt-20px"> |
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
|
|
|
<!-- 驾校招生模式 --> |
|
|
|
|
|
|
|
<template v-if="appStore.getAppInfo?.instanceType == 1"> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="成交驾校" prop="signSchool"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="form.signSchool" |
|
|
|
|
|
|
|
placeholder="选择驾校" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="changeSchool" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in schoolOptions" |
|
|
|
|
|
|
|
:key="item.schoolId" |
|
|
|
|
|
|
|
:label="item.schoolName" |
|
|
|
|
|
|
|
:value="item.schoolId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="成交场地" prop="signPlace"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="form.signPlace" |
|
|
|
|
|
|
|
placeholder="选择场地" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
:disabled="!form.signSchool" |
|
|
|
|
|
|
|
@change="changePlace" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in placeOptions" |
|
|
|
|
|
|
|
:key="item.placeId" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.placeId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="成交班型" prop="signClass"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="form.signClass" |
|
|
|
|
|
|
|
:disabled="!form.signPlace" |
|
|
|
|
|
|
|
placeholder="选择班型" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="changeClass" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in classOptions" |
|
|
|
|
|
|
|
:key="item.typeId" |
|
|
|
|
|
|
|
:label="item.typeName" |
|
|
|
|
|
|
|
:value="item.typeId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</template> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item label="成交驾校" prop="signSchool"> |
|
|
|
<el-form-item label="成交日期" prop="dealDate"> |
|
|
|
<el-select |
|
|
|
<el-date-picker |
|
|
|
v-model="form.signSchool" |
|
|
|
v-model="form.dealDate" |
|
|
|
placeholder="选择驾校" |
|
|
|
type="date" |
|
|
|
filterable |
|
|
|
format="YYYY-MM-DD" |
|
|
|
@change="changeSchool" |
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
> |
|
|
|
placeholder="选择日期时间" |
|
|
|
<el-option |
|
|
|
style="width: 100%" |
|
|
|
v-for="item in schoolOptions" |
|
|
|
/> |
|
|
|
:key="item.schoolId" |
|
|
|
|
|
|
|
:label="item.schoolName" |
|
|
|
|
|
|
|
:value="item.schoolId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item label="成交场地" prop="signPlace"> |
|
|
|
<el-form-item label="成交价" prop="signPrice"> |
|
|
|
<el-select |
|
|
|
<el-input-number |
|
|
|
v-model="form.signPlace" |
|
|
|
v-model="form.signPrice" |
|
|
|
placeholder="选择场地" |
|
|
|
:min="0" |
|
|
|
filterable |
|
|
|
style="width: 100%" |
|
|
|
:disabled="!form.signSchool" |
|
|
|
:controls="false" |
|
|
|
@change="changePlace" |
|
|
|
@change="signPriceChange" |
|
|
|
> |
|
|
|
/> |
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in placeOptions" |
|
|
|
|
|
|
|
:key="item.placeId" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.placeId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item label="成交班型" prop="signClass"> |
|
|
|
<el-form-item label="是否全款"> |
|
|
|
<el-select |
|
|
|
<el-radio-group v-model="form.isPayoff"> |
|
|
|
v-model="form.signClass" |
|
|
|
<el-radio :label="true" :value="true"> 全款 </el-radio> |
|
|
|
:disabled="!form.signPlace" |
|
|
|
<el-radio :label="false" :value="false"> 非全款 </el-radio> |
|
|
|
placeholder="选择班型" |
|
|
|
</el-radio-group> |
|
|
|
filterable |
|
|
|
|
|
|
|
@change="changeClass" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in classOptions" |
|
|
|
|
|
|
|
:key="item.typeId" |
|
|
|
|
|
|
|
:label="item.typeName" |
|
|
|
|
|
|
|
:value="item.typeId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="成交日期" prop="dealDate"> |
|
|
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
|
|
v-model="form.dealDate" |
|
|
|
|
|
|
|
type="date" |
|
|
|
|
|
|
|
format="YYYY-MM-DD" |
|
|
|
|
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
|
|
|
|
placeholder="选择日期时间" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="成交价" prop="signPrice"> |
|
|
|
|
|
|
|
<el-input-number |
|
|
|
|
|
|
|
v-model="form.signPrice" |
|
|
|
|
|
|
|
:min="0" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
:controls="false" |
|
|
|
|
|
|
|
@change="signPriceChange" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="是否全款"> |
|
|
|
|
|
|
|
<el-radio-group v-model="form.isPayoff"> |
|
|
|
|
|
|
|
<el-radio :label="true" :value="true"> 全款 </el-radio> |
|
|
|
|
|
|
|
<el-radio :label="false" :value="false"> 非全款 </el-radio> |
|
|
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="支付金额" prop="payAmount"> |
|
|
|
|
|
|
|
<el-input-number |
|
|
|
|
|
|
|
v-model="form.payAmount" |
|
|
|
|
|
|
|
:min="0" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
:controls="false" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="公司收款" prop="isCompanyReceipts"> |
|
|
|
|
|
|
|
<el-radio-group v-model="form.isCompanyReceipts"> |
|
|
|
|
|
|
|
<el-radio :label="true" :value="true">是</el-radio> |
|
|
|
|
|
|
|
<el-radio :label="false" :value="false">否</el-radio> |
|
|
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<template v-if="appStore.getAppInfo?.instanceType == 1"> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0" v-if="form.signClass"> |
|
|
|
|
|
|
|
<el-form-item label="利润"> |
|
|
|
|
|
|
|
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item label="接待人" prop="receiver"> |
|
|
|
<el-form-item label="支付金额" prop="payAmount"> |
|
|
|
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable> |
|
|
|
<el-input-number |
|
|
|
<el-option |
|
|
|
v-model="form.payAmount" |
|
|
|
v-for="item in allUserOptions" |
|
|
|
:min="0" |
|
|
|
:key="item.id" |
|
|
|
style="width: 100%" |
|
|
|
:label="item.nickname" |
|
|
|
:controls="false" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item label="安装状态" prop="installStatus"> |
|
|
|
<el-form-item label="公司收款" prop="isCompanyReceipts"> |
|
|
|
<el-select v-model="form.installStatus"> |
|
|
|
<el-radio-group v-model="form.isCompanyReceipts"> |
|
|
|
<el-option label="待安装" :value="1" /> |
|
|
|
<el-radio :label="true" :value="true">是</el-radio> |
|
|
|
<el-option label="已安装" :value="2" /> |
|
|
|
<el-radio :label="false" :value="false">否</el-radio> |
|
|
|
<el-option label="无需安装" :value="3" /> |
|
|
|
</el-radio-group> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</template> |
|
|
|
<template v-if="appStore.getAppInfo?.instanceType == 1"> |
|
|
|
<el-col |
|
|
|
<el-col :span="8" :offset="0" v-if="form.signClass"> |
|
|
|
:span="fieldItem.component == 'Editor' ? 24 : 8" |
|
|
|
<el-form-item label="利润"> |
|
|
|
:offset="0" |
|
|
|
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div> |
|
|
|
v-for="fieldItem in diyFieldList" |
|
|
|
</el-form-item> |
|
|
|
:key="fieldItem.clueParamId" |
|
|
|
</el-col> |
|
|
|
> |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
<el-form-item :label="fieldItem.label" :prop="fieldItem.field"> |
|
|
|
<el-form-item label="接待人" prop="receiver"> |
|
|
|
<component :is="componentMap[fieldItem.component]" v-model="form[fieldItem.field]"> |
|
|
|
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable> |
|
|
|
<template v-if="fieldItem.component == 'Select'"> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in fieldItem.options" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else-if="fieldItem.component == 'Radio'"> |
|
|
|
|
|
|
|
<el-radio |
|
|
|
|
|
|
|
v-for="item in fieldItem.options" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.id" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
|
|
</el-radio> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-else-if="fieldItem.component == 'Checkbox'"> |
|
|
|
|
|
|
|
<el-checkbox |
|
|
|
|
|
|
|
v-for="item in fieldItem.options" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</component> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<!-- 进销存模式 --> |
|
|
|
|
|
|
|
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2"> |
|
|
|
|
|
|
|
<el-divider direction="horizontal" content-position="left"> |
|
|
|
|
|
|
|
成交产品<span v-if="prodTotalPrice">,应收:{{ prodTotalPrice }}</span> |
|
|
|
|
|
|
|
</el-divider> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
class="mb-5px" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
|
|
form.signProducts.push({ productId: undefined, specsId: undefined, signNum: 0 }) |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
添加成交产品 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-table :data="form.signProducts" border size="small"> |
|
|
|
|
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
|
|
|
|
<el-table-column prop="productId" label="产品"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="row.productId" |
|
|
|
|
|
|
|
placeholder="选择成交产品" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="row.specsId = undefined" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in prodOptions" |
|
|
|
v-for="item in allUserOptions" |
|
|
|
:key="item.productId" |
|
|
|
:key="item.id" |
|
|
|
:label="item.productName" |
|
|
|
:label="item.nickname" |
|
|
|
:value="item.productId" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-table-column> |
|
|
|
</el-col> |
|
|
|
<el-table-column prop="specsId" label="规格"> |
|
|
|
</template> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template v-else> |
|
|
|
<el-select |
|
|
|
<el-col :span="8" :offset="0"> |
|
|
|
v-model="row.specsId" |
|
|
|
<el-form-item label="安装状态" prop="installStatus"> |
|
|
|
placeholder="选择规格" |
|
|
|
<el-select v-model="form.installStatus"> |
|
|
|
filterable |
|
|
|
<el-option label="待安装" :value="1" /> |
|
|
|
:disabled="!row.productId" |
|
|
|
<el-option label="已安装" :value="2" /> |
|
|
|
@change=" |
|
|
|
<el-option label="无需安装" :value="3" /> |
|
|
|
row.price = specsOptions(row.productId).find( |
|
|
|
|
|
|
|
(it) => it.specsId == row.specsId |
|
|
|
|
|
|
|
).price |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in specsOptions(row.productId)" |
|
|
|
|
|
|
|
:key="item.specsId" |
|
|
|
|
|
|
|
:label="item.specsName" |
|
|
|
|
|
|
|
:value="item.specsId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-table-column> |
|
|
|
</el-col> |
|
|
|
<el-table-column prop="price" label="销售单价" width="100px" /> |
|
|
|
</template> |
|
|
|
<el-table-column prop="signNum" label="成交数量" width="100px"> |
|
|
|
<el-col |
|
|
|
<template #default="{ row }"> |
|
|
|
:span="fieldItem.component == 'Editor' ? 24 : 8" |
|
|
|
<el-input-number |
|
|
|
:offset="0" |
|
|
|
v-model="row.signNum" |
|
|
|
v-for="fieldItem in diyFieldList" |
|
|
|
:min="1" |
|
|
|
:key="fieldItem.clueParamId" |
|
|
|
size="small" |
|
|
|
|
|
|
|
:controls="false" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="remark" label="备注"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" width="60px"> |
|
|
|
|
|
|
|
<template #default="{ $index }"> |
|
|
|
|
|
|
|
<Icon |
|
|
|
|
|
|
|
icon="ep:remove-filled" |
|
|
|
|
|
|
|
class="text-red-500" |
|
|
|
|
|
|
|
@click="handleRemove('signProducts', $index)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24" :offset="0" class="mb-18px"> |
|
|
|
|
|
|
|
<el-divider direction="horizontal" content-position="left"> |
|
|
|
|
|
|
|
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span> |
|
|
|
|
|
|
|
</el-divider> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
class="mb-5px" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
添加其他费用 |
|
|
|
<el-form-item :label="fieldItem.label" :prop="fieldItem.field"> |
|
|
|
</el-button> |
|
|
|
<component :is="componentMap[fieldItem.component]" v-model="form[fieldItem.field]"> |
|
|
|
<el-table :data="form.extraPay" border size="small"> |
|
|
|
<template v-if="fieldItem.component == 'Select'"> |
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
|
|
|
|
<el-table-column prop="extraPayType" label="费用类型" width="200px"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="row.extraPayType" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
placeholder="其他费用类型" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in extraPayOptions" |
|
|
|
v-for="item in fieldItem.options" |
|
|
|
:key="item.value" |
|
|
|
:key="item.id" |
|
|
|
:label="item.label" |
|
|
|
:label="item.name" |
|
|
|
:value="item.value" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else-if="fieldItem.component == 'Radio'"> |
|
|
|
</el-table-column> |
|
|
|
<el-radio |
|
|
|
<el-table-column prop="extraPayMoney" label="费用金额" width="180px"> |
|
|
|
v-for="item in fieldItem.options" |
|
|
|
<template #default="{ row }"> |
|
|
|
:key="item.id" |
|
|
|
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" /> |
|
|
|
:label="item.id" |
|
|
|
</template> |
|
|
|
:value="item.id" |
|
|
|
</el-table-column> |
|
|
|
> |
|
|
|
<el-table-column prop="remark" label="备注"> |
|
|
|
{{ item.name }} |
|
|
|
<template #default="{ row }"> |
|
|
|
</el-radio> |
|
|
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else-if="fieldItem.component == 'Checkbox'"> |
|
|
|
</el-table-column> |
|
|
|
<el-checkbox |
|
|
|
<el-table-column label="操作" width="60px"> |
|
|
|
v-for="item in fieldItem.options" |
|
|
|
<template #default="{ $index }"> |
|
|
|
:key="item.id" |
|
|
|
<Icon |
|
|
|
:label="item.name" |
|
|
|
icon="ep:remove-filled" |
|
|
|
:value="item.id" |
|
|
|
class="text-red-500" |
|
|
|
/> |
|
|
|
@click="handleRemove('extraPay', $index)" |
|
|
|
</template> |
|
|
|
/> |
|
|
|
</component> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
</el-table-column> |
|
|
|
</el-col> |
|
|
|
</el-table> |
|
|
|
<!-- 进销存模式 --> |
|
|
|
<el-divider |
|
|
|
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2"> |
|
|
|
v-if="prodTotalPrice + extraTotalPrice" |
|
|
|
<el-divider direction="horizontal" content-position="left"> |
|
|
|
direction="horizontal" |
|
|
|
成交产品<span v-if="prodTotalPrice">,应收:{{ prodTotalPrice }}</span> |
|
|
|
content-position="left" |
|
|
|
</el-divider> |
|
|
|
> |
|
|
|
<el-button |
|
|
|
合计应收:{{ prodTotalPrice + extraTotalPrice }} |
|
|
|
class="mb-5px" |
|
|
|
</el-divider> |
|
|
|
type="primary" |
|
|
|
</el-col> |
|
|
|
size="small" |
|
|
|
<el-col :span="24" :offset="0"> |
|
|
|
@click=" |
|
|
|
<el-form-item label="备注"> |
|
|
|
form.signProducts.push({ productId: undefined, specsId: undefined, signNum: 0 }) |
|
|
|
<Editor v-model:modelValue="form.remark" /> |
|
|
|
" |
|
|
|
</el-form-item> |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
添加成交产品 |
|
|
|
</el-row> |
|
|
|
</el-button> |
|
|
|
</el-form> |
|
|
|
<el-table :data="form.signProducts" border size="small"> |
|
|
|
<template #footer> |
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
|
|
|
|
<el-table-column prop="productId" label="产品"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="row.productId" |
|
|
|
|
|
|
|
placeholder="选择成交产品" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
@change="row.specsId = undefined" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in prodOptions" |
|
|
|
|
|
|
|
:key="item.productId" |
|
|
|
|
|
|
|
:label="item.productName" |
|
|
|
|
|
|
|
:value="item.productId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="specsId" label="规格"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="row.specsId" |
|
|
|
|
|
|
|
placeholder="选择规格" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
:disabled="!row.productId" |
|
|
|
|
|
|
|
@change=" |
|
|
|
|
|
|
|
row.price = specsOptions(row.productId).find( |
|
|
|
|
|
|
|
(it) => it.specsId == row.specsId |
|
|
|
|
|
|
|
).price |
|
|
|
|
|
|
|
" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in specsOptions(row.productId)" |
|
|
|
|
|
|
|
:key="item.specsId" |
|
|
|
|
|
|
|
:label="item.specsName" |
|
|
|
|
|
|
|
:value="item.specsId" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="price" label="销售单价" width="100px" /> |
|
|
|
|
|
|
|
<el-table-column prop="signNum" label="成交数量" width="100px"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-input-number |
|
|
|
|
|
|
|
v-model="row.signNum" |
|
|
|
|
|
|
|
:min="1" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
:controls="false" |
|
|
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="remark" label="备注"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" width="60px"> |
|
|
|
|
|
|
|
<template #default="{ $index }"> |
|
|
|
|
|
|
|
<Icon |
|
|
|
|
|
|
|
icon="ep:remove-filled" |
|
|
|
|
|
|
|
class="text-red-500" |
|
|
|
|
|
|
|
@click="handleRemove('signProducts', $index)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24" :offset="0" class="mb-18px"> |
|
|
|
|
|
|
|
<el-divider direction="horizontal" content-position="left"> |
|
|
|
|
|
|
|
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span> |
|
|
|
|
|
|
|
</el-divider> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
class="mb-5px" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
添加其他费用 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-table :data="form.extraPay" border size="small"> |
|
|
|
|
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
|
|
|
|
<el-table-column prop="extraPayType" label="费用类型" width="200px"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="row.extraPayType" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
placeholder="其他费用类型" |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in extraPayOptions" |
|
|
|
|
|
|
|
:key="item.value" |
|
|
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="extraPayMoney" label="费用金额" width="180px"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="remark" label="备注"> |
|
|
|
|
|
|
|
<template #default="{ row }"> |
|
|
|
|
|
|
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="操作" width="60px"> |
|
|
|
|
|
|
|
<template #default="{ $index }"> |
|
|
|
|
|
|
|
<Icon |
|
|
|
|
|
|
|
icon="ep:remove-filled" |
|
|
|
|
|
|
|
class="text-red-500" |
|
|
|
|
|
|
|
@click="handleRemove('extraPay', $index)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-divider |
|
|
|
|
|
|
|
v-if="prodTotalPrice + extraTotalPrice" |
|
|
|
|
|
|
|
direction="horizontal" |
|
|
|
|
|
|
|
content-position="left" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
合计应收:{{ prodTotalPrice + extraTotalPrice }} |
|
|
|
|
|
|
|
</el-divider> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="24" :offset="0"> |
|
|
|
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
|
|
|
<Editor v-model:modelValue="form.remark" /> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<template #footer v-if="showMergeOrder"> |
|
|
|
|
|
|
|
<span> |
|
|
|
|
|
|
|
<el-button @click="show = false">取 消</el-button> |
|
|
|
|
|
|
|
<el-button :disabled="formLoading" type="primary" @click="handleNext">下 一 步</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template #footer v-else> |
|
|
|
<span> |
|
|
|
<span> |
|
|
|
<el-button @click="show = false">取 消</el-button> |
|
|
|
<el-button @click="show = false">取 消</el-button> |
|
|
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button> |
|
|
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button> |
|
|
|
@ -346,7 +374,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="DialogSuccess"> |
|
|
|
<script setup name="DialogSuccess"> |
|
|
|
import * as ClueApi from '@/api/clue' |
|
|
|
import * as ClueApi from '@/api/clue' |
|
|
|
import { createSign, getSignProfit } from '@/api/clue/sign' |
|
|
|
import { createSign, getSignProfit, getSignPage } from '@/api/clue/sign' |
|
|
|
import { getDiyFieldList } from '@/api/clue/orderField' |
|
|
|
import { getDiyFieldList } from '@/api/clue/orderField' |
|
|
|
import { getPlaceList } from '@/api/school/place' |
|
|
|
import { getPlaceList } from '@/api/school/place' |
|
|
|
import { getClassTypeList } from '@/api/school/class' |
|
|
|
import { getClassTypeList } from '@/api/school/class' |
|
|
|
@ -421,23 +449,6 @@ const showSchema = computed(() => { |
|
|
|
return [...list, ...arr] |
|
|
|
return [...list, ...arr] |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// const rules = computed(() => { |
|
|
|
|
|
|
|
// let ruleObj = {} |
|
|
|
|
|
|
|
// props.schema.map((it) => { |
|
|
|
|
|
|
|
// if (it.isRequired) { |
|
|
|
|
|
|
|
// Reflect.set(ruleObj, it.field, { |
|
|
|
|
|
|
|
// required: true, |
|
|
|
|
|
|
|
// message: `${it.label}不可为空`, |
|
|
|
|
|
|
|
// trigger: 'blur, change' |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
// if (appStore.getAppInfo?.instanceType == 1) { |
|
|
|
|
|
|
|
// ruleObj = { ...ruleObj, ...schoolRules } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// return ruleObj |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const extraPayOptions = getDictOptions('other_pay_type') |
|
|
|
const extraPayOptions = getDictOptions('other_pay_type') |
|
|
|
|
|
|
|
|
|
|
|
async function open(id) { |
|
|
|
async function open(id) { |
|
|
|
@ -446,6 +457,10 @@ async function open(id) { |
|
|
|
getDiyFields() |
|
|
|
getDiyFields() |
|
|
|
const data = await ClueApi.getClue(id) |
|
|
|
const data = await ClueApi.getClue(id) |
|
|
|
info.value = { ...data, ...data.diyParams } |
|
|
|
info.value = { ...data, ...data.diyParams } |
|
|
|
|
|
|
|
// 进销存模式,查询是否需要合并订单 |
|
|
|
|
|
|
|
if (appStore.getAppInfo?.instanceType == 2) { |
|
|
|
|
|
|
|
setMergeOrder(data.phone) |
|
|
|
|
|
|
|
} |
|
|
|
show.value = true |
|
|
|
show.value = true |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
console.log(error) |
|
|
|
@ -473,6 +488,35 @@ function getDiyFields() { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showMergeOrder = ref(false) |
|
|
|
|
|
|
|
const mergeOrderList = ref([]) |
|
|
|
|
|
|
|
const mergeOrderId = ref(undefined) |
|
|
|
|
|
|
|
function setMergeOrder(phone) { |
|
|
|
|
|
|
|
getSignPage({ phone, pageNo: 1, pageSize: 10 }).then((data) => { |
|
|
|
|
|
|
|
if (data.total > 0) { |
|
|
|
|
|
|
|
// 选择订单作为主订单 |
|
|
|
|
|
|
|
showMergeOrder.value = true |
|
|
|
|
|
|
|
mergeOrderList.value = data.list |
|
|
|
|
|
|
|
mergeOrderId.value = undefined |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleNext() { |
|
|
|
|
|
|
|
if (mergeOrderId.value) { |
|
|
|
|
|
|
|
form.value.signOrderId = mergeOrderId.value |
|
|
|
|
|
|
|
const order = mergeOrderList.value.find((it) => it.signOrderId == mergeOrderId.value) |
|
|
|
|
|
|
|
if (order.orderDiyParams) { |
|
|
|
|
|
|
|
for (const key in order.orderDiyParams) { |
|
|
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(order.orderDiyParams, key)) { |
|
|
|
|
|
|
|
form.value[key] = order.orderDiyParams[key] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
showMergeOrder.value = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function resetForm(id) { |
|
|
|
async function resetForm(id) { |
|
|
|
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' }) |
|
|
|
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' }) |
|
|
|
form.value = { |
|
|
|
form.value = { |
|
|
|
|