quotationFormForm.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  1. <template>
  2. <a-spin :spinning="loading">
  3. <JFormContainer :disabled="disabled">
  4. <template #detail>
  5. <a-form v-bind="formItemLayout" name="quotationFormForm" ref="formRef">
  6. <a-row>
  7. <a-col :span="12">
  8. <a-form-item
  9. label="报价单号(bill code)"
  10. v-bind="validateInfos.billCode"
  11. id="quotationFormForm-billCode"
  12. name="billCode"
  13. :labelCol="formItemLayout.labelCol1"
  14. :wrapperCol="formItemLayout.wrapperCol1"
  15. >
  16. <a-input v-model:value="formData.billCode" placeholder="自动生成" disabled />
  17. </a-form-item>
  18. </a-col>
  19. <a-col :span="12">
  20. <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="quotationFormForm-billDate" name="billDate">
  21. <a-date-picker
  22. placeholder="请选择单据日期(bill date)"
  23. v-model:value="formData.billDate"
  24. value-format="YYYY-MM-DD"
  25. disabled
  26. style="width: 100%"
  27. allow-clear
  28. />
  29. </a-form-item>
  30. </a-col>
  31. <a-col :span="12">
  32. <a-form-item label="报价项目(quotation project)" v-bind="validateInfos.quotationProjectName" id="quotationFormForm-quotationProjectName" name="quotationProjectName">
  33. <a-input-search
  34. v-model:value="formData.quotationProjectName"
  35. readonly
  36. placeholder="请输入报价项目(inquiry project)"
  37. allow-clear
  38. enter-button="Search"
  39. :disabled="notAllowEdit"
  40. @search="onSearchProject"
  41. />
  42. </a-form-item>
  43. </a-col>
  44. <a-col :span="12">
  45. <a-form-item
  46. label="报价客户(quotation customer)"
  47. v-bind="validateInfos.quotationCustomer"
  48. id="quotationFormForm-quotationCustomer"
  49. name="quotationCustomer"
  50. :labelCol="formItemLayout.labelCol1"
  51. :wrapperCol="formItemLayout.wrapperCol1"
  52. >
  53. <JSelectInput v-model:value="formData.quotationCustomer" placeholder="请选择" :options="customerOption" disabled />
  54. </a-form-item>
  55. </a-col>
  56. <a-col :span="12">
  57. <a-form-item
  58. label="报价有效期(quotation period)"
  59. v-bind="validateInfos.quotationPeriod"
  60. id="quotationFormForm-quotationPeriod"
  61. name="quotationPeriod"
  62. >
  63. <a-range-picker
  64. v-model:value="quotationPeriod"
  65. :format="['YYYY-MM-DD', 'YYYY-MM-DD']"
  66. @change="onChangequotationPeriod"
  67. style="width: 100%"
  68. />
  69. </a-form-item>
  70. </a-col>
  71. <a-col :span="12">
  72. <a-form-item label="客户联系人(inquiry platform)" v-bind="validateInfos.inquiryPlatform" id="SaleInquiryFormForm-inquiryPlatform" name="inquiryPlatform">
  73. <a-select v-model:value="formData.liaisonId" labelInValue @change="onChangeLiaison" allowClear>
  74. <a-select-option v-for="item in linkOption" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
  75. </a-select>
  76. </a-form-item>
  77. </a-col>
  78. <a-col :span="12">
  79. <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="quotationFormForm-priority" name="priority">
  80. <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority" />
  81. </a-form-item>
  82. </a-col>
  83. <a-col :span="12">
  84. <a-form-item
  85. label="产品分类(production class)"
  86. v-bind="validateInfos.productionClass"
  87. id="quotationFormForm-productionClass"
  88. name="productionClass"
  89. :labelCol="formItemLayout.labelCol1"
  90. :wrapperCol="formItemLayout.wrapperCol1"
  91. >
  92. <JDictSelectTag
  93. v-model:value="formData.productionClass"
  94. placeholder=""
  95. dictCode="base_product_class,name,id,del_flag=0 and parent_id is null"
  96. page="false"
  97. showSearch
  98. />
  99. </a-form-item>
  100. </a-col>
  101. <a-col :span="12">
  102. <a-form-item label="机型(model)" v-bind="validateInfos.model" id="quotationFormForm-model" name="model">
  103. <JSelectMultiple v-model:value="formData.model" placeholder="请选择" dictCode="model_typer" />
  104. </a-form-item>
  105. </a-col>
  106. <a-col :span="12">
  107. <a-form-item
  108. label="厂家(maker)"
  109. v-bind="validateInfos.maker"
  110. id="quotationFormForm-maker"
  111. name="maker"
  112. :labelCol="formItemLayout.labelCol1"
  113. :wrapperCol="formItemLayout.wrapperCol1"
  114. >
  115. <JDictSelectTag v-model:value="formData.maker" placeholder="请选择" dictCode="factory" />
  116. </a-form-item>
  117. </a-col>
  118. <a-col :span="12">
  119. <a-form-item
  120. label="币种(currency)"
  121. v-bind="validateInfos.currency"
  122. id="quotationFormForm-currency"
  123. name="currency"
  124. :labelCol="formItemLayout.labelCol1"
  125. :wrapperCol="formItemLayout.wrapperCol1"
  126. >
  127. <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" @select="changeExchangeRate" />
  128. </a-form-item>
  129. </a-col>
  130. <a-col :span="12">
  131. <a-form-item label="汇率(exchangeRate)" v-bind="validateInfos.exchangeRate" id="quotationFormForm-exchangeRate" name="exchangeRate">
  132. <a-input-number
  133. v-model:value="formData.exchangeRate"
  134. placeholder="请输入"
  135. allow-clear
  136. AutoComplete="off"
  137. @change="changeDiscountOrExchangeRate"
  138. suffix="%"
  139. />
  140. </a-form-item>
  141. </a-col>
  142. <a-col :span="12">
  143. <a-form-item
  144. label="贸易方式(delivery terms)"
  145. v-bind="validateInfos.deliveryTerms"
  146. id="quotationFormForm-deliveryTerms"
  147. name="deliveryTerms"
  148. :labelCol="formItemLayout.labelCol1"
  149. :wrapperCol="formItemLayout.wrapperCol1"
  150. >
  151. <JDictSelectTag v-model:value="formData.deliveryTerms" placeholder="请选择" dictCode="delivery_terms" />
  152. </a-form-item>
  153. </a-col>
  154. <a-col :span="12">
  155. <a-form-item
  156. label="交期(delivery time)"
  157. v-bind="validateInfos.deliveryDayHead"
  158. id="quotationFormForm-deliveryDayHead"
  159. name="deliveryDayHead"
  160. >
  161. <a-input-number
  162. placeholder=""
  163. v-model:value="formData.deliveryDayHead"
  164. @change="changeDelivertTime"
  165. style="width: 100%"
  166. allow-clear
  167. />
  168. </a-form-item>
  169. </a-col>
  170. <a-col :span="12">
  171. <a-form-item
  172. label="付款条件(payment terms)"
  173. v-bind="validateInfos.paymentTerms"
  174. id="quotationFormForm-paymentTerms"
  175. name="paymentTerms"
  176. :labelCol="formItemLayout.labelCol1"
  177. :wrapperCol="formItemLayout.wrapperCol1"
  178. >
  179. <JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms" />
  180. </a-form-item>
  181. </a-col>
  182. <a-col :span="12">
  183. <a-form-item
  184. label="交货地点(place of delivery)"
  185. v-bind="validateInfos.placeDelivery"
  186. id="quotationFormForm-placeDelivery"
  187. name="placeDelivery"
  188. >
  189. <a-input v-model:value="formData.placeDelivery" placeholder="请输入交货地点(place of delivery)" allow-clear AutoComplete="off" />
  190. </a-form-item>
  191. </a-col>
  192. <a-col :span="12">
  193. <a-form-item
  194. label="毛利率(grossMargin)"
  195. v-bind="validateInfos.grossMarginHead"
  196. id="quotationFormForm-grossMarginHead"
  197. name="grossMarginHead"
  198. >
  199. <a-input v-model:value="formData.grossMarginHead" placeholder="" allow-clear AutoComplete="off" disabled/>
  200. </a-form-item>
  201. </a-col>
  202. <a-col :span="12">
  203. <a-form-item
  204. label="客户折扣(custumer discount)"
  205. v-bind="validateInfos.custumerDiscount"
  206. id="quotationFormForm-custumerDiscount"
  207. name="custumerDiscount"
  208. :labelCol="formItemLayout.labelCol1"
  209. :wrapperCol="formItemLayout.wrapperCol1"
  210. >
  211. <a-input
  212. v-model:value="formData.custumerDiscount"
  213. placeholder="请输入客户折扣(custumer discount)"
  214. allow-clear
  215. AutoComplete="off"
  216. @change="changeDiscountOrExchangeRate"
  217. suffix="%"
  218. />
  219. </a-form-item>
  220. </a-col>
  221. <a-col :span="12">
  222. <a-form-item
  223. label="销售部门(sale department)"
  224. v-bind="validateInfos.saleDepartment"
  225. id="SaleInquiryFormForm-saleDepartment"
  226. name="saleDepartment"
  227. >
  228. <a-input v-model:value="formData.saleDepartmentName" placeholder="" allow-clear disabled />
  229. </a-form-item>
  230. </a-col>
  231. <a-col :span="12">
  232. <a-form-item
  233. label="包装方式(packaging method)"
  234. v-bind="validateInfos.packagingMethod"
  235. id="quotationFormForm-packagingMethod"
  236. name="packagingMethod"
  237. :labelCol="formItemLayout.labelCol1"
  238. :wrapperCol="formItemLayout.wrapperCol1"
  239. >
  240. <a-input v-model:value="formData.packagingMethod" placeholder="请输入包装方式(packaging method)" allow-clear AutoComplete="off" />
  241. </a-form-item>
  242. </a-col>
  243. <a-col :span="12">
  244. <a-form-item label="业务员(salesman)" v-bind="validateInfos.salesman" id="quotationFormForm-salesman" name="salesman">
  245. <a-input v-model:value="formData.salesmanName" placeholder="" allow-clear disabled />
  246. </a-form-item>
  247. </a-col>
  248. <a-col :span="12">
  249. <a-form-item
  250. label="报价备注(quotation notes)"
  251. v-bind="validateInfos.quotationNotes"
  252. id="quotationFormForm-quotationNotes"
  253. name="quotationNotes"
  254. :labelCol="formItemLayout.labelCol1"
  255. :wrapperCol="formItemLayout.wrapperCol1"
  256. >
  257. <a-input v-model:value="formData.quotationNotes" placeholder="请输入报价备注(quotation notes)" allow-clear AutoComplete="off" />
  258. </a-form-item>
  259. </a-col>
  260. <a-col :span="12">
  261. <a-form-item
  262. label="协议条款(agreement terms)"
  263. v-bind="validateInfos.agreementTerms"
  264. id="SaleOrderForm-agreementTerms"
  265. name="agreementTerms"
  266. :labelCol="formItemLayout.labelCol1"
  267. :wrapperCol="formItemLayout.wrapperCol1"
  268. >
  269. <JSelectMultiple v-model:value="formData.agreementTerms" placeholder="" dictCode="base_agreement_terms,name,name" page="false" showSearch/>
  270. </a-form-item>
  271. </a-col>
  272. <a-col :span="12">
  273. <a-form-item
  274. label="供应商技术资料(supplier quotation attachs)"
  275. v-bind="validateInfos.supplierAttachs"
  276. id="quotationFormForm-supplierAttachs"
  277. name="supplierAttachs"
  278. :labelCol="formItemLayout.labelCol1"
  279. :wrapperCol="formItemLayout.wrapperCol1"
  280. >
  281. <a :href="baseUrl + formData.supplierAttachs" v-if="formData.supplierAttachs">{{ formData.supplierAttachs }}</a>
  282. <a-input v-model:value="formData.supplierAttachs" disabled v-if="!formData.supplierAttachs" />
  283. </a-form-item>
  284. </a-col>
  285. <a-col :span="12">
  286. <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="quotationFormForm-attachs" name="attachs">
  287. <JUpload v-model:value="formData.attachs" />
  288. </a-form-item>
  289. </a-col>
  290. </a-row>
  291. </a-form>
  292. </template>
  293. </JFormContainer>
  294. <!-- 子表单区域 -->
  295. <a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
  296. <a-tab-pane tab="销售报价单 - 产品明细(product details)" key="saleQuotationFormProduct" :forceRender="true">
  297. <a-button type="primary" @click="selectProducts" style="margin-right: 1%; margin-bottom: 1%"> 选择产品(select product)</a-button>
  298. <a-button type="primary" @click="chooseSupplier"> 选择供应商报价选定(select supplier quotation selection)</a-button>
  299. <a-button type="primary" @click="setSonList" style="margin-left: 1%; margin-bottom: 1%"> 配置毛利率(Configure gross margin)</a-button>
  300. <j-vxe-table
  301. :keep-source="true"
  302. resizable
  303. ref="saleQuotationFormProductTableRef"
  304. :loading="saleQuotationFormProductTable.loading"
  305. :columns="saleQuotationFormProductTable.columns"
  306. :dataSource="saleQuotationFormProductTable.dataSource"
  307. :height="340"
  308. :disabled="disabled"
  309. :rowNumber="true"
  310. :rowSelection="true"
  311. asyncRemove
  312. @value-change="changeValues"
  313. >
  314. <template #lastPrice="props">
  315. <a @click="viewHistory">{{ props.row.lastPrice }}</a>
  316. </template>
  317. <template #action="props">
  318. <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)">
  319. <a>删除(delete)</a>
  320. </a-popconfirm>
  321. </template>
  322. </j-vxe-table>
  323. </a-tab-pane>
  324. <a-tab-pane tab="销售报价单 - 船明细(ship details)" key="saleQuotationFormShip" :forceRender="true">
  325. <a-button type="primary" @click="selectShip"> 选择船(select ship)</a-button>
  326. <j-vxe-table
  327. :keep-source="true"
  328. resizable
  329. ref="saleQuotationFormShipTableRef"
  330. :loading="saleQuotationFormShipTable.loading"
  331. :columns="saleQuotationFormShipTable.columns"
  332. :dataSource="saleQuotationFormShipTable.dataSource"
  333. :maxHeight="340"
  334. :disabled="disabled"
  335. :rowNumber="true"
  336. :rowSelection="true"
  337. >
  338. <template #action="props">
  339. <a @click="viewAccessory(props)">查看配件信息(view accessory information)</a>
  340. <a-divider type="vertical" />
  341. <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
  342. <a>删除(delete)</a>
  343. </a-popconfirm>
  344. </template>
  345. </j-vxe-table>
  346. </a-tab-pane>
  347. </a-tabs>
  348. <SelectShipSModal ref="SelectShipSModalRef" @select="addShip" />
  349. <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef" />
  350. <SelectPrpductModal ref="SelectPrpductModalRef" @select-product="addProduct" />
  351. <SelectProjectModal ref="SelectProjectModalRef" @select-project="addProject" />
  352. <ViewHistoryQuotationModal ref="ViewHistoryQuotationModalRef" />
  353. <SelectSupplierQuotation ref="SelectSupplierQuotationRef" @select-supplier-quatation-confirm="addProductFromSupplier" />
  354. <SetSonList ref="SetSonListRef" @success="setSonListFiled"></SetSonList>
  355. </a-spin>
  356. </template>
  357. <script lang="ts">
  358. import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
  359. import { defHttp } from '/@/utils/http/axios';
  360. import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
  361. import {
  362. querysaleQuotationFormShipListByMainId,
  363. querysaleVersonFormShipListByMainId,
  364. querySaleQuotationFormProductListByMainId,
  365. querySaleVersonProductListByMainId,
  366. queryDataById,
  367. saveOrUpdate,
  368. HistoryQuotation,
  369. queryVersonHistoryById,
  370. queryRate,
  371. LinkOption
  372. } from '../quotationForm.api';
  373. import { JVxeTable } from '/@/components/jeecg/JVxeTable';
  374. import { saleQuotationFormShipColumns, saleQuotationFormProductColumns } from '../quotationForm.data';
  375. import SelectShipSModal from '../../../publicComponents/SelectShipSModal.vue';
  376. import SetSonList from './SetSonList.vue';
  377. import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
  378. import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
  379. import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
  380. import SelectSupplierQuotation from '../../../publicComponents/SelectSupplierQuotation.vue';
  381. import ViewHistoryQuotationModal from './ViewHistoryQuotationModal.vue';
  382. import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
  383. import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
  384. import { JDictSelectTag, JSelectMultiple } from '/@/components/Form';
  385. import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
  386. import { Form, message } from 'ant-design-vue';
  387. import { useUserStore } from '/@/store/modules/user';
  388. import dayjs from 'dayjs';
  389. import { useGlobSetting } from '/@/hooks/setting';
  390. const { domainUrl } = useGlobSetting();
  391. const userStore = useUserStore();
  392. const useForm = Form.useForm;
  393. export default defineComponent({
  394. name: 'QuotationFormForm',
  395. components: {
  396. JVxeTable,
  397. JFormContainer,
  398. SelectShipSModal,
  399. BaseShipArchiveAccessoriesModal,
  400. SelectPrpductModal,
  401. JUpload,
  402. SelectProjectModal,
  403. SelectSupplierQuotation,
  404. ViewHistoryQuotationModal,
  405. JDictSelectTag,
  406. JSelectInput,
  407. JSelectMultiple,
  408. SetSonList,
  409. },
  410. props: {
  411. formDisabled: {
  412. type: Boolean,
  413. default: false,
  414. },
  415. formData: { type: Object, default: () => {} },
  416. formBpm: { type: Boolean, default: true },
  417. },
  418. emits: ['success'],
  419. setup(props, { emit }) {
  420. const baseUrl = domainUrl + '/sys/common/static/';
  421. const loading = ref(false);
  422. const formRef = ref();
  423. var linkOption = ref([]);
  424. var SetSonListRef = ref();
  425. var SelectPrpductModalRef = ref();
  426. var SelectProjectModalRef = ref();
  427. var ViewHistoryQuotationModalRef = ref();
  428. var SelectSupplierQuotationRef = ref();
  429. var quotationPeriod = ref([]);
  430. const saleQuotationFormShipTableRef = ref();
  431. const saleQuotationFormShipTable = reactive<Record<string, any>>({
  432. loading: false,
  433. columns: saleQuotationFormShipColumns,
  434. dataSource: [],
  435. });
  436. const saleQuotationFormProductTableRef = ref();
  437. const saleQuotationFormProductTable = reactive<Record<string, any>>({
  438. loading: false,
  439. columns: saleQuotationFormProductColumns,
  440. dataSource: [],
  441. });
  442. var SelectShipSModalRef = ref();
  443. var BaseShipArchiveAccessoriesListRef = ref();
  444. const activeKey = ref('saleQuotationFormProduct');
  445. var notAllowEdit = ref(false);
  446. var classOption = ref([]);
  447. var customerOption = ref([]);
  448. const formData = reactive<Record<string, any>>({
  449. id: '',
  450. status: undefined,
  451. delFlag: undefined,
  452. otherStatus: '',
  453. billDate: dayjs(new Date()).format('YYYY-MM-DD'),
  454. billCode: '',
  455. quotationProject: '',
  456. quotationProjectName: '',
  457. quotationCustomer: '',
  458. quotationCustomerName: '',
  459. quotationPeriodBegin: '',
  460. quotationPeriodEnd: '',
  461. busynessType: '',
  462. priority: '',
  463. productionClass: '',
  464. model: '',
  465. maker: '',
  466. currency: '',
  467. deliveryTerms: '',
  468. deliveryDayHead: '',
  469. paymentTerms: '',
  470. placeDelivery: '',
  471. custumerDiscount: '',
  472. saleDepartment: '',
  473. saleDepartmentName: '',
  474. packagingMethod: '',
  475. salesman: '',
  476. salesmanName: '',
  477. quotationNotes: '',
  478. attachs: '',
  479. supplierAttachs: '',
  480. sourceCode: '',
  481. exchangeRate: '',
  482. agreementTerms: '',
  483. grossMarginHead:'',
  484. liaisonId : '',
  485. liaisonInfo : '',
  486. });
  487. //表单验证
  488. const validatorRules = reactive({
  489. quotationProjectName: [{ required: true, message: '请选择报价项目(select project)' }],
  490. quotationCustomer: [{ required: true, message: '请选择报价客户(select customer)' }],
  491. currency: [{ required: true, message: '请选择币种(select currency)' }],
  492. model: [{ required: true, message: '请选择机型(model)' }],
  493. deliveryTerms: [{ required: true, message: '请选择贸易方式(delivery terms)' }],
  494. deliveryDayHead: [{ required: true, message: '请选择交期(deliveryDayHead)' }],
  495. });
  496. const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
  497. const dbData = {};
  498. const formItemLayout = {
  499. labelCol: { xs: { span: 24 }, sm: { span: 8 } },
  500. wrapperCol: { xs: { span: 24 }, sm: { span: 13 } },
  501. labelCol1: { xs: { span: 24 }, sm: { span: 8 } },
  502. wrapperCol1: { xs: { span: 24 }, sm: { span: 13 } },
  503. };
  504. // 表单禁用
  505. const disabled = computed(() => {
  506. if (props.formBpm === true) {
  507. if (props.formData.disabled === false) {
  508. return false;
  509. } else {
  510. return true;
  511. }
  512. }
  513. return props.formDisabled;
  514. });
  515. //新增方法
  516. function add() {
  517. resetFields();
  518. saleQuotationFormShipTable.dataSource = [];
  519. saleQuotationFormProductTable.dataSource = [];
  520. activeKey.value = 'saleQuotationFormProduct';
  521. getOptiom();
  522. getCustomerOptions();
  523. quotationPeriod.value = [];
  524. formData.salesman = userStore.getUserInfo.username;
  525. formData.salesmanName = userStore.getUserInfo.realname;
  526. formData.saleDepartment = userStore.getUserInfo.orgCode;
  527. formData.saleDepartmentName = userStore.getUserInfo.orgName;
  528. notAllowEdit.value = false;
  529. linkOption.value = []
  530. }
  531. async function changeExchangeRate() {
  532. if (formData.currency !== '美元') {
  533. var param = {
  534. month: dayjs(new Date()).month() + 1,
  535. year: dayjs(new Date()).year(),
  536. currency: formData.currency,
  537. };
  538. var info = await queryRate(param);
  539. formData.exchangeRate = info;
  540. } else {
  541. formData.exchangeRate = 1;
  542. }
  543. await changeDiscountOrExchangeRate();
  544. }
  545. //编辑方法
  546. async function edit(row) {
  547. //主表数据
  548. await queryMainData(row.id);
  549. //子表数据
  550. const saleQuotationFormShipDataList = await querysaleQuotationFormShipListByMainId(row['id']);
  551. saleQuotationFormShipTable.dataSource = [...saleQuotationFormShipDataList];
  552. const saleQuotationFormProductDataList = await querySaleQuotationFormProductListByMainId(row['id']);
  553. saleQuotationFormProductTable.dataSource = [...saleQuotationFormProductDataList];
  554. getOptiom();
  555. getCustomerOptions();
  556. quotationPeriod.value[0] = formData.quotationPeriodBegin ? dayjs(formData.quotationPeriodBegin,'YYYY/MM/DD') : '';
  557. quotationPeriod.value[1] = formData.quotationPeriodEnd ? dayjs(formData.quotationPeriodEnd,'YYYY/MM/DD') : '';
  558. notAllowEdit.value = true;
  559. getLinkOptionsArr(formData.quotationCustomer)
  560. }
  561. //获取主表
  562. async function queryMainData(id) {
  563. const row = await queryDataById(id);
  564. resetFields();
  565. const tmpData = {};
  566. Object.keys(formData).forEach((key) => {
  567. if (row.hasOwnProperty(key)) {
  568. tmpData[key] = row[key];
  569. }
  570. });
  571. //赋值
  572. Object.assign(formData, tmpData);
  573. }
  574. const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
  575. saleQuotationShip: saleQuotationFormShipTableRef,
  576. saleQuotationProduct: saleQuotationFormProductTableRef,
  577. });
  578. //获取表单信息
  579. async function getFormData() {
  580. try {
  581. // 触发表单验证
  582. await validate();
  583. } catch ({ errorFields }) {
  584. if (errorFields) {
  585. const firstField = errorFields[0];
  586. if (firstField) {
  587. formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
  588. }
  589. }
  590. return Promise.reject(errorFields);
  591. }
  592. return transformData(toRaw(formData));
  593. }
  594. //保存
  595. async function submitForm() {
  596. const xTable = saleQuotationFormProductTableRef.value!.getXTable()
  597. if (xTable.data.length==0) {
  598. message.warning('请添加明细');
  599. } else {
  600. saleQuotationFormProductTableRef.value!.validateTable().then(async (errMap) => {
  601. if (errMap) {
  602. console.log('表单验证未通过:', { errMap });
  603. } else {
  604. const mainData = await getFormData();
  605. const subData = await getSubFormAndTableData();
  606. const values = Object.assign({}, dbData, mainData, subData);
  607. console.log('表单提交数据', values);
  608. const isUpdate = values.id ? true : false;
  609. const isRevise = values.status == '1' ? true : false;
  610. await saveOrUpdate(values, isUpdate, isRevise);
  611. //关闭弹窗
  612. emit('success');
  613. }
  614. });
  615. }
  616. }
  617. function setFieldsValue(values) {
  618. if (values) {
  619. Object.keys(values).map((k) => {
  620. formData[k] = values[k];
  621. });
  622. }
  623. }
  624. /**
  625. * 值改变事件触发-树控件回调
  626. * @param key
  627. * @param value
  628. */
  629. function handleFormChange(key, value) {
  630. formData[key] = value;
  631. }
  632. //传明细-删除行
  633. async function handleDelete(prop) {
  634. var xTable = saleQuotationFormShipTableRef.value!.getXTable();
  635. var newArray = [...xTable.data];
  636. newArray.splice(prop.rowIndex, 1);
  637. saleQuotationFormShipTable.dataSource = newArray;
  638. }
  639. //产品明细-删除行
  640. async function handleDelete1(prop) {
  641. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  642. var newArray = [...xTable.data];
  643. newArray.splice(prop.rowIndex, 1);
  644. saleQuotationFormProductTable.dataSource = newArray;
  645. if (saleQuotationFormProductTable.dataSource.length !== 0) {
  646. var arr = [];
  647. saleQuotationFormProductTable.dataSource.map((item) => {
  648. if (item.sourceId) {
  649. arr.push(item.sourceId);
  650. }
  651. });
  652. if (arr.length == 0) {
  653. formData.sourceCode = '';
  654. notAllowEdit.value = false;
  655. }
  656. } else {
  657. formData.sourceCode = '';
  658. notAllowEdit.value = false;
  659. add();
  660. }
  661. }
  662. //查询船
  663. function selectShip() {
  664. SelectShipSModalRef.value.getTable();
  665. }
  666. //增行-船明细
  667. function addShip(data) {
  668. data.map((item) => {
  669. item.shipowner = item.relateCustomer;
  670. item.shipId = item.id;
  671. item.id=undefined;
  672. });
  673. var xTable = saleQuotationFormShipTableRef.value!.getXTable();
  674. var arr = xTable.data.concat(data);
  675. saleQuotationFormShipTable.dataSource = arr;
  676. }
  677. //增行-产品明细
  678. async function addProduct(data) {
  679. for (const item of data) {
  680. item.productClass = item.classId_dictText;
  681. item.productCode = item.code;
  682. // item.unit = item.measurementUnit
  683. item.deliveryDayChild = formData.deliveryDayHead;
  684. item.productId = item.id;
  685. var obj = await getRowRate(item);
  686. item.taxRate = obj.rateNumber;
  687. item.grossMargin = obj.grossMargin;
  688. item.discount = formData.custumerDiscount;
  689. item.id = undefined;
  690. item.notes=''
  691. }
  692. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  693. var arrProduct = xTable.data.concat(data);
  694. saleQuotationFormProductTable.dataSource = arrProduct;
  695. }
  696. //选择项目
  697. function addProject(data) {
  698. if (data.length == 0) {
  699. formData.quotationProject = formData.quotationProjectName = '';
  700. } else {
  701. formData.quotationProject = data[0].id;
  702. formData.quotationProjectName = data[0].code;
  703. formData.quotationCustomer = data[0].customerId;
  704. formData.quotationCustomerName = data[0].customerId_dictText;
  705. formData.custumerDiscount == data[0].discount;
  706. formData.currency = '美元';
  707. formData.exchangeRate = '1';
  708. customerOption.value.map((item) => {
  709. if (item.value == data[0].customerId) {
  710. formData.priority = item.priority;
  711. formData.custumerDiscount = item.discount;
  712. formData.paymentTerms = item.paymentTerms;
  713. formData.currency = item.currency;
  714. }
  715. });
  716. if (saleQuotationFormProductTable.dataSource.length > 0) {
  717. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  718. var newArr = [...xTable.data];
  719. newArr.map((item) => {
  720. item.discount = formData.custumerDiscount;
  721. });
  722. saleQuotationFormProductTable.dataSource = newArr;
  723. }
  724. changeExchangeRate()
  725. getLinkOptionsArr(formData.quotationCustomer)
  726. }
  727. }
  728. //获取客户列表
  729. function getCustomerOptions() {
  730. let params = { pageSize: '-1', status: 1 };
  731. defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list', params }, { isTransformResponse: false }).then((res) => {
  732. if (res) {
  733. customerOption.value = [];
  734. res.result.records.forEach((item) => {
  735. customerOption.value.push({
  736. label: item.name,
  737. value: item.id,
  738. priority: item.priority,
  739. intermediatorCommission: item.intermediatorCommission,
  740. commission: item.commission,
  741. discount: item.discount,
  742. paymentTerms: item.paymentTerms,
  743. currency: item.currency,
  744. });
  745. });
  746. }
  747. });
  748. }
  749. //查看配件信息
  750. function viewAccessory(prop) {
  751. BaseShipArchiveAccessoriesListRef.value.getTable(prop.row);
  752. }
  753. //选择产品
  754. function selectProducts() {
  755. SelectPrpductModalRef.value.getTable();
  756. }
  757. //选择供应商报价单
  758. function chooseSupplier() {
  759. SelectSupplierQuotationRef.value.getTable(formData);
  760. }
  761. //选择项目
  762. function onSearchProject() {
  763. SelectProjectModalRef.value.getTable();
  764. }
  765. //获取产品分类下拉框
  766. function getOptiom() {
  767. defHttp
  768. .get({ url: 'baseCode/baseProductClass/list' }, { isTransformResponse: false })
  769. .then((res) => {
  770. if (res.success) {
  771. classOption.value = [];
  772. res.result.records.forEach((element) => {
  773. var obj = {
  774. label: element.name ? element.name : '无名称请维护',
  775. value: element.id ? element.id : '',
  776. taxRate: element.taxRate ? element.taxRate : 0,
  777. grossMargin: element.grossMargin ? element.grossMargin : 0,
  778. };
  779. classOption.value.push(obj);
  780. });
  781. }
  782. })
  783. .finally(() => {
  784. // loading.value = false;
  785. });
  786. }
  787. //修改报价有效期
  788. function onChangequotationPeriod(data) {
  789. quotationPeriod.value = data;
  790. formData.quotationPeriodBegin = data[0].format('YYYY-MM-DD');
  791. formData.quotationPeriodEnd = data[1].format('YYYY-MM-DD');
  792. }
  793. //修改主表交期
  794. function changeDelivertTime() {
  795. if (saleQuotationFormProductTable.dataSource.length > 0) {
  796. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  797. var newArr = [...xTable.data];
  798. newArr.map((item) => {
  799. item.deliveryDayChild = formData.deliveryDayHead;
  800. });
  801. saleQuotationFormProductTable.dataSource = newArr;
  802. }
  803. }
  804. //查看上次报价
  805. function viewHistory() {
  806. ViewHistoryQuotationModalRef.value.getTable();
  807. }
  808. //查看版本详情
  809. async function VersionDetail(record) {
  810. //主表数据
  811. await queryVersonHistoryData(record.id);
  812. //子表数据
  813. const saleQuotationFormShipDataList = await querysaleVersonFormShipListByMainId(record.id);
  814. saleQuotationFormShipTable.dataSource = [...saleQuotationFormShipDataList];
  815. const saleQuotationFormProductDataList = await querySaleVersonProductListByMainId(record.id);
  816. saleQuotationFormProductTable.dataSource = [...saleQuotationFormProductDataList];
  817. getOptiom();
  818. getCustomerOptions();
  819. quotationPeriod.value[0] = formData.quotationPeriodBegin ? dayjs(formData.quotationPeriodBegin,'YYYY/MM/DD') : '';
  820. quotationPeriod.value[1] = formData.quotationPeriodEnd ? dayjs(formData.quotationPeriodEnd,'YYYY/MM/DD') : '';
  821. }
  822. async function queryVersonHistoryData(id) {
  823. const row = await queryVersonHistoryById(id);
  824. resetFields();
  825. const tmpData = {};
  826. Object.keys(formData).forEach((key) => {
  827. if (row.hasOwnProperty(key)) {
  828. tmpData[key] = row[key];
  829. }
  830. });
  831. //赋值
  832. Object.assign(formData, tmpData);
  833. }
  834. //新增行-产品明细-选择供应商报价单
  835. async function addProductFromSupplier(data) {
  836. //查询客户名称
  837. var obj = await SelectProjectModalRef.value.getCustom(data[0].inquiryProject);
  838. formData.quotationCustomer = obj.length == 0 ? '' : obj[0].customerId;
  839. formData.quotationCustomerName = obj.length == 0 ? '' : obj[0].customerId_dictText;
  840. for (const item of data) {
  841. var obj = await getRowRate(item);
  842. item.taxRate = obj.rateNumber;
  843. item.grossMargin = obj.grossMargin;
  844. item.productClass = item.productClass;
  845. item.productCode = item.productCode;
  846. item.sourceId = item.childId;
  847. item.id = undefined
  848. item.fatherModel = item.model;
  849. item.model = item.childModel;
  850. item.deliveryTime = formData.deliveryTime;
  851. item.supplierCurrency = item.currency;
  852. item.supplierId = item.selectionSupplier;
  853. item.supplierName = item.selectionSupplier_dictText;
  854. item.purchasePrice = item.taxPriceUsd;
  855. item.taxAmount = 0;
  856. item.currencyGys = item.currency;
  857. item.exchangeRateGys = item.exchangeRateUsd;
  858. item.taxPriceGys = item.taxPrice;
  859. item.notes=''
  860. item.purchaseAmount=(Number(item.quantity) * Number(item.purchasePrice)).toFixed(2)
  861. }
  862. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  863. var arrProduct = xTable.data.concat(data);
  864. arrProduct.map((item) => {
  865. customerOption.value.map((event) => {
  866. if (event.value == formData.quotationCustomer) {
  867. (item.intermediatorCommission = event.intermediatorCommission), (item.customerCommision = event.commission);
  868. formData.custumerDiscount = event.discoun;
  869. item.discount = event.discount;
  870. formData.paymentTerms = event.paymentTerms;
  871. formData.currency = event.currency;
  872. }
  873. });
  874. });
  875. saleQuotationFormProductTable.dataSource = arrProduct;
  876. notAllowEdit.value = true;
  877. formData.quotationProject = data[0].inquiryProject;
  878. formData.quotationProjectName = data[0].projectName;
  879. formData.sourceCode = data[0].billCode;
  880. formData.priority = data[0].priority;
  881. formData.model = data[0].fatherModel;
  882. formData.maker = data[0].maker;
  883. formData.productionClass = data[0].productionClass;
  884. formData.deliveryDayHead = data[0].deliveryDayChild;
  885. // formData.currency = '美元';
  886. // formData.exchangeRate = '1';
  887. await getShipList(data[0].headId);
  888. await getLinkOptionsArr(formData.quotationCustomer)
  889. await changeExchangeRate()
  890. // countGrossMargin()
  891. // await changeDiscountOrExchangeRate()
  892. }
  893. function getShipList(id) {
  894. let params = { id: id };
  895. defHttp.get({ url: '/purCode/purQuotationSelection/queryPurQuotationSelectionShipByMainId', params }, { isTransformResponse: false }).then((res) => {
  896. if (res) {
  897. saleQuotationFormShipTable.dataSource = res.result;
  898. }
  899. });
  900. }
  901. async function getRowRate(row) {
  902. var obj = {
  903. rateNumber: 0,
  904. grossMargin: 0,
  905. };
  906. let params = { pageSize: '-1', status: 1, code: row.productCode };
  907. await defHttp.get({ url: '/baseCode/baseProductArchive/list', params }, { isTransformResponse: false }).then((res) => {
  908. if (res) {
  909. if (res.result.records[0].taxRate && res.result.records[0].taxRate !== '') {
  910. obj.rateNumber = res.result.records[0].taxRate;
  911. } else {
  912. classOption.value.map((event) => {
  913. if (event.label == row.productClass) {
  914. obj.rateNumber = event.taxRate;
  915. }
  916. });
  917. }
  918. classOption.value.map((event) => {
  919. if (event.label == row.productClass) {
  920. obj.grossMargin = event.grossMargin;
  921. }
  922. });
  923. }
  924. });
  925. return obj;
  926. }
  927. function changeValues(prop) {
  928. //设置 默认值
  929. formData.exchangeRate = formData.exchangeRate == '' || formData.exchangeRate === null ? 1 : formData.exchangeRate;
  930. prop.row.customerCommision = prop.row.customerCommision == '' || prop.row.customerCommision === null || !prop.row.customerCommision ? 0 : prop.row.customerCommision;
  931. prop.row.discount = prop.row.discount == '' || prop.row.discount === null || !prop.row.discount ? 0 : prop.row.discount;
  932. prop.row.tariff = prop.row.tariff == '' || prop.row.tariff === null || !prop.row.tariff ? 0 : prop.row.tariff;
  933. prop.row.intermediatorCommission =prop.row.intermediatorCommission == '' || prop.row.intermediatorCommission === null || !prop.row.intermediatorCommission? 0: prop.row.intermediatorCommission;
  934. //计算销售单价
  935. if (prop.col.key == 'purchasePrice' || prop.col.key == 'taxRate' || prop.col.key == 'tariff' || prop.col.key == 'discount' || prop.col.key == 'grossMargin' || prop.col.key == 'customerCommision' || prop.col.key == 'intermediatorCommission') {
  936. // var num =((prop.row.purchasePrice / Number(formData.exchangeRate)) *(1 + prop.row.taxRate / 100) *(1 + prop.row.tariff / 100) *(1 - prop.row.discount / 100)) /(1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100);
  937. var num=(prop.row.purchasePrice * Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))/(1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100)*(1 + prop.row.taxRate / 100)/(1 - prop.row.discount / 100)
  938. prop.row.salePrice = !isNaN(num) ? num.toFixed(2) : '';
  939. if (prop.row.quantity) {
  940. prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2); //计算金额
  941. prop.row.purchaseAmount = (prop.row.purchasePrice * prop.row.quantity).toFixed(2); //计算采购金额
  942. }
  943. }
  944. //计算金额
  945. if (prop.col.key == 'quantity'&& prop.row.salePrice && prop.row.quantity) {
  946. prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2);
  947. }
  948. //计算采购金额
  949. if (prop.col.key == 'quantity' && prop.row.quantity&& prop.row.purchasePrice) {
  950. prop.row.purchaseAmount = (prop.row.purchasePrice * prop.row.quantity).toFixed(2);
  951. }
  952. //计算毛利率/金额
  953. if (prop.col.key == 'salePrice') {
  954. // var num =1 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100-((prop.row.purchasePrice / Number(formData.exchangeRate)) *(1 + prop.row.taxRate / 100) *(1 + prop.row.tariff / 100) *(1 - prop.row.discount / 100)) /prop.row.salePrice;
  955. var num = 1-(prop.row.customerCommision / 100)-(prop.row.purchasePrice*Number(formData.exchangeRate)*(1 + prop.row.tariff / 100))/(prop.row.salePrice/((1 + prop.row.taxRate / 100)/(1 - prop.row.discount / 100)))
  956. num = (Number(num) * 100).toFixed(2);
  957. prop.row.grossMargin = !isNaN(num) ? num : '';
  958. if (prop.row.quantity) {
  959. prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2);
  960. }
  961. }
  962. countGrossMargin()
  963. }
  964. function changeDiscountOrExchangeRate() {
  965. var xTable = saleQuotationFormProductTableRef.value!.getXTable();
  966. var newArr = [...xTable.data];
  967. if (newArr.length > 0) {
  968. formData.exchangeRate = formData.exchangeRate == '' || formData.exchangeRate === null || !formData.exchangeRate ? 1 : formData.exchangeRate;
  969. newArr.map((item) => {
  970. item.discount = formData.custumerDiscount == '' || formData.custumerDiscount === null || !formData.custumerDiscount ? 0 : formData.custumerDiscount;
  971. item.tariff = item.tariff == '' || item.tariff === null || !item.tariff ? 0 : item.tariff;
  972. item.customerCommision = item.customerCommision == '' || item.customerCommision === null || !item.customerCommision ? 0 : item.customerCommision;
  973. item.intermediatorCommission =item.intermediatorCommission == '' || item.intermediatorCommission === null || !item.intermediatorCommission? 0: item.intermediatorCommission;
  974. //汇率默认为1
  975. var num =(item.purchasePrice * Number(formData.exchangeRate)*(1 + item.tariff / 100))/(1 - item.grossMargin / 100 - item.customerCommision / 100)*(1 + item.taxRate / 100)/(1 -item.discount / 100)
  976. item.salePrice = !isNaN(num) ? num.toFixed(2) : '';
  977. if (item.quantity) {
  978. item.taxAmount = (item.salePrice * item.quantity).toFixed(2);
  979. }
  980. // }
  981. });
  982. saleQuotationFormProductTable.dataSource = newArr;
  983. countGrossMargin()
  984. }
  985. }
  986. function setSonList(){
  987. SetSonListRef.value.getTable()
  988. }
  989. function setSonListFiled(value){
  990. var xTable = (saleQuotationFormProductTableRef.value!.getXTable()).data
  991. if(xTable.length>0){
  992. xTable.map(item=>{
  993. item.grossMargin = value.numericalValue
  994. })
  995. }
  996. saleQuotationFormProductTable.dataSource =[...xTable]
  997. changeDiscountOrExchangeRate()
  998. }
  999. function countGrossMargin(){
  1000. var customerCommisionAll = 0,
  1001. platformCommisionAll=0,
  1002. salePriceAll=0,
  1003. purchasePriceAll=0
  1004. var xTable = (saleQuotationFormProductTableRef.value!.getXTable()).data
  1005. xTable.map(item=>{
  1006. customerCommisionAll +=(Number(item.customerCommision)/ 100)*Number(item.taxAmount)
  1007. platformCommisionAll +=(Number(item.intermediatorCommission)/ 100)*Number(item.taxAmount)
  1008. salePriceAll+=Number(item.taxAmount)
  1009. purchasePriceAll+=Number(item.purchaseAmount)
  1010. })
  1011. formData.grossMarginHead = (salePriceAll-customerCommisionAll-platformCommisionAll-(purchasePriceAll/Number(formData.exchangeRate)))/salePriceAll
  1012. formData.grossMarginHead =(Number( formData.grossMarginHead)*100).toFixed(2)
  1013. }
  1014. async function getLinkOptionsArr(customerId){
  1015. var obj = await LinkOption({id:customerId})
  1016. linkOption.value = obj
  1017. if(obj.lenght!==0&&typeof obj === 'undefined'){
  1018. formData.liaisonId = obj[0].id
  1019. formData.liaisonInfo = obj[0].name
  1020. }
  1021. }
  1022. function onChangeLiaison(data){
  1023. if(data&&data!==undefined){
  1024. formData.liaisonId = data.key
  1025. formData.liaisonInfo = data.label[0].children
  1026. }else{
  1027. formData.liaisonId = ''
  1028. formData.liaisonInfo = ''
  1029. }
  1030. }
  1031. return {
  1032. saleQuotationFormShipTableRef,
  1033. saleQuotationFormShipTable,
  1034. saleQuotationFormProductTableRef,
  1035. saleQuotationFormProductTable,
  1036. validatorRules,
  1037. validateInfos,
  1038. activeKey,
  1039. loading,
  1040. formData,
  1041. setFieldsValue,
  1042. handleFormChange,
  1043. formItemLayout,
  1044. disabled,
  1045. getFormData,
  1046. submitForm,
  1047. SelectShipSModalRef,
  1048. add,
  1049. edit,
  1050. formRef,
  1051. selectShip,
  1052. addShip,
  1053. addProduct,
  1054. BaseShipArchiveAccessoriesListRef,
  1055. viewAccessory,
  1056. handleDelete,
  1057. handleDelete1,
  1058. selectProducts,
  1059. SelectPrpductModalRef,
  1060. SelectProjectModalRef,
  1061. ViewHistoryQuotationModalRef,
  1062. SelectSupplierQuotationRef,
  1063. onSearchProject,
  1064. addProject,
  1065. getOptiom,
  1066. classOption,
  1067. getCustomerOptions,
  1068. customerOption,
  1069. quotationPeriod,
  1070. onChangequotationPeriod,
  1071. chooseSupplier,
  1072. changeDelivertTime,
  1073. viewHistory,
  1074. baseUrl,
  1075. VersionDetail,
  1076. queryVersonHistoryData,
  1077. addProductFromSupplier,
  1078. notAllowEdit,
  1079. changeValues,
  1080. getRowRate,
  1081. changeDiscountOrExchangeRate,
  1082. changeExchangeRate,
  1083. setSonList,
  1084. SetSonListRef,
  1085. setSonListFiled,
  1086. linkOption,
  1087. getLinkOptionsArr,
  1088. onChangeLiaison
  1089. };
  1090. },
  1091. });
  1092. </script>
  1093. <style lang="less" scoped>
  1094. /** 时间和数字输入框样式 */
  1095. :deep(.ant-input-number) {
  1096. width: 100%;
  1097. }
  1098. :deep(.ant-calendar-picker) {
  1099. width: 100%;
  1100. }
  1101. // /deep/.vxe-table--body-wrapper{
  1102. // height: 100% !important;
  1103. // }
  1104. /deep/.ant-modal-body {
  1105. padding: 24px !important;
  1106. }
  1107. /deep/.ant-form-item {
  1108. margin-bottom: 8px !important;
  1109. }
  1110. /deep/.vxe-cell--valid-error-msg {
  1111. color: white !important;
  1112. background-color: white !important;
  1113. }
  1114. </style>