You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2718 lines
92 KiB

  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'BU'">
  6. <el-select v-model="searchData.bu" placeholder="请选择" clearable style="width: 120px">
  7. <el-option
  8. v-for = "i in userBuList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="询价单号">
  16. <el-input v-model="searchData.rfqNo" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item label="客户编码">
  19. <span style="cursor: pointer" slot="label" @click="getBaseList(509,2)"><a herf="#">客户编码</a></span>
  20. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'客户名称'">
  23. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'询价日期'">
  26. <el-date-picker
  27. style="width: 120px"
  28. v-model="searchData.requestStartDate"
  29. type="date"
  30. value-format="yyyy-MM-dd"
  31. placeholder="选择日期">
  32. </el-date-picker>
  33. </el-form-item>
  34. <el-form-item label=" ">
  35. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  36. </el-form-item>
  37. <el-form-item :label="' '">
  38. <el-date-picker
  39. style="width: 120px"
  40. v-model="searchData.requestEndDate"
  41. type="date"
  42. value-format="yyyy-MM-dd"
  43. placeholder="选择日期">
  44. </el-date-picker>
  45. </el-form-item>
  46. </el-form>
  47. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  48. <el-form-item :label="'优先等级'">
  49. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false"
  50. dict-type="inquiry_info_priority_level"/>
  51. </el-form-item>
  52. <el-form-item :label="'状态'">
  53. <el-select v-model="searchData.status" style="width: 120px">
  54. <el-option label="全部" value=""></el-option>
  55. <el-option label="草稿" value="C"></el-option>
  56. <el-option label="已下达" value="B"></el-option>
  57. <el-option label="已报价" value="A"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item :label="'PjM'">
  61. <span style="cursor: pointer" slot="label" @click="getBaseList(2008,1)"><a herf="#">PjM</a></span>
  62. <el-input v-model="searchData.requesterName" clearable style="width: 120px"></el-input>
  63. </el-form-item>
  64. <el-form-item :label="'报价专员'">
  65. <span style="cursor: pointer" slot="label" @click="getBaseList(2002,1)"><a herf="#">报价专员</a></span>
  66. <el-input v-model="searchData.quoterName" clearable style="width: 120px"></el-input>
  67. </el-form-item>
  68. <el-form-item :label="'要求报价日期'">
  69. <el-date-picker
  70. style="width: 120px"
  71. v-model="searchData.requiredCompletionStartDate"
  72. type="date"
  73. value-format="yyyy-MM-dd"
  74. placeholder="选择日期">
  75. </el-date-picker>
  76. </el-form-item>
  77. <el-form-item label=" ">
  78. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  79. </el-form-item>
  80. <el-form-item :label="' '">
  81. <el-date-picker
  82. style="width: 120px"
  83. v-model="searchData.requiredCompletionEndDate"
  84. type="date"
  85. value-format="yyyy-MM-dd"
  86. placeholder="选择日期">
  87. </el-date-picker>
  88. </el-form-item>
  89. <el-form-item :label="' '">
  90. <el-button @click="getDataList()">查询</el-button>
  91. <el-button type="primary" @click="addModal()">新增</el-button>
  92. <el-button type="primary" icon="el-icon-upload" @click="handleImportQuotation()">导入</el-button>
  93. <download-excel
  94. :fields="fields()"
  95. :data="exportData"
  96. type="xls"
  97. :name="exportName"
  98. :header="exportHeader"
  99. :footer="exportFooter"
  100. :fetch="createExportData"
  101. :before-generate="startDownload"
  102. :before-finish="finishDownload"
  103. worksheet="导出信息"
  104. class="el-button el-button--primary el-button--medium">
  105. {{ "导出" }}
  106. </download-excel>
  107. </el-form-item>
  108. </el-form>
  109. <!-- 询价列表 -->
  110. <el-table
  111. @header-dragend="handleColumnResize"
  112. height="37vh"
  113. :data="dataList"
  114. border
  115. :row-style="rowStyle"
  116. ref="mainTable"
  117. @row-click="inquiryClickRow"
  118. @current-change="changeCurrentRow"
  119. v-loading="dataListLoading"
  120. style="width: 100%;margin-top: 5px">
  121. <el-table-column
  122. v-for="(item,index) in columnList" :key="index"
  123. :sortable="item.columnSortable"
  124. :prop="item.columnProp"
  125. :header-align="item.headerAlign"
  126. :align="item.align"
  127. :fixed="item.fixed === ''?false:item.fixed"
  128. :min-width="item.columnWidth"
  129. :label="item.columnLabel">
  130. <template slot-scope="scope">
  131. <div v-if="item.columnProp !== 'status' && item.columnProp !== 'priorityLevel'">
  132. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  133. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  134. style="width: 100px; height: 80px"/></span>
  135. </div>
  136. <div v-else-if="item.columnProp === 'status'">
  137. <span v-if="!item.columnHidden">
  138. <span v-if="scope.row.status === 'C'">草稿</span>
  139. <span v-if="scope.row.status === 'B'">下达</span>
  140. <span v-if="scope.row.status === 'A'">已报价</span>
  141. </span>
  142. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  143. style="width: 100px; height: 80px"/></span>
  144. </div>
  145. <div v-else-if="item.columnProp === 'priorityLevel'">
  146. <span v-if="!item.columnHidden">
  147. <span v-if="scope.row.priorityLevel === 'A'">普通</span>
  148. <span v-if="scope.row.priorityLevel === ' B'">重要</span>
  149. <span v-if="scope.row.priorityLevel === ' C'">紧急</span>
  150. </span>
  151. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  152. style="width: 100px; height: 80px"/></span>
  153. </div>
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. fixed="right"
  158. header-align="center"
  159. align="center"
  160. width="140"
  161. label="操作">
  162. <template slot-scope="scope">
  163. <el-link style="cursor: pointer" @click="addInquiryPartModal(scope.row)">新增产品</el-link>
  164. <el-link style="cursor: pointer" v-if="scope.row.status === 'C'"
  165. @click="updateModalStatus(scope.row,'B')">下达
  166. </el-link>
  167. <el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  168. <el-link style="cursor: pointer" @click="delModal(scope.row)">删除</el-link>
  169. </template>
  170. </el-table-column>
  171. </el-table>
  172. <!-- 分页插件 -->
  173. <el-pagination style="margin-top: 0px"
  174. @size-change="sizeChangeHandle"
  175. @current-change="currentChangeHandle"
  176. :current-page="pageIndex"
  177. :page-sizes="[20, 50, 100, 200, 500]"
  178. :page-size="pageSize"
  179. :total="totalPage"
  180. layout="total, sizes, prev, pager, next, jumper">
  181. </el-pagination>
  182. <!-- 询价模态框 -->
  183. <el-dialog :title="modalData.title" v-drag @close="closeSaveDataDialog"
  184. :close-on-click-modal="false" top="10%" :visible.sync="modalFlag" width="568px">
  185. <!-- @open="openSaveDataDialog"-->
  186. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  187. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  188. <el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 110px">
  189. <el-option
  190. v-for = "i in userBuList"
  191. :key = "i.buNo"
  192. :label = "i.buDesc"
  193. :value = "i.buNo">
  194. </el-option>
  195. </el-select>
  196. </el-form-item>
  197. <el-form-item prop="customerNo" label="客户编码">
  198. <span style="cursor: pointer" slot="label" @click="getBaseList(509,1)"><a herf="#">客户编码</a></span>
  199. <el-input v-model="modalData.customerNo" @blur="customerNoBlur" style="width: 110px;"></el-input>
  200. <el-input disabled v-model="modalData.customerDesc" style="width: 300px;"></el-input>
  201. </el-form-item>
  202. </el-form>
  203. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  204. <el-form-item label="询价日期" prop="requestDate" :rules="rules.requestDate">
  205. <el-date-picker
  206. v-model="modalData.requestDate"
  207. type="date"
  208. placeholder="选择日期"
  209. value-format="yyyy-MM-dd"
  210. style="width: 110px;">
  211. </el-date-picker>
  212. </el-form-item>
  213. <el-form-item prop="requesterName" label="PjM">
  214. <span style="cursor: pointer" slot="label" @click="getBaseList(2008,2)"><a herf="#">PjM</a></span>
  215. <el-input v-model="modalData.requester" @blur="requesterBlur(2008)" style="width: 110px;"></el-input>
  216. <el-input disabled v-model="modalData.requesterName" style="width: 120px;"></el-input>
  217. </el-form-item>
  218. <el-form-item label="客户询价单号" prop="customerInquiryNo">
  219. <el-input v-model="modalData.customerInquiryNo" style="width: 166px;"></el-input>
  220. </el-form-item>
  221. </el-form>
  222. <!-- <el-col :span="4">-->
  223. <!-- <el-form-item prop="trackerName">-->
  224. <!-- <span v-if="quotationInformationFlag('tracker') === 'N' && modalData.flag === '2'" slot="label">采购专员</span>-->
  225. <!-- <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2000)"><a herf="#">采购专员</a></span>-->
  226. <!-- <el-input :disabled="quotationInformationFlag('tracker') === 'N' && modalData.flag === '2'" v-model="modalData.trackerName" readonly></el-input>-->
  227. <!-- </el-form-item>-->
  228. <!-- </el-col>-->
  229. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  230. <el-form-item label="要求报价日期" prop="requiredCompletionDate" :rules="rules.requiredCompletionDate">
  231. <el-date-picker
  232. v-model="modalData.requiredCompletionDate"
  233. type="date"
  234. placeholder="选择日期"
  235. value-format="yyyy-MM-dd"
  236. style="width: 110px;">
  237. </el-date-picker>
  238. </el-form-item>
  239. <el-form-item prop="quoterName" label="报价专员">
  240. <span style="cursor: pointer" slot="label" @click="getBaseList(2002,2)"><a herf="#">报价专员</a></span>
  241. <el-input v-model="modalData.quoter" @blur="quoterBlur(2002)" style="width: 110px;"></el-input>
  242. <el-input disabled v-model="modalData.quoterName" style="width: 120px;"></el-input>
  243. </el-form-item>
  244. <el-form-item label="优先等级" >
  245. <dict-data-select v-if="modalFlag"
  246. v-model="modalData.priorityLevel" dict-type="inquiry_info_priority_level"
  247. style="width: 166px;">
  248. </dict-data-select>
  249. </el-form-item>
  250. </el-form>
  251. <el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
  252. <el-form-item label="备注" style="display: block;min-height: 90px">
  253. <el-input type="textarea" :autosize="{minRows: 2, maxRows: 3}" resize='none'
  254. v-model="modalData.remark"></el-input>
  255. </el-form-item>
  256. </el-form>
  257. <el-footer style="height:35px;margin-top: -10px;padding-bottom:5px;text-align:center">
  258. <el-button type="primary" @click="saveData()">保存</el-button>
  259. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  260. </el-footer>
  261. </el-dialog>
  262. <!-- 页签 -->
  263. <el-tabs style="margin-top: 0px; width: 100%; height: 40vh;" v-model="activeTable" class="customer-tab" type="border-card" @tab-click="tabClick">
  264. <!-- 询价详细信息页签 -->
  265. <el-tab-pane label="产品明细" name="inquiryPart">
  266. <!-- 询价产品明细列表 -->
  267. <el-table
  268. @header-dragend="handleColumnResize"
  269. height="37vh"
  270. :data="inquiryPartDataList"
  271. border
  272. ref="secondaryTable"
  273. v-loading="dataListLoading"
  274. style="width: 100%;margin-top: 5px">
  275. <el-table-column
  276. v-for="(item,index) in inquiryPartColumnList" :key="index"
  277. :sortable="item.columnSortable"
  278. :prop="item.columnProp"
  279. :header-align="item.headerAlign"
  280. :align="item.align"
  281. :fixed="item.fixed === ''?false:item.fixed"
  282. :min-width="item.columnWidth"
  283. :label="item.columnLabel">
  284. <template slot-scope="scope">
  285. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  286. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  287. style="width: 100px; height: 80px"/></span>
  288. </template>
  289. </el-table-column>
  290. <el-table-column
  291. fixed="right"
  292. header-align="center"
  293. align="center"
  294. width="120"
  295. label="操作">
  296. <template slot-scope="scope">
  297. <el-link style="cursor: pointer" @click="updateInquiryPartModal(scope.row)">编辑</el-link>
  298. <el-link style="cursor: pointer" @click="delInquiryPartModal(scope.row)">删除</el-link>
  299. <el-link style="cursor: pointer" @click="inquiryPartItemModal(scope.row)">属性</el-link>
  300. <el-link style="cursor: pointer" @click.native="navigateToMes(scope.row.id)">详情</el-link>
  301. </template>
  302. </el-table-column>
  303. </el-table>
  304. </el-tab-pane>
  305. <!-- 询价明细 相关文档 -->
  306. <el-tab-pane label="相关文档" name="inquiryDocument">
  307. <oss-components label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns" :order-ref1="inquiryCurrentRow.site" :order-ref2="inquiryCurrentRow.id"
  308. :rfq-no="inquiryCurrentRow.rfqNo">
  309. </oss-components>
  310. </el-tab-pane>
  311. </el-tabs>
  312. <el-dialog :title="inquiryPartModalData.title" v-drag @close="closeInquiryPartSaveDataDialog"
  313. :close-on-click-modal="false" top="10%" :visible.sync="inquiryPartModalFlag" width="422px">
  314. <!-- @open="openInquiryPartSaveDataDialog"-->
  315. <el-form :inline="true" label-position="top" :model="inquiryPartModalData" :rules="inquiryPartRules" style="margin-top: -5px;">
  316. <!-- <el-form-item prop="partNo" label="产品编码">-->
  317. <!-- <el-input v-model="inquiryPartModalData.partNo" disabled style="width: 128px;"></el-input>-->
  318. <!-- </el-form-item>-->
  319. <el-form-item prop="partDesc" label="产品名称">
  320. <el-input v-model="inquiryPartModalData.partDesc" style="width: 128px"></el-input>
  321. </el-form-item>
  322. <el-form-item label="BU" prop="bu" :rules="inquiryPartRules.bu">
  323. <el-select v-model="inquiryPartModalData.bu" placeholder="请选择" :disabled="inquiryPartModalDisableFlag" style="width: 118px">
  324. <el-option
  325. v-for = "i in userBuList"
  326. :key = "i.buNo"
  327. :label = "i.buDesc"
  328. :value = "i.buNo">
  329. </el-option>
  330. </el-select>
  331. </el-form-item>
  332. <el-form-item label="询价数量" prop="inquiryQty" :rules="inquiryPartRules.inquiryQty">
  333. <el-input-number :controls="false" :step="0" v-model="inquiryPartModalData.inquiryQty" style="width: 118px;"></el-input-number>
  334. </el-form-item>
  335. </el-form>
  336. <el-form :inline="true" label-position="top" :model="inquiryPartModalData" :rules="inquiryPartRules" style="margin-top: -5px;">
  337. <el-form-item prop="umId">
  338. <span style="cursor: pointer" slot="label" @click="getBaseList(510)"><a herf="#">计量单位</a></span>
  339. <el-input v-model="inquiryPartModalData.umId" @blur="umIdBlur(510)" style="width: 128px"></el-input>
  340. <el-input v-model="inquiryPartModalData.umName" disabled style="width: 260px"></el-input>
  341. </el-form-item>
  342. </el-form>
  343. <el-form :inline="true" label-position="top" :model="inquiryPartModalData" :rules="inquiryPartRules" style="margin-top: -5px;">
  344. <el-form-item prop="codeNo" :rules="rules.codeNo">
  345. <span style="cursor: pointer" slot="label" @click="getBaseList(220)"><a herf="#">属性模板</a></span>
  346. <el-input v-model="inquiryPartModalData.codeNo" @blur="modelBlur(220)" style="width: 128px"></el-input>
  347. <el-input v-model="inquiryPartModalData.codeDesc" disabled style="width: 260px"></el-input>
  348. </el-form-item>
  349. <el-form-item label="备注" style="display: block;min-height: 90px">
  350. <el-input type="textarea" :autosize="{minRows: 2, maxRows: 3}" resize='none'
  351. v-model="inquiryPartModalData.remark"></el-input>
  352. </el-form-item>
  353. </el-form>
  354. <el-footer style="height:35px;margin-top: -10px;padding-bottom:5px;text-align:center">
  355. <el-button type="primary" @click="saveInquiryPartData()">保存</el-button>
  356. <el-button type="primary" @click="inquiryPartModalFlag = false">关闭</el-button>
  357. </el-footer>
  358. </el-dialog>
  359. <el-dialog title="询价产品属性维护" v-drag :visible.sync="inquiryPartItemModalFlag" :close-on-click-modal="false"
  360. width="690px" style="height: 100%;margin-top: -60px" class="customer-dialog">
  361. <el-container style="height: 100%;">
  362. <el-form :inline="true" label-position="top" label-width="80px">
  363. <!-- 第一行 -->
  364. <el-row class="customer-row">
  365. <el-col :span="8">
  366. <el-form-item label="BU">
  367. <el-input v-model="this.inquiryPartItemModalData.buDesc" disabled></el-input>
  368. </el-form-item>
  369. </el-col>
  370. <el-col :span="8">
  371. <el-form-item label="询价单号">
  372. <el-input v-model="this.inquiryPartItemModalData.rfqNo" disabled></el-input>
  373. </el-form-item>
  374. </el-col>
  375. <el-col :span="8">
  376. <el-form-item label="产品编码">
  377. <el-input v-model="this.inquiryPartItemModalData.partNo" disabled></el-input>
  378. </el-form-item>
  379. </el-col>
  380. </el-row>
  381. <!--工具属性的使用记录-->
  382. <fieldset class="customer-fieldset" style="width: 650px;">
  383. <legend>属性维护</legend>
  384. <div style="margin-top: 5px">
  385. <el-button type="primary" :loading="loading" @click="clickInquiryPartItemSave">{{ attributeDialog?'编辑':'保存' }}</el-button>
  386. <!-- <el-button type="primary" @click="refreshPropertiesModal" v-if="attributeDialog">刷新属性模板</el-button>-->
  387. </div>
  388. <div class="rq ">
  389. <el-table
  390. @header-dragend="handleColumnResize"
  391. :height="height - 78"
  392. :data="inquiryPartItemDataList"
  393. border
  394. style="width: 100%;margin-top: 5px">
  395. <el-table-column
  396. v-for="(item,index) in inquiryPartItemColumnList" :key="index"
  397. :sortable="item.columnSortable"
  398. :prop="item.columnProp"
  399. :header-align="item.headerAlign"
  400. :show-overflow-tooltip="item.showOverflowTooltip"
  401. :align="item.align"
  402. :fixed="item.fixed===''?false:item.fixed"
  403. :min-width="item.columnWidth"
  404. :label="item.columnLabel">
  405. <template slot-scope="scope">
  406. <div v-if="attributeDialog">
  407. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  408. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  409. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  410. </div>
  411. <div v-else>
  412. {{scope.row.valueTypeDb==='T'?scope.row.textValue:scope.row.numValue}}
  413. </div>
  414. </div>
  415. <div v-else>
  416. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  417. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  418. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  419. </div>
  420. <div v-else>
  421. <div v-if="scope.row.valueChooseFlag !== 'Y'">
  422. <el-input-number v-model="scope.row.numValue" style="padding: 0;width: 100%" v-if="scope.row.valueType === '数字'" :controls="false"></el-input-number>
  423. <el-input v-model="scope.row.textValue" v-else></el-input>
  424. </div>
  425. <div v-else>
  426. <el-select style="width: 100%;" v-if="scope.row.valueType === '文本'" v-model="scope.row.textValue">
  427. <el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option>
  428. </el-select>
  429. <el-select style="width: 100%;" v-else v-model="scope.row.numValue">
  430. <el-option :value="i.availableValue" :label="i.availableValue" v-for="(i,key) in scope.row.availableValueList" :key="key"></el-option>
  431. </el-select>
  432. </div>
  433. </div>
  434. </div>
  435. </template>
  436. </el-table-column>
  437. </el-table>
  438. </div>
  439. </fieldset>
  440. </el-form>
  441. </el-container>
  442. <el-footer style="height:30px;margin-top: 10px;padding-bottom:5px;text-align:center">
  443. <!-- <el-button type="primary" @click="saveInquiryPartData()">保存</el-button>-->
  444. <el-button type="primary" @click="inquiryPartItemModalFlag = false">关闭</el-button>
  445. </el-footer>
  446. </el-dialog>
  447. <!-- chooseList模态框 -->
  448. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  449. <!-- 导入 -->
  450. <quotationUpload ref="quotationUpload" @refreshPageTables="getDataList()" v-drag></quotationUpload>
  451. </div>
  452. </template>
  453. <script>
  454. import Chooselist from '@/views/modules/common/Chooselist_eam'
  455. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  456. import {searchInquiryApplicationInfo,addInquiryApplicationInfo,updateInquiryApplicationInfo,deleteInquiryApplicationInfo} from "@/api/inquiry/inquiryApplication";
  457. import {searchInquiryDetailInfo,addInquiryDetailInfo,updateInquiryDetailInfo,deleteInquiryDetailInfo} from "@/api/inquiry/inquiryDetail";
  458. import {getItemListByInquiryPartAndCodeNo,updateInquiryPartItemList} from "@/api/inquiry/inquiryDetail";
  459. import DictDataSelect from "../sys/dict-data-select.vue";
  460. import {queryCustomerList} from "@/api/customer/customer";
  461. import {verifyData} from "@/api/part/partInformation";
  462. import {EventBus} from "../../../main";
  463. import {partInformationSearch} from "../../../api/part/partInformation";
  464. import quotationUpload from "../quote/quotation_upload.vue";
  465. import OssComponents from "../oss/ossComponents.vue";
  466. import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
  467. export default {
  468. computed: {
  469. // quotationInformationFlag () {
  470. // return (value) => {
  471. // if (!this.plmQuotationInformationArr){
  472. // return 'N'
  473. // }
  474. // let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value)
  475. // if (arr.length > 0) {
  476. // return arr[0].updateFlag
  477. // }
  478. // return 'N'
  479. // }
  480. // },
  481. },
  482. components: {
  483. OssComponents,
  484. quotationUpload,
  485. DictDataSelect,
  486. Chooselist
  487. },
  488. props:{
  489. height:{
  490. type:Number,
  491. default:200
  492. }
  493. },
  494. watch: {
  495. searchData: {
  496. deep: true,
  497. handler: function (newV, oldV) {
  498. if (this.searchData.customerNo !== '' || this.searchData.rfqNo !== ''){
  499. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  500. this.searchData.rfqNo = this.searchData.rfqNo.toUpperCase()
  501. }
  502. }
  503. },
  504. modalData: {
  505. deep: true,
  506. handler: function (newV, oldV) {
  507. if (this.modalData.customerNo !== '' || this.modalData.rfqNo !== '') {
  508. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  509. this.modalData.rfqNo = this.modalData.rfqNo.toUpperCase()
  510. }
  511. }
  512. },
  513. inquiryPartModalData: {
  514. deep: true,
  515. handler: function (newV, oldV) {
  516. if (this.inquiryPartModalData.partNo !== '' || this.inquiryPartModalData.codeNo !== '' || this.inquiryPartModalData.umId !== '') {
  517. this.inquiryPartModalData.partNo = this.inquiryPartModalData.partNo.toUpperCase()
  518. this.inquiryPartModalData.codeNo = this.inquiryPartModalData.codeNo.toUpperCase()
  519. this.inquiryPartModalData.umId = this.inquiryPartModalData.umId.toUpperCase()
  520. }
  521. }
  522. }
  523. },
  524. data() {
  525. return {
  526. userBuList: [],
  527. copyPriceCheckDetail:{},
  528. loading:false,
  529. attributeDialog:true,
  530. priceCheckRule: {
  531. associatedPartNo:[{required: true, message: ' ', trigger: 'change'},],
  532. materialRequired:[{required: true, message: ' ', trigger: 'change'},],
  533. yearlyOrMonthlyRequirement:[{required: true, message: ' ', trigger: 'change'},],
  534. runningWidth:[{required: true, message: ' ', trigger: 'change'},],
  535. },
  536. savePriceDetail:{
  537. site:'',
  538. quotationNo:'',
  539. associatedPartNo:'',
  540. materialRequired:'',
  541. yearlyOrMonthlyRequirement:'',
  542. runningWidth:'',
  543. },
  544. activeTab:'part',
  545. priceCheckPropertiesList: [],
  546. // 导出
  547. exportData: [],
  548. exportName: '询价申请' + this.dayjs().format('YYYYMMDDHHmmss'),
  549. exportHeader: ['询价申请'],
  550. exportFooter: [],
  551. resultList: [],
  552. uploadUrl: '/plm/quotationInformation/uploadExcel',
  553. // ======== 行高 ========
  554. secondHeight: 200,
  555. // ======== 分页 ========
  556. pageIndex: 1,
  557. pageSize: 50,
  558. totalPage: 0,
  559. selectedDataNum: 0,
  560. // 条件查询
  561. searchData: {
  562. site: this.$store.state.user.site,
  563. id: '',
  564. customerNo: '',
  565. customerDesc: '',
  566. rfqNo: '',
  567. bu: '',
  568. requestStartDate: '',
  569. requestEndDate: '',
  570. requiredCompletionStartDate: '',
  571. requiredCompletionEndDate: '',
  572. status: '',
  573. quoterName: '',
  574. requesterName: '',
  575. priorityLevel: '',
  576. page: 1,
  577. limit: 10,
  578. menuId: this.$route.meta.menuId,
  579. },
  580. // 其它
  581. dataListLoading: false,
  582. // 选择项目弹框开关
  583. chooseProjectListFlag: false,
  584. // 初始页签
  585. activeTable: 'inquiryPart',
  586. // ======== 数据对象 ========
  587. modalData: {
  588. flag: '',
  589. title: '',
  590. site: this.$store.state.user.site,
  591. userName: this.$store.state.user.name,
  592. id: '',
  593. rfqNo: '',
  594. customerNo: '',
  595. customerDesc: '',
  596. requestDate: '',
  597. requester: '',
  598. requesterName: '',
  599. customerInquiryNo: '',
  600. priorityLevel: '',
  601. requiredCompletionDate: '',
  602. quoter: '',
  603. quoterName: '',
  604. status: '',
  605. remark: '',
  606. createDate: '',
  607. createBy: '',
  608. updateDate: '',
  609. updateBy: '',
  610. },
  611. inquiryPartModalData: {
  612. flag: '',
  613. title: '',
  614. site: this.$store.state.user.site,
  615. userName: this.$store.state.user.name,
  616. id: '',
  617. rfqId: '',
  618. partNo: '',
  619. partDesc: '',
  620. inquiryQty: '',
  621. umId: '',
  622. umName: '',
  623. codeNo: '',
  624. codeDesc: '',
  625. remark: '',
  626. createDate: '',
  627. createBy: '',
  628. updateDate: '',
  629. updateBy: '',
  630. },
  631. inquiryPartItemModalData: {
  632. bu: '',
  633. buDesc: '',
  634. rfqNo: '',
  635. partNo: '',
  636. partDesc: '',
  637. umId: '',
  638. umName: '',
  639. codeNo: '',
  640. codeDesc: '',
  641. textValue: '',
  642. numValue: '',
  643. valueType: '',
  644. valueTypeDb: '',
  645. valueChooseFlag: '',
  646. availableValueList: [],
  647. },
  648. ossColumns:[
  649. {
  650. userId: this.$store.state.user.name,
  651. functionId: 103001,
  652. serialNumber: '103001Table2FileName',
  653. tableId: '103001Table2',
  654. tableName: '文件信息表',
  655. columnProp: 'fileName',
  656. headerAlign: 'center',
  657. align: 'center',
  658. columnLabel: '文件名称',
  659. columnHidden: false,
  660. columnImage: false,
  661. columnSortable: false,
  662. sortLv: 0,
  663. status: true,
  664. fixed: '',
  665. columnWidth: 140
  666. },
  667. {
  668. userId: this.$store.state.user.name,
  669. functionId: 103001,
  670. serialNumber: '103001Table2FileRemark',
  671. tableId: '103001Table2',
  672. tableName: '文件信息表',
  673. columnProp: 'fileRemark',
  674. headerAlign: 'center',
  675. align: 'center',
  676. columnLabel: '备注',
  677. columnHidden: false,
  678. columnImage: false,
  679. columnSortable: false,
  680. sortLv: 0,
  681. status: true,
  682. fixed: '',
  683. columnWidth: 240
  684. },
  685. // {
  686. // userId: this.$store.state.user.name,
  687. // functionId: 103001,
  688. // serialNumber: '103001Table2OrderRef3',
  689. // tableId: '103001Table2',
  690. // tableName: '文件信息表',
  691. // columnProp: 'orderRef3',
  692. // headerAlign: 'center',
  693. // align: 'center',
  694. // columnLabel: '文件描述',
  695. // columnHidden: false,
  696. // columnImage: false,
  697. // columnSortable: false,
  698. // sortLv: 0,
  699. // status: true,
  700. // fixed: '',
  701. // columnWidth: 120
  702. // },
  703. {
  704. userId: this.$store.state.user.name,
  705. functionId: 103001,
  706. serialNumber: '103001Table2CreateDate',
  707. tableId: '103001Table2',
  708. tableName: '文件信息表',
  709. columnProp: 'createDate',
  710. headerAlign: 'center',
  711. align: 'center',
  712. columnLabel: '上传时间',
  713. columnHidden: false,
  714. columnImage: false,
  715. columnSortable: false,
  716. sortLv: 0,
  717. status: true,
  718. fixed: '',
  719. columnWidth: 140
  720. },
  721. {
  722. userId: this.$store.state.user.name,
  723. functionId: 103001,
  724. serialNumber: '103001Table2CreatedBy',
  725. tableId: '103001Table2',
  726. tableName: '文件信息表',
  727. columnProp: 'createdBy',
  728. headerAlign: 'center',
  729. align: 'center',
  730. columnLabel: '上传人',
  731. columnHidden: false,
  732. columnImage: false,
  733. columnSortable: false,
  734. sortLv: 0,
  735. status: true,
  736. fixed: '',
  737. columnWidth: 140
  738. }
  739. ],
  740. // ======== 数据列表 ========
  741. dataList: [],
  742. inquiryPartDataList: [],
  743. inquiryPartItemDataList: [],
  744. // ======== 列表表头 ========
  745. columnList: [
  746. {
  747. userId: this.$store.state.user.name,
  748. functionId: 5022,
  749. serialNumber: '5022Table1BuDesc',
  750. tableId: '5022Table1',
  751. tableName: '询价信息表',
  752. columnProp: 'buDesc',
  753. headerAlign: 'center',
  754. align: 'center',
  755. columnLabel: 'BU',
  756. columnHidden: false,
  757. columnImage: false,
  758. columnSortable: false,
  759. sortLv: 0,
  760. status: true,
  761. fixed: '',
  762. columnWidth: 80
  763. },
  764. {
  765. userId: this.$store.state.user.name,
  766. functionId: 5022,
  767. serialNumber: '5022Table1rfqNo',
  768. tableId: '5022Table1',
  769. tableName: '询价信息表',
  770. columnProp: 'rfqNo',
  771. headerAlign: 'center',
  772. align: 'center',
  773. columnLabel: '询价单号',
  774. columnHidden: false,
  775. columnImage: false,
  776. columnSortable: false,
  777. sortLv: 0,
  778. status: true,
  779. fixed: '',
  780. columnWidth: 120
  781. },
  782. {
  783. userId: this.$store.state.user.name,
  784. functionId: 5022,
  785. serialNumber: '5022Table1CustomerNo',
  786. tableId: '5022Table1',
  787. tableName: '询价信息表',
  788. columnProp: 'customerNo',
  789. headerAlign: 'center',
  790. align: 'center',
  791. columnLabel: '客户编码',
  792. columnHidden: false,
  793. columnImage: false,
  794. columnSortable: false,
  795. sortLv: 0,
  796. status: true,
  797. fixed: '',
  798. columnWidth: 100
  799. },
  800. {
  801. userId: this.$store.state.user.name,
  802. functionId: 5022,
  803. serialNumber: '5022Table1CustomerDesc',
  804. tableId: '5022Table1',
  805. tableName: '询价信息表',
  806. columnProp: 'customerDesc',
  807. headerAlign: 'center',
  808. align: 'center',
  809. columnLabel: '客户名称',
  810. columnHidden: false,
  811. columnImage: false,
  812. columnSortable: false,
  813. sortLv: 0,
  814. status: true,
  815. fixed: '',
  816. columnWidth: 120
  817. },
  818. {
  819. userId: this.$store.state.user.name,
  820. functionId: 5022,
  821. serialNumber: '5022Table1RequestDate',
  822. tableId: '5022Table1',
  823. tableName: '询价信息表',
  824. columnProp: 'requestDate',
  825. headerAlign: 'center',
  826. align: 'center',
  827. columnLabel: '询价日期',
  828. columnHidden: false,
  829. columnImage: false,
  830. columnSortable: false,
  831. sortLv: 0,
  832. status: true,
  833. fixed: '',
  834. columnWidth: 120
  835. },
  836. {
  837. userId: this.$store.state.user.name,
  838. functionId: 5022,
  839. serialNumber: '5022Table1RequesterName',
  840. tableId: '5022Table1',
  841. tableName: '询价信息表',
  842. columnProp: 'requesterName',
  843. headerAlign: 'center',
  844. align: 'center',
  845. columnLabel: 'PjM',
  846. columnHidden: false,
  847. columnImage: false,
  848. columnSortable: false,
  849. sortLv: 0,
  850. status: true,
  851. fixed: '',
  852. columnWidth: 80
  853. },
  854. {
  855. userId: this.$store.state.user.name,
  856. functionId: 5022,
  857. serialNumber: '5022Table1QuoterName',
  858. tableId: '5022Table1',
  859. tableName: '询价信息表',
  860. columnProp: 'quoterName',
  861. headerAlign: 'center',
  862. align: 'center',
  863. columnLabel: '报价专员',
  864. columnHidden: false,
  865. columnImage: false,
  866. columnSortable: false,
  867. sortLv: 0,
  868. status: true,
  869. fixed: '',
  870. columnWidth: 80
  871. },
  872. {
  873. userId: this.$store.state.user.name,
  874. functionId: 5022,
  875. serialNumber: '5022Table1RequiredCompletionDate',
  876. tableId: '5022Table1',
  877. tableName: '询价信息表',
  878. columnProp: 'requiredCompletionDate',
  879. headerAlign: 'center',
  880. align: 'center',
  881. columnLabel: '要求报价日期',
  882. columnHidden: false,
  883. columnImage: false,
  884. columnSortable: false,
  885. sortLv: 0,
  886. status: true,
  887. fixed: '',
  888. columnWidth: 120
  889. },
  890. {
  891. userId: this.$store.state.user.name,
  892. functionId: 5022,
  893. serialNumber: '5022Table1CustomerInquiryNo',
  894. tableId: '5022Table1',
  895. tableName: '询价信息表',
  896. columnProp: 'customerInquiryNo',
  897. headerAlign: 'center',
  898. align: 'center',
  899. columnLabel: '客户询价单号',
  900. columnHidden: false,
  901. columnImage: false,
  902. columnSortable: false,
  903. sortLv: 0,
  904. status: true,
  905. fixed: '',
  906. columnWidth: 120
  907. },
  908. {
  909. userId: this.$store.state.user.name,
  910. functionId: 5022,
  911. serialNumber: '5022Table1PriorityLevel',
  912. tableId: '5022Table1',
  913. tableName: '询价信息表',
  914. columnProp: 'priorityLevel',
  915. headerAlign: 'center',
  916. align: 'center',
  917. columnLabel: '优先等级',
  918. columnHidden: false,
  919. columnImage: false,
  920. columnSortable: false,
  921. sortLv: 0,
  922. status: true,
  923. fixed: '',
  924. columnWidth: 80
  925. },
  926. {
  927. userId: this.$store.state.user.name,
  928. functionId: 5022,
  929. serialNumber: '5022Table1Status',
  930. tableId: '5022Table1',
  931. tableName: '询价信息表',
  932. columnProp: 'status',
  933. headerAlign: 'center',
  934. align: 'center',
  935. columnLabel: '状态',
  936. columnHidden: false,
  937. columnImage: false,
  938. columnSortable: false,
  939. sortLv: 0,
  940. status: true,
  941. fixed: '',
  942. columnWidth: 100
  943. },
  944. {
  945. userId: this.$store.state.user.name,
  946. functionId: 5022,
  947. serialNumber: '5022Table1Status',
  948. tableId: '5022Table1',
  949. tableName: '询价信息表',
  950. columnProp: 'remark',
  951. headerAlign: 'center',
  952. align: 'center',
  953. columnLabel: '备注',
  954. columnHidden: false,
  955. columnImage: false,
  956. columnSortable: false,
  957. sortLv: 0,
  958. status: true,
  959. fixed: '',
  960. columnWidth: 120
  961. },
  962. {
  963. userId: this.$store.state.user.name,
  964. functionId: 5022,
  965. serialNumber: '5022Table1CreateDate',
  966. tableId: '5022Table1',
  967. tableName: '询价信息表',
  968. columnProp: 'createDate',
  969. headerAlign: 'center',
  970. align: 'center',
  971. columnLabel: '创建时间',
  972. columnHidden: false,
  973. columnImage: false,
  974. columnSortable: false,
  975. sortLv: 0,
  976. status: true,
  977. fixed: '',
  978. columnWidth: 160
  979. },
  980. {
  981. userId: this.$store.state.user.name,
  982. functionId: 5022,
  983. serialNumber: '5022Table1CreateBy',
  984. tableId: '5022Table1',
  985. tableName: '询价信息表',
  986. columnProp: 'createBy',
  987. headerAlign: 'center',
  988. align: 'center',
  989. columnLabel: '创建人',
  990. columnHidden: false,
  991. columnImage: false,
  992. columnSortable: false,
  993. sortLv: 0,
  994. status: true,
  995. fixed: '',
  996. columnWidth: 80
  997. },
  998. {
  999. userId: this.$store.state.user.name,
  1000. functionId: 5022,
  1001. serialNumber: '5022Table1UpdateDate',
  1002. tableId: '5022Table1',
  1003. tableName: '询价信息表',
  1004. columnProp: 'updateDate',
  1005. headerAlign: 'center',
  1006. align: 'center',
  1007. columnLabel: '更新时间',
  1008. columnHidden: false,
  1009. columnImage: false,
  1010. columnSortable: false,
  1011. sortLv: 0,
  1012. status: true,
  1013. fixed: '',
  1014. columnWidth: 160
  1015. },
  1016. {
  1017. userId: this.$store.state.user.name,
  1018. functionId: 5022,
  1019. serialNumber: '5022Table1UpdateBy',
  1020. tableId: '5022Table1',
  1021. tableName: '询价信息表',
  1022. columnProp: 'updateBy',
  1023. headerAlign: 'center',
  1024. align: 'center',
  1025. columnLabel: '更新人',
  1026. columnHidden: false,
  1027. columnImage: false,
  1028. columnSortable: false,
  1029. sortLv: 0,
  1030. status: true,
  1031. fixed: '',
  1032. columnWidth: 80
  1033. }
  1034. ],
  1035. inquiryPartColumnList: [
  1036. {
  1037. userId: this.$store.state.user.name,
  1038. functionId: 5022,
  1039. serialNumber: '5022Table2BuDesc',
  1040. tableId: '5022Table2',
  1041. tableName: '询价产品表',
  1042. columnProp: 'buDesc',
  1043. headerAlign: 'center',
  1044. align: 'center',
  1045. columnLabel: 'BU',
  1046. columnHidden: false,
  1047. columnImage: false,
  1048. columnSortable: false,
  1049. sortLv: 0,
  1050. status: true,
  1051. fixed: '',
  1052. columnWidth: 80
  1053. },
  1054. {
  1055. userId: this.$store.state.user.name,
  1056. functionId: 5022,
  1057. serialNumber: '5022Table2PartNo',
  1058. tableId: '5022Table2',
  1059. tableName: '询价产品表',
  1060. columnProp: 'partNo',
  1061. headerAlign: 'center',
  1062. align: 'center',
  1063. columnLabel: '产品编码',
  1064. columnHidden: false,
  1065. columnImage: false,
  1066. columnSortable: false,
  1067. sortLv: 0,
  1068. status: true,
  1069. fixed: '',
  1070. columnWidth: 120
  1071. },
  1072. {
  1073. userId: this.$store.state.user.name,
  1074. functionId: 5022,
  1075. serialNumber: '5022Table2PartDesc',
  1076. tableId: '5022Table2',
  1077. tableName: '询价产品表',
  1078. columnProp: 'partDesc',
  1079. headerAlign: 'center',
  1080. align: 'center',
  1081. columnLabel: '产品描述',
  1082. columnHidden: false,
  1083. columnImage: false,
  1084. columnSortable: false,
  1085. sortLv: 0,
  1086. status: true,
  1087. fixed: '',
  1088. columnWidth: 120
  1089. },
  1090. {
  1091. userId: this.$store.state.user.name,
  1092. functionId: 5022,
  1093. serialNumber: '5022Table2InquiryQty',
  1094. tableId: '5022Table2',
  1095. tableName: '询价产品表',
  1096. columnProp: 'inquiryQty',
  1097. headerAlign: 'center',
  1098. align: 'right',
  1099. columnLabel: '询价数量',
  1100. columnHidden: false,
  1101. columnImage: false,
  1102. columnSortable: false,
  1103. sortLv: 0,
  1104. status: true,
  1105. fixed: '',
  1106. columnWidth: 120
  1107. },
  1108. {
  1109. userId: this.$store.state.user.name,
  1110. functionId: 5022,
  1111. serialNumber: '5022Table2Unit',
  1112. tableId: '5022Table2',
  1113. tableName: '询价产品表',
  1114. columnProp: 'umName',
  1115. headerAlign: 'center',
  1116. align: 'center',
  1117. columnLabel: '计量单位',
  1118. columnHidden: false,
  1119. columnImage: false,
  1120. columnSortable: false,
  1121. sortLv: 0,
  1122. status: true,
  1123. fixed: '',
  1124. columnWidth: 80
  1125. },
  1126. {
  1127. userId: this.$store.state.user.name,
  1128. functionId: 5022,
  1129. serialNumber: '5022Table2CodeNo',
  1130. tableId: '5022Table2',
  1131. tableName: '询价产品表',
  1132. columnProp: 'codeNo',
  1133. headerAlign: 'center',
  1134. align: 'center',
  1135. columnLabel: '属性模版',
  1136. columnHidden: false,
  1137. columnImage: false,
  1138. columnSortable: false,
  1139. sortLv: 0,
  1140. status: true,
  1141. fixed: '',
  1142. columnWidth: 120
  1143. },
  1144. {
  1145. userId: this.$store.state.user.name,
  1146. functionId: 5022,
  1147. serialNumber: '5022Table2Remark',
  1148. tableId: '5022Table2',
  1149. tableName: '询价产品表',
  1150. columnProp: 'remark',
  1151. headerAlign: 'center',
  1152. align: 'center',
  1153. columnLabel: '备注',
  1154. columnHidden: false,
  1155. columnImage: false,
  1156. columnSortable: false,
  1157. sortLv: 0,
  1158. status: true,
  1159. fixed: '',
  1160. columnWidth: 120
  1161. },
  1162. {
  1163. userId: this.$store.state.user.name,
  1164. functionId: 5022,
  1165. serialNumber: '5022Table2CreateDate',
  1166. tableId: '5022Table2',
  1167. tableName: '询价产品表',
  1168. columnProp: 'createDate',
  1169. headerAlign: 'center',
  1170. align: 'center',
  1171. columnLabel: '创建时间',
  1172. columnHidden: false,
  1173. columnImage: false,
  1174. columnSortable: false,
  1175. sortLv: 0,
  1176. status: true,
  1177. fixed: '',
  1178. columnWidth: 160
  1179. },
  1180. {
  1181. userId: this.$store.state.user.name,
  1182. functionId: 5022,
  1183. serialNumber: '5022Table2CreateBy',
  1184. tableId: '5022Table2',
  1185. tableName: '询价产品表',
  1186. columnProp: 'createBy',
  1187. headerAlign: 'center',
  1188. align: 'center',
  1189. columnLabel: '创建人',
  1190. columnHidden: false,
  1191. columnImage: false,
  1192. columnSortable: false,
  1193. sortLv: 0,
  1194. status: true,
  1195. fixed: '',
  1196. columnWidth: 80
  1197. },
  1198. {
  1199. userId: this.$store.state.user.name,
  1200. functionId: 5022,
  1201. serialNumber: '5022Table2UpdateDate',
  1202. tableId: '5022Table2',
  1203. tableName: '询价产品表',
  1204. columnProp: 'updateDate',
  1205. headerAlign: 'center',
  1206. align: 'center',
  1207. columnLabel: '更新时间',
  1208. columnHidden: false,
  1209. columnImage: false,
  1210. columnSortable: false,
  1211. sortLv: 0,
  1212. status: true,
  1213. fixed: '',
  1214. columnWidth: 160
  1215. },
  1216. {
  1217. userId: this.$store.state.user.name,
  1218. functionId: 5022,
  1219. serialNumber: '5022Table2UpdateBy',
  1220. tableId: '5022Table2',
  1221. tableName: '询价产品表',
  1222. columnProp: 'updateBy',
  1223. headerAlign: 'center',
  1224. align: 'center',
  1225. columnLabel: '更新人',
  1226. columnHidden: false,
  1227. columnImage: false,
  1228. columnSortable: false,
  1229. sortLv: 0,
  1230. status: true,
  1231. fixed: '',
  1232. columnWidth: 80
  1233. }
  1234. ],
  1235. inquiryPartItemColumnList: [
  1236. {
  1237. userId: this.$store.state.user.name,
  1238. functionId: 100002001,
  1239. serialNumber: '100002001TableItemNo',
  1240. tableId: "100002001Table",
  1241. tableName: "属性表",
  1242. columnProp: 'itemNo',
  1243. headerAlign: "center",
  1244. align: "center",
  1245. columnLabel: '属性编码',
  1246. columnHidden: false,
  1247. columnImage: false,
  1248. columnSortable: false,
  1249. sortLv: 0,
  1250. status: true,
  1251. fixed: '',
  1252. },{
  1253. userId: this.$store.state.user.name,
  1254. functionId: 100002001,
  1255. serialNumber: '100002001TableItemDesc',
  1256. tableId: "100002001Table",
  1257. tableName: "属性表",
  1258. columnProp: 'itemDesc',
  1259. headerAlign: "center",
  1260. align: "center",
  1261. columnLabel: '属性名称',
  1262. columnHidden: false,
  1263. columnImage: false,
  1264. columnSortable: false,
  1265. sortLv: 0,
  1266. status: true,
  1267. fixed: '',
  1268. },
  1269. {
  1270. userId: this.$store.state.user.name,
  1271. functionId: 100002001,
  1272. serialNumber: '100002001TableValueType',
  1273. tableId: "100002001Table",
  1274. tableName: "属性表",
  1275. columnProp: 'valueType',
  1276. headerAlign: "center",
  1277. align: "center",
  1278. columnLabel: '值类型',
  1279. columnHidden: false,
  1280. columnImage: false,
  1281. columnSortable: false,
  1282. sortLv: 0,
  1283. status: true,
  1284. fixed: '',
  1285. columnWidth:80,
  1286. },
  1287. // {
  1288. // userId: this.$store.state.user.name,
  1289. // functionId: 100002001,
  1290. // serialNumber: '100002001TableMinValue',
  1291. // tableId: "100002001Table",
  1292. // tableName: "属性表",
  1293. // columnProp: 'minValue',
  1294. // headerAlign: "center",
  1295. // align: "center",
  1296. // columnLabel: '最小值',
  1297. // columnHidden: false,
  1298. // columnImage: false,
  1299. // columnSortable: false,
  1300. // sortLv: 0,
  1301. // status: true,
  1302. // fixed: '',
  1303. // columnWidth:80,
  1304. // },{
  1305. // userId: this.$store.state.user.name,
  1306. // functionId: 100002001,
  1307. // serialNumber: '100002001TableMaxValue',
  1308. // tableId: "100002001Table",
  1309. // tableName: "属性表",
  1310. // columnProp: 'maxValue',
  1311. // headerAlign: "center",
  1312. // align: "center",
  1313. // columnLabel: '最大值',
  1314. // columnHidden: false,
  1315. // columnImage: false,
  1316. // columnSortable: false,
  1317. // sortLv: 0,
  1318. // status: true,
  1319. // fixed: '',
  1320. // columnWidth:80,
  1321. // },
  1322. {
  1323. userId: this.$store.state.user.name,
  1324. functionId: 100002001,
  1325. serialNumber: '100002001TableMaxValue',
  1326. tableId: "100002001Table",
  1327. tableName: "属性表",
  1328. columnProp: 'textValue',
  1329. headerAlign: "center",
  1330. align: "center",
  1331. columnLabel: '属性值',
  1332. columnHidden: false,
  1333. columnImage: false,
  1334. columnSortable: false,
  1335. sortLv: 0,
  1336. status: true,
  1337. fixed: '',
  1338. columnWidth:120,
  1339. },
  1340. // {
  1341. // userId: this.$store.state.user.name,
  1342. // functionId: 100002001,
  1343. // serialNumber: '100002001TableMinValue',
  1344. // tableId: "100002001Table",
  1345. // tableName: "属性表",
  1346. // columnProp: 'numValue',
  1347. // headerAlign: "center",
  1348. // align: "right",
  1349. // columnLabel: '数字值',
  1350. // columnHidden: false,
  1351. // columnImage: false,
  1352. // columnSortable: false,
  1353. // sortLv: 0,
  1354. // status: true,
  1355. // fixed: '',
  1356. // columnWidth:120,
  1357. // },
  1358. // {
  1359. // userId: this.$store.state.user.name,
  1360. // functionId: 100002001,
  1361. // serialNumber: '100002001TableDefaultValue',
  1362. // tableId: "100002001Table",
  1363. // tableName: "属性表",
  1364. // columnProp: 'defaultValue',
  1365. // headerAlign: "center",
  1366. // align: "right",
  1367. // columnLabel: '参照值',
  1368. // columnHidden: false,
  1369. // columnImage: false,
  1370. // columnSortable: false,
  1371. // sortLv: 0,
  1372. // status: true,
  1373. // fixed: '',
  1374. // },
  1375. ],
  1376. // ======== 必填规则 ========
  1377. rules: {
  1378. bu: [
  1379. {required: true, message: ' ', trigger: 'change'},
  1380. {required: true, message: ' ', trigger: 'blur'},
  1381. ],
  1382. rfqNo: [
  1383. {required: true, message: ' ', trigger: 'change'},
  1384. {required: true, message: ' ', trigger: 'blur'},
  1385. ],
  1386. customerNo: [
  1387. {required: true, message: ' ', trigger: 'change'},
  1388. {required: true, message: ' ', trigger: 'blur'},
  1389. ],
  1390. customerDesc: [
  1391. {required: true, message: ' ', trigger: 'change'},
  1392. {required: true, message: ' ', trigger: 'blur'},
  1393. ],
  1394. requester: [
  1395. {required: true, message: ' ', trigger: 'change'},
  1396. {required: true, message: ' ', trigger: 'blur'},
  1397. ],
  1398. requesterName: [
  1399. {required: true, message: ' ', trigger: 'change'},
  1400. {required: true, message: ' ', trigger: 'blur'},
  1401. ],
  1402. quoter: [
  1403. {required: true, message: ' ', trigger: 'change'},
  1404. {required: true, message: ' ', trigger: 'blur'},
  1405. ],
  1406. quoterName: [
  1407. {required: true, message: ' ', trigger: 'change'},
  1408. {required: true, message: ' ', trigger: 'blur'},
  1409. ],
  1410. priorityLevel: [
  1411. {required: true, message: ' ', trigger: 'change'},
  1412. ],
  1413. requiredCompletionDate: [
  1414. {required: true, message: ' ', trigger: 'change'},
  1415. {required: true, message: ' ', trigger: 'blur'},
  1416. ],
  1417. requestDate: [
  1418. {required: true, message: ' ', trigger: 'change'},
  1419. {required: true, message: ' ', trigger: 'blur'},
  1420. ],
  1421. },
  1422. inquiryPartRules: {
  1423. bu: [
  1424. {required: true, message: ' ', trigger: 'change'},
  1425. {required: true, message: ' ', trigger: 'blur'},
  1426. ],
  1427. partNo: [
  1428. {required: true, message: ' ', trigger: 'change'},
  1429. {required: true, message: ' ', trigger: 'blur'},
  1430. ],
  1431. partDesc: [
  1432. {required: true, message: ' ', trigger: 'change'},
  1433. {required: true, message: ' ', trigger: 'blur'},
  1434. ],
  1435. inquiryQty: [
  1436. {required: true, message: ' ', trigger: 'change'},
  1437. {required: true, message: ' ', trigger: 'blur'},
  1438. ],
  1439. umId: [
  1440. {required: true, message: ' ', trigger: 'change'},
  1441. {required: true, message: ' ', trigger: 'blur'},
  1442. ],
  1443. codeNo: [
  1444. {required: true, message: ' ', trigger: 'change'},
  1445. {required: true, message: ' ', trigger: 'blur'},
  1446. ],
  1447. },
  1448. // ======== 选中的当前行数据 ========
  1449. inquiryCurrentRow: {},
  1450. // ======== 模态框开关控制 ========
  1451. modalFlag: false,
  1452. modalDisableFlag: false,
  1453. inquiryPartModalFlag: false,
  1454. inquiryPartModalDisableFlag: false,
  1455. inquiryPartItemModalFlag: false,
  1456. }
  1457. },
  1458. mounted() {
  1459. this.$nextTick(() => {
  1460. /*第二个表格高度的动态调整*/
  1461. this.height = window.innerHeight - 210;
  1462. })
  1463. },
  1464. created() {
  1465. this.getSiteAndBuByUserName()
  1466. // 动态列
  1467. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1468. this.getDataList()
  1469. },
  1470. methods: {
  1471. handleColumnResize(newWidth, oldWidth, column, event){
  1472. let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
  1473. inData.columnWidth=newWidth
  1474. updateColumnSize(inData).then(({data}) => {
  1475. if (data.code === 0) {
  1476. console.log("栏位宽度保存成功!")
  1477. }
  1478. })
  1479. },
  1480. // 获取用户的bu
  1481. getSiteAndBuByUserName () {
  1482. let tempData = {
  1483. username: this.$store.state.user.name,
  1484. }
  1485. getSiteAndBuByUserName(tempData).then(({data}) => {
  1486. if (data.code === 0) {
  1487. this.userBuList = data.rows
  1488. }
  1489. })
  1490. },
  1491. // ======== 分页相关方法 ========
  1492. /**
  1493. * 每页数
  1494. * @param val
  1495. */
  1496. sizeChangeHandle(val) {
  1497. this.pageSize = val
  1498. this.pageIndex = 1
  1499. this.getDataList()
  1500. },
  1501. /**
  1502. * 当前页
  1503. * @param val
  1504. */
  1505. currentChangeHandle(val) {
  1506. this.pageIndex = val
  1507. this.getDataList()
  1508. },
  1509. // ======== 页签切换相关方法 ========
  1510. /**
  1511. * 列表表格选择替换
  1512. * @param tab
  1513. * @param event
  1514. */
  1515. tabClick(tab, event) {
  1516. // 刷新列表数据
  1517. this.refreshCurrentTabTable()
  1518. },
  1519. // ======== 列表操作方法 ========
  1520. /**
  1521. * 单机选中询价信息
  1522. * @param row
  1523. */
  1524. inquiryClickRow(row) {
  1525. this.inquiryCurrentRow = JSON.parse(JSON.stringify(row))
  1526. },
  1527. /**
  1528. * 当前值发生变化的时候修改
  1529. * @param row
  1530. * @param oldRow
  1531. */
  1532. changeCurrentRow(row, oldRow) {
  1533. // 判断是否是获取焦点的事件
  1534. if (row) {
  1535. this.inquiryCurrentRow = JSON.parse(JSON.stringify(row))
  1536. //刷新当前页表
  1537. this.refreshCurrentTabTable()
  1538. }
  1539. },
  1540. /**
  1541. * 刷新页签的table数据
  1542. */
  1543. refreshCurrentTabTable() {
  1544. if (this.activeTable === 'inquiryPart') {
  1545. this.searchInquiryDetailInfo()
  1546. }
  1547. },
  1548. // ======== 列表数据刷新方法 ========
  1549. /**
  1550. * 获取数据列表
  1551. */
  1552. getDataList() {
  1553. this.searchData.limit = this.pageSize
  1554. this.searchData.page = this.pageIndex
  1555. searchInquiryApplicationInfo(this.searchData).then(({data}) => {
  1556. if (data.code === 0) {
  1557. this.dataList = data.page.list
  1558. this.pageIndex = data.page.currPage
  1559. this.pageSize = data.page.pageSize
  1560. this.totalPage = data.page.totalCount
  1561. //判断是否全部存在数据
  1562. if (this.totalPage > 0) {
  1563. //设置选中行
  1564. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  1565. this.refreshCurrentTabTable() //加载当前的页签的table
  1566. this.inquiryClickRow(this.dataList[0])
  1567. }
  1568. }
  1569. this.dataListLoading = false
  1570. })
  1571. },
  1572. // ======== 新增/编辑模态框 ========
  1573. /**
  1574. * 询价信息新增模态框
  1575. */
  1576. addModal() {
  1577. this.modalData = {
  1578. flag: '1',
  1579. title: '询价新增',
  1580. site: this.$store.state.user.site,
  1581. bu: this.userBuList[0].buNo,
  1582. buNo: this.userBuList[0].buNo.split('_')[1],
  1583. buDesc: this.userBuList[0].buDesc,
  1584. id: '',
  1585. rfqNo: '',
  1586. customerNo: '',
  1587. customerDesc: '',
  1588. requester:'',
  1589. requesterName: '',
  1590. quoter: '',
  1591. quoterName: '',
  1592. customerInquiryNo: '',
  1593. status: 'C',
  1594. priorityLevel: '',
  1595. requestDate: new Date(),
  1596. requiredCompletionDate: '',
  1597. remark: '',
  1598. createBy: this.$store.state.user.name
  1599. }
  1600. this.modalDisableFlag = false
  1601. this.modalFlag = true
  1602. },
  1603. /**
  1604. * 询价信息编辑模态框
  1605. * @param row
  1606. */
  1607. async updateModal(row) {
  1608. this.modalData = {
  1609. flag: '2',
  1610. title: '询价编辑-' + row.rfqNo,
  1611. site: row.site,
  1612. bu: row.bu,
  1613. buNo: row.buNo,
  1614. buDesc: row.buDesc,
  1615. id: row.id,
  1616. rfqNo: row.rfqNo,
  1617. customerNo: row.customerNo,
  1618. customerDesc: row.customerDesc,
  1619. requester: row.requester,
  1620. requesterName: row.requesterName,
  1621. quoter: row.quoter,
  1622. quoterName: row.quoterName,
  1623. customerInquiryNo: row.customerInquiryNo,
  1624. status: row.status,
  1625. priorityLevel: row.priorityLevel,
  1626. requestDate: row.requestDate,
  1627. requiredCompletionDate: row.requiredCompletionDate,
  1628. remark: row.remark,
  1629. updateBy: this.$store.state.user.name
  1630. }
  1631. if(this.modalData.buNo === null || this.modalData.buNo === ''){
  1632. this.modalData.buDesc = ''
  1633. this.modalData.bu = ''
  1634. this.modalDisableFlag = false
  1635. }else {
  1636. this.modalDisableFlag = true
  1637. }
  1638. this.modalFlag = true
  1639. },
  1640. /**
  1641. * 客户信息新增/编辑
  1642. */
  1643. async saveData() {
  1644. await this.customerNoBlur()
  1645. await this.requesterBlur(2008)
  1646. await this.quoterBlur(2002)
  1647. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  1648. this.$message.warning('请选择客户编码!')
  1649. return
  1650. }
  1651. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  1652. this.$alert('该客户不存在,请重新输入客户编码!', '错误', {
  1653. confirmButtonText: '确定'
  1654. })
  1655. return
  1656. }
  1657. if (this.modalData.requestDate === '' || this.modalData.requestDate == null) {
  1658. this.$message.warning('请输入要求询价日期!')
  1659. return
  1660. }
  1661. if (this.modalData.requester === '' || this.modalData.requester == null) {
  1662. this.$message.warning('请输入PjM编码!')
  1663. return
  1664. }
  1665. if (this.modalData.requesterName === '' || this.modalData.requesterName == null) {
  1666. this.$alert('该PjM人员不存在,请重新输入PjM人员用户名!', '错误', {
  1667. confirmButtonText: '确定'
  1668. })
  1669. return
  1670. }
  1671. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  1672. this.$message.warning('请选择优先等级!')
  1673. return
  1674. }
  1675. if (this.modalData.requiredCompletionDate === '' || this.modalData.requiredCompletionDate == null) {
  1676. this.$message.warning('请输入要求报价日期!')
  1677. return
  1678. }
  1679. if (this.modalData.quoter === '' || this.modalData.quoter == null) {
  1680. this.$message.warning('请输入报价专员编码!')
  1681. return
  1682. }
  1683. if (this.modalData.quoterName === '' || this.modalData.quoterName == null) {
  1684. this.$alert('该报价专员人员不存在,请重新输入报价专员用户名!', '错误', {
  1685. confirmButtonText: '确定'
  1686. })
  1687. return
  1688. }
  1689. if (this.modalData.flag === '1') {
  1690. addInquiryApplicationInfo(this.modalData).then(({data}) => {
  1691. if (data && data.code === 0) {
  1692. this.getDataList()
  1693. this.modalFlag = false
  1694. this.$message({
  1695. message: '操作成功',
  1696. type: 'success',
  1697. duration: 1500,
  1698. onClose: () => {
  1699. }
  1700. })
  1701. } else {
  1702. this.$alert(data.msg, '错误', {
  1703. confirmButtonText: '确定'
  1704. })
  1705. }
  1706. })
  1707. } else {
  1708. updateInquiryApplicationInfo(this.modalData).then(({data}) => {
  1709. if (data && data.code === 0) {
  1710. this.getDataList()
  1711. this.modalFlag = false
  1712. this.$message({
  1713. message: '操作成功',
  1714. type: 'success',
  1715. duration: 1500,
  1716. onClose: () => {
  1717. }
  1718. })
  1719. } else {
  1720. this.$alert(data.msg, '错误', {
  1721. confirmButtonText: '确定'
  1722. })
  1723. }
  1724. })
  1725. }
  1726. },
  1727. /**
  1728. * 询价信息删除
  1729. */
  1730. delModal(row) {
  1731. let confirmMsg = '是否删除这条询价信息?'
  1732. if (row.status === 'B') {
  1733. confirmMsg = '该询价单已经下达,是否删除这条询价信息?'
  1734. } else if (row.status === 'A') {
  1735. confirmMsg = '该询价单已经报价,是否删除这条询价信息?'
  1736. }
  1737. this.$confirm(confirmMsg, '提示', {
  1738. confirmButtonText: '确定',
  1739. cancelButtonText: '取消',
  1740. type: 'warning'
  1741. }).then(() => {
  1742. deleteInquiryApplicationInfo(row).then(({data}) => {
  1743. if (data && data.code === 0) {
  1744. this.getDataList()
  1745. this.$message({
  1746. message: '操作成功',
  1747. type: 'success',
  1748. duration: 1500,
  1749. onClose: () => {
  1750. }
  1751. })
  1752. } else {
  1753. this.$alert(data.msg, '错误', {
  1754. confirmButtonText: '确定'
  1755. })
  1756. }
  1757. })
  1758. }).catch(() => {
  1759. })
  1760. },
  1761. updateModalStatus(row,type) {
  1762. if (type === 'B') {
  1763. this.$confirm('是否确认下达该询价单?', '提示', {
  1764. confirmButtonText: '确定',
  1765. cancelButtonText: '取消',
  1766. type: 'warning'
  1767. }).then(() => {
  1768. let inData = JSON.parse(JSON.stringify(row))
  1769. inData.status = type
  1770. updateInquiryApplicationInfo(inData).then(({data}) => {
  1771. if (data && data.code === 0) {
  1772. this.getDataList()
  1773. this.$message({
  1774. message: '操作成功',
  1775. type: 'success',
  1776. duration: 1500,
  1777. onClose: () => {
  1778. }
  1779. })
  1780. } else {
  1781. this.$alert(data.msg, '错误', {
  1782. confirmButtonText: '确定'
  1783. })
  1784. }
  1785. })
  1786. }).catch(() => {
  1787. })
  1788. }
  1789. },
  1790. // ======== 校验方法 ========
  1791. async customerNoBlur(){
  1792. if (this.modalData.customerNo !== '' || this.modalData.customerNo != null) {
  1793. let params = {
  1794. customerNo: this.modalData.customerNo,
  1795. createBy: this.$store.state.user.name,
  1796. }
  1797. return queryCustomerList(params).then(({data}) => {
  1798. if (data && data.code === 0) {
  1799. if (data.rows.length === 1) {
  1800. this.modalData.customerDesc = data.rows[0].customerDesc
  1801. } else {
  1802. this.modalData.customerDesc = ''
  1803. }
  1804. } else {
  1805. this.$message.warning(data.message)
  1806. this.modalData.customerDesc = ''
  1807. }
  1808. }).catch((error) => {
  1809. this.$message.error('校验失败,请重试:' + error);
  1810. this.modalData.customerDesc = ''
  1811. })
  1812. } else {
  1813. this.modalData.customerDesc = ''
  1814. return Promise.resolve()
  1815. }
  1816. },
  1817. async requesterBlur (tagNo) {
  1818. if (this.modalData.requester != null && this.modalData.requester !== '') {
  1819. let tempData = {
  1820. tagno: tagNo,
  1821. conditionSql: " and a.username = '" + this.modalData.requester + "'" +
  1822. " and b.site = '" + this.modalData.bu.split('_')[0] + "'"
  1823. };
  1824. // 返回 Promise
  1825. return verifyData(tempData).then(({ data }) => {
  1826. if (data && data.code === 0) {
  1827. if (data.baseListData.length > 0) {
  1828. this.modalData.requesterName = data.baseListData[0].user_display;
  1829. } else {
  1830. this.modalData.requesterName = '';
  1831. }
  1832. } else {
  1833. this.$message.warning(data.msg);
  1834. this.modalData.requesterName = '';
  1835. }
  1836. }).catch(error => {
  1837. console.error(error);
  1838. this.$message.error('校验失败,请重试:' + error);
  1839. this.modalData.requesterName = '';
  1840. });
  1841. } else {
  1842. this.modalData.requesterName = '';
  1843. return Promise.resolve(); // 如果 requester 为空,直接返回 resolved Promise
  1844. }
  1845. },
  1846. async quoterBlur (tagNo) {
  1847. if (this.modalData.quoter != null && this.modalData.quoter !== '') {
  1848. let tempData = {
  1849. tagno: tagNo,
  1850. conditionSql: " and a.username = '" + this.modalData.quoter + "'" +
  1851. " and b.site = '" + this.modalData.bu.split('_')[0] + "'"
  1852. };
  1853. // 返回 Promise
  1854. return verifyData(tempData).then(({ data }) => {
  1855. if (data && data.code === 0) {
  1856. if (data.baseListData.length > 0) {
  1857. this.modalData.quoterName = data.baseListData[0].user_display;
  1858. } else {
  1859. this.modalData.quoterName = '';
  1860. }
  1861. } else {
  1862. this.$message.warning(data.msg);
  1863. this.modalData.quoterName = '';
  1864. }
  1865. }).catch(error => {
  1866. console.error(error);
  1867. this.$message.error('校验失败,请重试');
  1868. this.modalData.quoterName = '';
  1869. });
  1870. } else {
  1871. this.modalData.quoterName = '';
  1872. return Promise.resolve(); // 如果 quoter 为空,直接返回 resolved Promise
  1873. }
  1874. },
  1875. // /**
  1876. // * 获得这些询价号的全部附件
  1877. // */
  1878. // getFileContentList () {
  1879. // let currentData = {
  1880. // orderRef1: this.$store.state.user.site,
  1881. // orderRef2: this.enterResultData.quotationNo
  1882. // }
  1883. // getFileContentList(currentData).then(({data}) => {
  1884. // if (data && data.code === 0) {
  1885. // this.enterResultData.fileContentList = data.rows
  1886. // } else {
  1887. // this.enterResultData.fileContentList = []
  1888. // }
  1889. // })
  1890. // },
  1891. /**
  1892. * 上传文件
  1893. */
  1894. uploadFile() {
  1895. let currentData = {
  1896. titleCon: '询价附件上传',
  1897. site: this.$store.state.user.site,
  1898. createBy: this.$store.state.user.name,
  1899. quotationNo: this.enterResultData.quotationNo,
  1900. fileRemark: '',
  1901. folder: 'quotationFile',
  1902. // options: []
  1903. }
  1904. // let num = 0
  1905. // let arr = this.enterResultData.quotationNo.split(';')
  1906. // arr.forEach(val => {
  1907. // currentData.options.push({key: num++, value: val})
  1908. // })
  1909. //打开组件 去做新增业务
  1910. this.$nextTick(() => {
  1911. this.$refs.quotationUploadFile.init(currentData);
  1912. })
  1913. },
  1914. /**
  1915. * 文件删除
  1916. * @param row
  1917. */
  1918. deleteFile(row) {
  1919. this.$confirm('确定要删除此文件?', '提示', {
  1920. confirmButtonText: '确定',
  1921. cancelButtonText: '取消',
  1922. type: 'warning'
  1923. }).then(() => {
  1924. deleteQuotationFile(row).then(({data}) => {
  1925. if (data && data.code === 0) {
  1926. this.getFileContentList();
  1927. this.$message({
  1928. message: '操作成功',
  1929. type: 'success',
  1930. duration: 1500,
  1931. onClose: () => {
  1932. }
  1933. })
  1934. } else {
  1935. this.$alert(data.msg, '错误', {
  1936. confirmButtonText: '确定'
  1937. })
  1938. }
  1939. })
  1940. }).catch(() => {
  1941. })
  1942. },
  1943. /**
  1944. * 文件下载
  1945. * @param row
  1946. */
  1947. downloadFile(row) {
  1948. downLoadQuotationFile(row).then(({data}) => {
  1949. // 不限制文件下载类型
  1950. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  1951. // 下载文件名称
  1952. const fileName = row.fileName
  1953. // a标签下载
  1954. const linkNode = document.createElement('a')
  1955. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1956. linkNode.style.display = 'none'
  1957. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1958. document.body.appendChild(linkNode)
  1959. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1960. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1961. document.body.removeChild(linkNode)
  1962. })
  1963. },
  1964. // ======== chooseList相关方法 ========
  1965. /**
  1966. * 获取基础数据列表S
  1967. * @param val
  1968. * @param type
  1969. */
  1970. getBaseList(val, type) {
  1971. this.tagNo = val
  1972. this.tagNo1 = type
  1973. this.$nextTick(() => {
  1974. let strVal = ''
  1975. let conSql = ''
  1976. if (val === 220) {
  1977. strVal = this.inquiryPartModalData.codeNo ? this.inquiryPartModalData.codeNo : ''
  1978. conSql =" and function_type = 'PRICECHECK'" + " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'" +
  1979. " and bu_no = '" + this.inquiryPartModalData.bu.split('_')[1] + "'"
  1980. }
  1981. if (val === 509) {
  1982. if (type === 1) {
  1983. strVal = this.modalData.customerNo ? this.modalData.customerNo : ''
  1984. }
  1985. if (type === 2) {
  1986. strVal = this.searchData.customerNo ? this.searchData.customerNo : ''
  1987. }
  1988. }
  1989. if (val === 510) {
  1990. strVal = this.inquiryPartModalData.umId ? this.inquiryPartModalData.umId : ''
  1991. conSql = " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'"
  1992. }
  1993. if (val === 2002) {
  1994. if (type === 1) {
  1995. strVal = this.searchData.quoterName ? this.searchData.quoterName : ''
  1996. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1997. }
  1998. if (type === 2) {
  1999. strVal = this.modalData.quoterName ? this.modalData.quoterName : ''
  2000. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2001. }
  2002. }
  2003. if (val === 2008) {
  2004. if (type === 1) {
  2005. strVal = this.searchData.requesterName ? this.searchData.requesterName : ''
  2006. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2007. }
  2008. if (type === 2) {
  2009. strVal = this.modalData.requesterName ? this.modalData.requesterName : ''
  2010. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2011. }
  2012. }
  2013. this.$refs.baseList.init(val, strVal, conSql)
  2014. })
  2015. },
  2016. /**
  2017. * 列表方法的回调
  2018. * @param val
  2019. */
  2020. getBaseData(val) {
  2021. if (this.tagNo ===220) {
  2022. this.inquiryPartModalData.codeNo = val.code_no
  2023. this.inquiryPartModalData.codeDesc = val.code_desc
  2024. }
  2025. if (this.tagNo === 509) {
  2026. if (this.tagNo1 === 1) {
  2027. if (val.customer_no === this.modalData.customerNo) {
  2028. return
  2029. }
  2030. this.modalData.customerNo = val.customer_no
  2031. this.modalData.customerDesc = val.customer_desc
  2032. }
  2033. if (this.tagNo1 === 2) {
  2034. if (val.customer_no === this.searchData.customerNo) {
  2035. return
  2036. }
  2037. this.searchData.customerNo = val.customer_no
  2038. }
  2039. }
  2040. if (this.tagNo === 510) {
  2041. this.inquiryPartModalData.umId = val.UMID
  2042. this.inquiryPartModalData.umName = val.UMName
  2043. }
  2044. if (this.tagNo === 2002) {
  2045. if (this.tagNo1 === 1) {
  2046. this.searchData.quoter = val.username
  2047. this.searchData.quoterName = val.user_display
  2048. }
  2049. if (this.tagNo1 === 2) {
  2050. this.modalData.quoter = val.username
  2051. this.modalData.quoterName = val.user_display
  2052. }
  2053. }
  2054. if (this.tagNo === 2008) {
  2055. if (this.tagNo1 === 1) {
  2056. this.searchData.requester = val.username
  2057. this.searchData.requesterName = val.user_display
  2058. }
  2059. if (this.tagNo1 === 2) {
  2060. this.modalData.requester = val.username
  2061. this.modalData.requesterName = val.user_display
  2062. }
  2063. }
  2064. },
  2065. // ======== 询价产品相关方法 ========
  2066. searchInquiryDetailInfo() {
  2067. let tempData = {
  2068. rfqId: this.inquiryCurrentRow.id,
  2069. buNo: this.inquiryCurrentRow.buNo,
  2070. page: this.pageIndex,
  2071. limit: this.pageSize
  2072. }
  2073. searchInquiryDetailInfo(tempData).then(({data}) => {
  2074. if (data.code === 0) {
  2075. this.inquiryPartDataList = data.page
  2076. //判断是否全部存在数据
  2077. if (this.inquiryPartDataList != null && this.inquiryPartDataList.length > 0) {
  2078. //设置选中行
  2079. this.$refs.secondaryTable.setCurrentRow(this.inquiryPartDataList[0])
  2080. }
  2081. }
  2082. })
  2083. },
  2084. /**
  2085. * 询价产品新增
  2086. */
  2087. addInquiryPartModal(row) {
  2088. this.inquiryCurrentRow = JSON.parse(JSON.stringify(row))
  2089. this.inquiryPartModalData = {
  2090. title: '询价产品新增',
  2091. site: this.inquiryCurrentRow.site,
  2092. bu: this.inquiryCurrentRow.bu,
  2093. buNo: this.inquiryCurrentRow.buNo,
  2094. buDesc: this.inquiryCurrentRow.buDesc,
  2095. rfqId: this.inquiryCurrentRow.id,
  2096. partNo: '',
  2097. partDesc: '',
  2098. inquiryQty: '',
  2099. umId: '',
  2100. umName: '',
  2101. codeNo: '',
  2102. codeDesc: '',
  2103. remark: '',
  2104. createBy: this.$store.state.user.name
  2105. }
  2106. this.inquiryPartModalFlag = true
  2107. },
  2108. async saveInquiryPartData() {
  2109. await this.modelBlur(220)
  2110. await this.umIdBlur(510)
  2111. if (this.inquiryPartModalData.partDesc === '' || this.inquiryPartModalData.partDesc == null) {
  2112. this.$message.warning('请输入产品描述!')
  2113. return
  2114. }
  2115. if (this.inquiryPartModalData.inquiryQty === '' || this.inquiryPartModalData.inquiryQty == null) {
  2116. this.$message.warning('请输入询价数量!')
  2117. return
  2118. }
  2119. if (this.inquiryPartModalData.inquiryQty < 0) {
  2120. this.$message.warning('询价数量必须大于等于0!')
  2121. return
  2122. }
  2123. if (this.inquiryPartModalData.umId === '' || this.inquiryPartModalData.umId == null) {
  2124. this.$message.warning('请选择计量单位!')
  2125. return
  2126. }
  2127. if (this.inquiryPartModalData.umName === '' || this.inquiryPartModalData.umName == null) {
  2128. this.$alert('该计量单位不存在,请重新输入计量单位编码!', '错误', {
  2129. confirmButtonText: '确定'
  2130. })
  2131. }
  2132. if (this.inquiryPartModalData.codeNo === '' || this.inquiryPartModalData.codeNo == null) {
  2133. this.$message.warning('请选择属性模版!')
  2134. return
  2135. }
  2136. if (this.inquiryPartModalData.codeDesc === '' || this.inquiryPartModalData.codeDesc == null) {
  2137. this.$alert('该属性模版不存在,请重新输入属性模版编码!', '错误', {
  2138. confirmButtonText: '确定'
  2139. })
  2140. }
  2141. if (this.inquiryPartModalData.title === '询价产品新增') {
  2142. addInquiryDetailInfo(this.inquiryPartModalData).then(({data}) => {
  2143. if (data && data.code === 0) {
  2144. this.refreshCurrentTabTable()
  2145. this.inquiryPartModalFlag = false
  2146. EventBus.$emit('updateInquiryPartInfo')
  2147. this.$message({
  2148. message: '操作成功',
  2149. type: 'success',
  2150. duration: 1500,
  2151. onClose: () => {
  2152. }
  2153. })
  2154. } else {
  2155. this.$alert(data.msg, '错误', {
  2156. confirmButtonText: '确定'
  2157. })
  2158. }
  2159. })
  2160. } else {
  2161. updateInquiryDetailInfo(this.inquiryPartModalData).then(({data}) => {
  2162. if (data && data.code === 0) {
  2163. this.refreshCurrentTabTable()
  2164. this.inquiryPartModalFlag = false
  2165. EventBus.$emit('updateInquiryPartInfo')
  2166. this.$message({
  2167. message: '操作成功',
  2168. type: 'success',
  2169. duration: 1500,
  2170. onClose: () => {
  2171. }
  2172. })
  2173. } else {
  2174. this.$alert(data.msg, '错误', {
  2175. confirmButtonText: '确定'
  2176. })
  2177. }
  2178. })
  2179. }
  2180. },
  2181. /**
  2182. * 询价产品编辑
  2183. * @param row
  2184. */
  2185. updateInquiryPartModal(row) {
  2186. this.inquiryPartModalData = {
  2187. flag: '2',
  2188. title: '询价产品编辑',
  2189. site: row.site,
  2190. bu: row.site + '_' + row.buNo,
  2191. buNo: row.buNo,
  2192. buDesc: row.buDesc,
  2193. id: row.id,
  2194. testPartId: row.testPartId,
  2195. rfqId: row.rfqId,
  2196. partNo: row.partNo,
  2197. partDesc: row.partDesc,
  2198. inquiryQty: row.inquiryQty,
  2199. umId: row.umId,
  2200. umName: row.umName,
  2201. codeNo: row.codeNo,
  2202. codeDesc: row.codeDesc,
  2203. remark: row.remark,
  2204. updateBy: this.$store.state.user.name,
  2205. }
  2206. this.inquiryPartModalFlag = true
  2207. this.inquiryPartModalDisableFlag = true
  2208. },
  2209. /**
  2210. * 询价产品删除
  2211. * @param row
  2212. */
  2213. async delInquiryPartModal(row) {
  2214. let inData = {
  2215. site: row.site,
  2216. bu: row.bu,
  2217. buNo: row.buNo,
  2218. buDesc: row.buDesc,
  2219. inquiryPartId: row.id,
  2220. rfqId: this.inquiryCurrentRow.id,
  2221. rfqNo: this.inquiryCurrentRow.rfqNo,
  2222. testPartId: row.testPartId,
  2223. partNo: row.partNo,
  2224. codeNo: row.codeNo,
  2225. recordType: 'PRICECHECK',
  2226. codeDesc: '',
  2227. remark: '',
  2228. }
  2229. await this.getItemListByInquiryPartAndCodeNo(inData)
  2230. let confirmMassage = '是否删除这条询价产品信息以及相应的物料档案信息?'
  2231. this.inquiryPartItemDataList.forEach((item) => {
  2232. if ((item.textValue !== '' && item.textValue !== null) || (item.numberValue !== '' && item.numberValue !== null)) {
  2233. confirmMassage = '该询价产品已录入属性值,确认继续删除这条询价产品信息及其物料档案、属性信息?'
  2234. }
  2235. })
  2236. this.$confirm(confirmMassage, '提示', {
  2237. confirmButtonText: '确定',
  2238. cancelButtonText: '取消',
  2239. type: 'warning'
  2240. }).then(() => {
  2241. deleteInquiryDetailInfo(row).then(({data}) => {
  2242. if (data && data.code === 0) {
  2243. this.refreshCurrentTabTable()
  2244. EventBus.$emit('updateInquiryPartInfo')
  2245. this.$message({
  2246. message: '操作成功',
  2247. type: 'success',
  2248. duration: 1500,
  2249. onClose: () => {
  2250. }
  2251. })
  2252. } else {
  2253. this.$alert(data.msg, '错误', {
  2254. confirmButtonText: '确定'
  2255. })
  2256. }
  2257. })
  2258. }).catch(() => {
  2259. })
  2260. },
  2261. inquiryPartItemModal(row) {
  2262. this.inquiryPartItemModalData = {
  2263. site: row.site,
  2264. bu: row.bu,
  2265. buNo: row.buNo,
  2266. buDesc: row.buDesc,
  2267. inquiryPartId: row.id,
  2268. rfqId: this.inquiryCurrentRow.id,
  2269. rfqNo: this.inquiryCurrentRow.rfqNo,
  2270. testPartId: row.testPartId,
  2271. partNo: row.partNo,
  2272. codeNo: row.codeNo,
  2273. recordType: 'PRICECHECK',
  2274. codeDesc: '',
  2275. remark: '',
  2276. createBy: this.$store.state.user.name
  2277. }
  2278. this.getItemListByInquiryPartAndCodeNo(this.inquiryPartItemModalData)
  2279. this.inquiryPartItemModalFlag = true
  2280. },
  2281. async getItemListByInquiryPartAndCodeNo(inquiryPartItemModalData){
  2282. return getItemListByInquiryPartAndCodeNo(inquiryPartItemModalData).then(({data})=>{
  2283. if (data && data.code === 0){
  2284. this.inquiryPartItemDataList = data.rows;
  2285. }else {
  2286. this.$message.warning(data.msg)
  2287. }
  2288. }).catch((error)=>{
  2289. this.$message.error(error)
  2290. })
  2291. },
  2292. clickInquiryPartItemSave(){
  2293. if(this.inquiryPartItemDataList.length === 0){
  2294. return false
  2295. }
  2296. if (!this.attributeDialog){
  2297. this.updateInquiryPartItemList();
  2298. }else {
  2299. this.attributeDialog = false;
  2300. }
  2301. },
  2302. updateInquiryPartItemList(){
  2303. this.loading = true
  2304. let list = JSON.parse(JSON.stringify(this.inquiryPartItemDataList));
  2305. updateInquiryPartItemList(list).then(({data})=>{
  2306. if (data && data.code === 0){
  2307. this.$message.success(data.msg);
  2308. this.getItemListByInquiryPartAndCodeNo(this.inquiryPartItemModalData);
  2309. this.attributeDialog = true;
  2310. EventBus.$emit('updateInquiryPartInfo')
  2311. }else {
  2312. this.$message.warning(data.msg);
  2313. }
  2314. this.loading = false
  2315. }).catch((error)=>{
  2316. this.$message.error(error)
  2317. this.loading = false
  2318. })
  2319. },
  2320. // 属性输入校验
  2321. async modelBlur(tagNo) {
  2322. if (this.inquiryPartModalData.codeNo != null && this.inquiryPartModalData.codeNo !== '') {
  2323. let tempData = {
  2324. tagno: tagNo,
  2325. conditionSql: " and code_no = '" + this.inquiryPartModalData.codeNo + "'" +
  2326. " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'" +
  2327. " and bu_no = '" + this.inquiryPartModalData.bu.split('_')[1] + "'"
  2328. };
  2329. // 返回 Promise
  2330. return verifyData(tempData).then(({ data }) => {
  2331. if (data && data.code === 0) {
  2332. if (data.baseListData.length > 0) {
  2333. this.inquiryPartModalData.codeDesc = data.baseListData[0].code_desc;
  2334. } else {
  2335. this.inquiryPartModalData.codeDesc = '';
  2336. }
  2337. } else {
  2338. this.$message.warning(data.msg);
  2339. this.inquiryPartModalData.codeDesc = '';
  2340. }
  2341. }).catch(error => {
  2342. console.error(error);
  2343. this.$message.error('校验失败,请重试');
  2344. this.inquiryPartModalData.codeDesc = '';
  2345. });
  2346. } else {
  2347. this.inquiryPartModalData.codeDesc = '';
  2348. return Promise.resolve(); // 如果 itemNo 为空,直接返回 resolved Promise
  2349. }
  2350. },
  2351. // 计量单位输入校验
  2352. async umIdBlur(tagNo) {
  2353. if (this.inquiryPartModalData.umId != null && this.inquiryPartModalData.umId !== '') {
  2354. let tempData = {
  2355. tagno: tagNo,
  2356. conditionSql: " and UMID = '" + this.inquiryPartModalData.umId + "'" +
  2357. " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'"
  2358. };
  2359. // 返回 Promise
  2360. return verifyData(tempData).then(({ data }) => {
  2361. if (data && data.code === 0) {
  2362. if (data.baseListData.length > 0) {
  2363. this.inquiryPartModalData.umName = data.baseListData[0].UMName;
  2364. } else {
  2365. this.inquiryPartModalData.umName = '';
  2366. }
  2367. } else {
  2368. this.$message.warning(data.msg);
  2369. this.inquiryPartModalData.umName = '';
  2370. }
  2371. }).catch(error => {
  2372. console.error(error);
  2373. this.$message.error('校验失败,请重试');
  2374. this.inquiryPartModalData.umName = '';
  2375. });
  2376. } else {
  2377. this.inquiryPartModalData.umName = '';
  2378. return Promise.resolve(); // 如果 umId 为空,直接返回 resolved Promise
  2379. }
  2380. },
  2381. // ======== 导出相关方法 ========
  2382. /**
  2383. * 导出excel
  2384. */
  2385. async createExportData() {
  2386. this.searchData.limit = -1
  2387. this.searchData.page = 1
  2388. await searchInquiryApplicationInfo(this.searchData).then(({data}) => {
  2389. this.resultList = data.page.list
  2390. // 遍历dataList 取-后的值
  2391. this.resultList.forEach((item) => {
  2392. if (item.status === 'A') {
  2393. item.status = '已报价'
  2394. } else if (item.status === 'B') {
  2395. item.status = '已下达'
  2396. } else if (item.status === 'C') {
  2397. item.status = '草稿'
  2398. }
  2399. if (item.priorityLevel === 'A') {
  2400. item.priorityLevel = '普通'
  2401. } else if (item.priorityLevel === ' B') {
  2402. item.priorityLevel = '重要'
  2403. } else if (item.priorityLevel === ' C') {
  2404. item.priorityLevel = '紧急'
  2405. }
  2406. })
  2407. })
  2408. return this.resultList
  2409. },
  2410. startDownload() {
  2411. },
  2412. finishDownload() {
  2413. },
  2414. fields() {
  2415. let json = '{'
  2416. this.columnList.forEach((item, index) => {
  2417. if (index == this.columnList.length - 1) {
  2418. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2419. } else {
  2420. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2421. }
  2422. })
  2423. json += '}'
  2424. let s = eval('(' + json + ')')
  2425. return s
  2426. },
  2427. // ======== 导入相关方法 ========
  2428. handleImportQuotation() {
  2429. let currentData = {
  2430. createBy: this.$store.state.user.name,
  2431. site: this.$store.state.user.site,
  2432. }
  2433. //打开组件 去做新增业务
  2434. this.$nextTick(() => {
  2435. this.$refs.quotationUpload.init(currentData)
  2436. })
  2437. },
  2438. // openSaveDataDialog(){
  2439. // if (this.modalData.title === '询价新增') {
  2440. // let rfqNos = [];
  2441. // this.dataList.forEach((item) => {
  2442. // // 如果item.rfqNo为XJ开头
  2443. // if (item.rfqNo.startsWith('XJ')) {
  2444. // // 解析数字部分
  2445. // const numPart = parseInt(item.rfqNo.replace('XJ', ''), 10);
  2446. // if (!isNaN(numPart)) {
  2447. // rfqNos.push(numPart);
  2448. // }
  2449. // }
  2450. // });
  2451. // if (rfqNos.length === 0) {
  2452. // // 如果没有XJ开头的rfqNo
  2453. // this.modalData.rfqNo = 'XJ00000001';
  2454. // } else {
  2455. // // 取到最大的XJ开头的rfqNo
  2456. // let maxRfqNo = Math.max(...rfqNos);
  2457. //
  2458. // // 生成新的rfqNo,确保有9位数,前面补零
  2459. // maxRfqNo += 1; // 增加最大值
  2460. // this.modalData.rfqNo = 'XJ' + String(maxRfqNo).padStart(8, '0');
  2461. // }
  2462. // }
  2463. // },
  2464. // 保存弹框关闭事件
  2465. closeSaveDataDialog() {
  2466. this.modalData = {
  2467. flag: '',
  2468. title: '',
  2469. site: '',
  2470. bu: '',
  2471. buNo: '',
  2472. buDesc: '',
  2473. id: '',
  2474. rfqNo: '',
  2475. customerNo: '',
  2476. customerDesc: '',
  2477. requester:'',
  2478. requesterName: '',
  2479. quoter: '',
  2480. quoterName: '',
  2481. customerInquiryNo: '',
  2482. status: '',
  2483. priorityLevel: '',
  2484. requestDate: '',
  2485. requiredCompletionDate: '',
  2486. remark: '',
  2487. }
  2488. this.modalFlag = false
  2489. },
  2490. openInquiryPartSaveDataDialog() {
  2491. if (this.inquiryPartModalData.title === '询价产品新增') {
  2492. let partNos = [];
  2493. this.inquiryPartModalData.queryType = 'TP';
  2494. this.inquiryPartModalData.userName = this.$store.state.user.name;
  2495. this.inquiryPartModalData.limit = -1;
  2496. this.inquiryPartModalData.page = 1;
  2497. this.inquiryPartModalData.buNo = '';
  2498. partInformationSearch(this.inquiryPartModalData).then(({data}) => {
  2499. if (data && data.code === 0) {
  2500. data.page.list.forEach((item) => {
  2501. // 如果item.partNo为TP开头
  2502. if (item.partNo.startsWith('TP')) {
  2503. // 解析数字部分
  2504. const numPart = parseInt(item.partNo.replace('TP', ''), 10);
  2505. if (!isNaN(numPart)) {
  2506. partNos.push(numPart);
  2507. }
  2508. }
  2509. });
  2510. if (partNos.length === 0) {
  2511. // 如果没有TP开头的partNo
  2512. this.inquiryPartModalData.partNo = 'TP00000001';
  2513. } else {
  2514. // 取到最大的TP开头的partNo
  2515. let maxPartNo = Math.max(...partNos);
  2516. // 生成新的partNo,确保有9位数,前面补零
  2517. maxPartNo += 1; // 增加最大值
  2518. this.inquiryPartModalData.partNo = 'TP' + String(maxPartNo).padStart(8, '0');
  2519. }
  2520. }
  2521. });
  2522. }
  2523. },
  2524. closeInquiryPartSaveDataDialog() {
  2525. this.inquiryPartModalData = {
  2526. title: '',
  2527. site: '',
  2528. bu: '',
  2529. buNo: '',
  2530. buDesc: '',
  2531. rfqId: '',
  2532. partNo: '',
  2533. partDesc: '',
  2534. inquiryQty: '',
  2535. umId: '',
  2536. umName: '',
  2537. codeNo: '',
  2538. codeDesc: '',
  2539. remark: '',
  2540. createBy: ''
  2541. }
  2542. this.inquiryPartModalFlag = false
  2543. },
  2544. rowStyle({row}) {
  2545. if (this.inquiryCurrentRow.id === row.id) {
  2546. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  2547. }
  2548. },
  2549. navigateToMes(id){
  2550. this.$router.push({ path: 'inquiry-inquiryDetail', query: { id : id} });
  2551. },
  2552. // 动态列开始 获取 用户保存的 格式列
  2553. async getTableUserColumn(tableId, columnId) {
  2554. let queryTableUser = {
  2555. userId: this.$store.state.user.name,
  2556. functionId: this.$route.meta.menuId,
  2557. tableId: tableId,
  2558. status: true,
  2559. languageCode: this.$i18n.locale
  2560. }
  2561. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  2562. if (data.rows.length > 0) {
  2563. switch (columnId) {
  2564. case 1:
  2565. this.columnList = data.rows
  2566. break;
  2567. }
  2568. } else {
  2569. this.getColumnList(tableId, columnId)
  2570. }
  2571. })
  2572. },
  2573. // 获取 tableDefault 列
  2574. async getColumnList (tableId, columnId) {
  2575. let queryTable= {
  2576. functionId: this.$route.meta.menuId,
  2577. tableId: tableId,
  2578. languageCode: this.$i18n.locale
  2579. }
  2580. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  2581. if (!data.rows.length === 0) {
  2582. switch (columnId) {
  2583. case 1:
  2584. this.columnList = data.rows
  2585. break;
  2586. }
  2587. }
  2588. })
  2589. },
  2590. },
  2591. }
  2592. </script>
  2593. <style scoped>
  2594. /deep/ .customer-tab .el-tabs__content {
  2595. padding: 0px !important;
  2596. height: 100%;
  2597. }
  2598. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  2599. background-color: #17B3A3;
  2600. border-color: #17B3A3;
  2601. }
  2602. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
  2603. border-color: #FFF
  2604. }
  2605. /deep/ .el-form-item--medium .el-form-item__content{
  2606. height: auto;
  2607. }
  2608. .el-input-number /deep/ .el-input__inner {
  2609. text-align: right;
  2610. padding-right: 5px !important;
  2611. }
  2612. /deep/ .el-input .el-input--medium{
  2613. line-height: 20px;
  2614. }
  2615. /deep/ .el-input-number .el-input--medium{
  2616. line-height: 20px;
  2617. }
  2618. /*table中input 修改样式*/
  2619. /deep/ div.table-el-date {
  2620. padding: 0px 0px;
  2621. height: 25px !important;
  2622. }
  2623. /*table中input*/
  2624. div.table-el-date /deep/ input.el-input__inner{
  2625. padding: 0px 0px;
  2626. height: 23px !important;
  2627. text-align: right;
  2628. }
  2629. /* 特殊的样式*/
  2630. /deep/ .el-table div.cell:has(.table-el-date) {
  2631. /* 直接作用于 <td> 元素 */
  2632. padding: 0px;
  2633. height: 25px;
  2634. }
  2635. .el-transfer-panel {
  2636. border: 2px solid #17b3a3;
  2637. border-radius: 4px;
  2638. overflow: hidden;
  2639. background: #fff;
  2640. display: inline-block;
  2641. vertical-align: middle;
  2642. width: 200px;
  2643. max-height: 100%;
  2644. -webkit-box-sizing: border-box;
  2645. box-sizing: border-box;
  2646. position: relative;
  2647. }
  2648. .el-transfer-panel .el-transfer-panel__header {
  2649. height: 40px;
  2650. line-height: 40px;
  2651. background: #17b3a3;
  2652. margin: 0;
  2653. padding-left: 15px;
  2654. border-bottom: 1px solid #17b3a3;
  2655. -webkit-box-sizing: border-box;
  2656. box-sizing: border-box;
  2657. color: #000;
  2658. }
  2659. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  2660. font-size: 14px;
  2661. color: #303133;
  2662. font-weight: 400;
  2663. }
  2664. </style>