plm前端
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.

1809 lines
63 KiB

2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'申请单号'">
  5. <el-input v-model="searchData.applyNo" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="申请日期">
  8. <el-date-picker
  9. value-format="yyyy-MM-dd"
  10. style="width: 100%"
  11. v-model="searchData.startDate"
  12. type="date"
  13. placeholder="开始日期">
  14. </el-date-picker>
  15. </el-form-item>
  16. <el-form-item label="到">
  17. <el-date-picker
  18. value-format="yyyy-MM-dd"
  19. style="width: 100%"
  20. v-model="searchData.endDate"
  21. type="date"
  22. placeholder="结束日期">
  23. </el-date-picker>
  24. </el-form-item>
  25. <el-form-item label=" ">
  26. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  27. <!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>-->
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ '导出' }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <el-table
  45. :height="height"
  46. :data="dataList1"
  47. border
  48. ref="mainTable"
  49. @row-click="changeData"
  50. highlight-current-row
  51. v-loading="dataListLoading"
  52. style="width: 100%;">
  53. <el-table-column
  54. header-align="center"
  55. align="center"
  56. width="150"
  57. fixed="right"
  58. label="操作">
  59. <template slot-scope="scope">
  60. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="comfirmApply(scope.row)">下达</a>
  61. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="editModalU(scope.row)">修改</a>
  62. <a type="text" size="small" v-if="scope.row.status=='审批中'" @click="editModal(scope.row)">审批</a>
  63. <a type="text" size="small" v-if="scope.row.statusCode==='05'" @click="cancelApply(scope.row)">取消申请</a>
  64. </template>
  65. </el-table-column>
  66. <el-table-column
  67. v-for="(item,index) in columnList1" :key="index"
  68. :sortable="item.columnSortable"
  69. :prop="item.columnProp"
  70. :header-align="item.headerAlign"
  71. :show-overflow-tooltip="item.showOverflowTooltip"
  72. :align="item.align"
  73. :fixed="item.fixed==''?false:item.fixed"
  74. :min-width="item.columnWidth"
  75. :label="item.columnLabel">
  76. <template slot-scope="scope">
  77. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  78. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  79. style="width: 100px; height: 80px"/></span>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. <el-pagination
  84. @size-change="sizeChangeHandle"
  85. @current-change="currentChangeHandle"
  86. :current-page="pageIndex"
  87. :page-sizes="[20, 50, 100, 1000]"
  88. :page-size="pageSize"
  89. :total="totalPage"
  90. layout="total, sizes, prev, pager, next, jumper">
  91. </el-pagination>
  92. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  93. <el-tab-pane label="工具明细" name="detail">
  94. <el-table
  95. :data="detailList"
  96. height="240"
  97. border
  98. v-loading="dataListLoading"
  99. style="width: 100%; ">
  100. <el-table-column
  101. v-for="(item,index) in columnList2" :key="index"
  102. :sortable="item.columnSortable"
  103. :prop="item.columnProp"
  104. :header-align="item.headerAlign"
  105. :show-overflow-tooltip="item.showOverflowTooltip"
  106. :align="item.align"
  107. :fixed="item.fixed==''?false:item.fixed"
  108. :min-width="item.columnWidth"
  109. :label="item.columnLabel">
  110. <template slot-scope="scope">
  111. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  112. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  113. style="width: 100px; height: 80px"/></span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column
  117. header-align="center"
  118. align="center"
  119. width="120"
  120. fixed="right"
  121. label="操作">
  122. <template slot-scope="scope">
  123. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  124. </template>
  125. </el-table-column>
  126. <!-- <el-table-column-->
  127. <!-- fixed="right"-->
  128. <!-- header-align="center"-->
  129. <!-- align="center"-->
  130. <!-- width="100"-->
  131. <!-- label="操作">-->
  132. <!-- <template slot-scope="scope">-->
  133. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  134. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  135. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  136. <!-- </template>-->
  137. <!-- </el-table-column>-->
  138. </el-table>
  139. </el-tab-pane>
  140. <el-tab-pane label="处理信息" name="tab4">
  141. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  142. <!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
  143. <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>
  144. </el-form>
  145. <el-form label-position="top" :model="currentRow" >
  146. <el-row :gutter="15">
  147. <el-col :span="6">
  148. <el-form-item label="IFS PR编号" >
  149. <el-input v-model="currentRow.prNo" readonly></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="18">
  153. <el-form-item label="备注" >
  154. <el-input v-model="currentRow.remark1" readonly></el-input>
  155. </el-form-item>
  156. </el-col>
  157. </el-row>
  158. <el-row :gutter="15" style="margin-top: 20px">
  159. <el-col :span="6">
  160. <el-form-item label="采购订单号" >
  161. <el-input v-model="currentRow.poNo" readonly ></el-input>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="6">
  165. <el-form-item label="厂商名称" >
  166. <el-input v-model="currentRow.supplierName" readonly></el-input>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="6">
  170. <el-form-item label="总成本(元)" >
  171. <el-input v-model="currentRow.allCost" readonly></el-input>
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row :gutter="15" style="margin-top: 0px">
  176. <el-col :span="24">
  177. <el-form-item label="备注" >
  178. <el-input v-model="currentRow.remark2" readonly></el-input>
  179. </el-form-item>
  180. </el-col>
  181. </el-row>
  182. </el-form>
  183. </el-tab-pane>
  184. <el-tab-pane label="附件信息" name="down">
  185. <oss-components height="25vh" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  186. </el-tab-pane>
  187. <!-- 审批信息 -->
  188. <el-tab-pane label="审批信息" name="approvalInformation">
  189. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  190. </el-tab-pane>
  191. </el-tabs>
  192. <el-dialog
  193. width="800px" v-drag
  194. :title="'刀模申请修改'"
  195. :close-on-click-modal="false"
  196. :visible.sync="visibleU">
  197. <el-form :inline="true" label-position="top" label-width="100px" >
  198. <el-form-item :label="'申请编号'">
  199. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  200. </el-form-item>
  201. <el-form-item :label="'申请总数'">
  202. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  203. </el-form-item>
  204. <el-form-item :label="'总成本'">
  205. <el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  206. </el-form-item>
  207. <el-form-item :label="'申请人'" required="required">
  208. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  209. </el-form-item>
  210. <el-form-item :label="'申请日期'" required="required">
  211. <el-date-picker
  212. value-format="yyyy-MM-dd"
  213. style="width: 100%"
  214. v-model="dataForm.applyDate"
  215. type="date"
  216. disabled
  217. placeholder="结束日期">
  218. </el-date-picker>
  219. </el-form-item>
  220. <el-form-item label="部门" required="required">
  221. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  222. </el-form-item>
  223. <el-form-item required="required">
  224. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
  225. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  226. </el-form-item>
  227. <el-form-item required="required">
  228. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
  229. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  230. </el-form-item>
  231. <el-form-item required="required">
  232. <span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
  233. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  234. </el-form-item>
  235. </el-form>
  236. <el-form :inline="true" label-position="top" label-width="100px" >
  237. <el-form-item :label="'申请原因'">
  238. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  239. v-model="dataForm.applyReason"/>
  240. </el-form-item>
  241. </el-form>
  242. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  243. <el-form-item :label="'备注'">
  244. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  245. v-model="dataForm.remark"/>
  246. </el-form-item>
  247. </el-form>
  248. <div class="rq" style="margin-top: 60px">
  249. <el-table
  250. height="250"
  251. :data="toolData"
  252. border
  253. ref="toolTable"
  254. v-loading="dataListLoading"
  255. style="width: 100%;">
  256. <el-table-column
  257. v-for="(item,index) in columnList2" :key="index"
  258. :sortable="item.columnSortable"
  259. :prop="item.columnProp"
  260. :header-align="item.headerAlign"
  261. :show-overflow-tooltip="item.showOverflowTooltip"
  262. :align="item.align"
  263. :fixed="item.fixed==''?false:item.fixed"
  264. :min-width="item.columnWidth"
  265. :label="item.columnLabel">
  266. <template slot-scope="scope">
  267. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  268. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  269. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  270. style="width: 100px; height: 80px"/></span>
  271. </div>
  272. <div v-if=" (item.columnProp === 'standardCost')">
  273. <el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  274. style="width:98%"></el-input>
  275. </div>
  276. <div v-else>
  277. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  278. style="width:98%"></el-input>
  279. </div>
  280. </template>
  281. </el-table-column>
  282. </el-table>
  283. </div>
  284. <span slot="footer" class="dialog-footer">
  285. <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
  286. <el-button type="primary" @click="visibleU = false">{{'取消'}}</el-button>
  287. </span>
  288. </el-dialog>
  289. <el-dialog
  290. width="800px" v-drag
  291. :title="'刀模申请审批'"
  292. :close-on-click-modal="false"
  293. :visible.sync="visible">
  294. <el-form :inline="true" label-position="top" label-width="100px" >
  295. <el-form-item :label="'申请编号'">
  296. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  297. </el-form-item>
  298. <el-form-item :label="'申请总数'">
  299. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  300. </el-form-item>
  301. <el-form-item :label="'总成本'">
  302. <el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  303. </el-form-item>
  304. <el-form-item :label="'申请人'" required="required">
  305. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  306. </el-form-item>
  307. <el-form-item :label="'申请日期'" required="required">
  308. <el-date-picker
  309. value-format="yyyy-MM-dd"
  310. style="width: 100%"
  311. v-model="dataForm.applyDate"
  312. type="date"
  313. disabled
  314. placeholder="结束日期">
  315. </el-date-picker>
  316. </el-form-item>
  317. <el-form-item label="部门" required="required">
  318. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  319. </el-form-item>
  320. <el-form-item required="required">
  321. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
  322. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  323. </el-form-item>
  324. <el-form-item required="required">
  325. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">TP</a></span>
  326. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  327. </el-form-item>
  328. <el-form-item required="required">
  329. <span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
  330. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
  331. </el-form-item>
  332. </el-form>
  333. <el-form :inline="true" label-position="top" label-width="100px" >
  334. <el-form-item :label="'申请原因'">
  335. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  336. v-model="dataForm.applyReason"/>
  337. </el-form-item>
  338. </el-form>
  339. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  340. <el-form-item :label="'备注'">
  341. <el-input type="textarea" style="width: 770px" resize="none" :autosize="{minRows: 3, maxRows: 3}"
  342. v-model="dataForm.remark"/>
  343. </el-form-item>
  344. </el-form>
  345. <div class="rq" style="margin-top: 60px">
  346. <el-table
  347. height="250"
  348. :data="toolData"
  349. border
  350. ref="toolTable"
  351. v-loading="dataListLoading"
  352. style="width: 100%;">
  353. <el-table-column
  354. v-for="(item,index) in columnList2" :key="index"
  355. :sortable="item.columnSortable"
  356. :prop="item.columnProp"
  357. :header-align="item.headerAlign"
  358. :show-overflow-tooltip="item.showOverflowTooltip"
  359. :align="item.align"
  360. :fixed="item.fixed==''?false:item.fixed"
  361. :min-width="item.columnWidth"
  362. :label="item.columnLabel">
  363. <template slot-scope="scope">
  364. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  365. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  366. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  367. style="width: 100px; height: 80px"/></span>
  368. </div>
  369. <div v-if=" (item.columnProp === 'standardCost')">
  370. <el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  371. style="width:98%"></el-input>
  372. </div>
  373. <div v-else>
  374. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
  375. style="width:98%"></el-input>
  376. </div>
  377. </template>
  378. </el-table-column>
  379. </el-table>
  380. </div>
  381. <span slot="footer" class="dialog-footer">
  382. <!-- <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>-->
  383. <el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
  384. <el-button v-if="dataForm.status === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  385. <el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal">驳回</el-button>
  386. </span>
  387. </el-dialog>
  388. <el-dialog
  389. width="600px" v-drag
  390. :title="'处理信息'"
  391. :close-on-click-modal="false"
  392. :visible.sync="modelFlag">
  393. <el-form label-position="top" >
  394. <el-row :gutter="15" >
  395. <el-col :span="6">
  396. <el-form-item label="IFS PR编号" >
  397. <el-input v-model="modelData.prNo" ></el-input>
  398. </el-form-item>
  399. </el-col>
  400. <el-col :span="18">
  401. <el-form-item label="备注" >
  402. <el-input v-model="modelData.remark1" ></el-input>
  403. </el-form-item>
  404. </el-col>
  405. </el-row>
  406. <el-row :gutter="15" style="margin-top: 20px" >
  407. <el-col :span="6">
  408. <el-form-item label="采购订单号" >
  409. <el-input v-model="modelData.poNo" ></el-input>
  410. </el-form-item>
  411. </el-col>
  412. <el-col :span="6">
  413. <el-form-item label="厂商名称" >
  414. <el-input v-model="modelData.supplierName" ></el-input>
  415. </el-form-item>
  416. </el-col>
  417. <el-col :span="6">
  418. <el-form-item label="总成本(元)" >
  419. <el-input v-model="modelData.allCost" type="number" ></el-input>
  420. </el-form-item>
  421. </el-col>
  422. </el-row>
  423. <el-row :gutter="15" style="margin-top: 0px">
  424. <el-col :span="24">
  425. <el-form-item label="备注" >
  426. <el-input v-model="modelData.remark2" ></el-input>
  427. </el-form-item>
  428. </el-col>
  429. </el-row>
  430. </el-form>
  431. <span slot="footer" class="dialog-footer">
  432. <el-button type="primary" @click="saveHeaderMessage()">{{'保存'}}</el-button>
  433. <el-button type="primary" @click="modelFlag = false">{{'取消'}}</el-button>
  434. </span>
  435. </el-dialog>
  436. <!-- 提交 -->
  437. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  438. <el-form :inline="true" label-position="top">
  439. <el-form-item :label="'驳回意见'">
  440. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  441. </el-form-item>
  442. </el-form>
  443. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  444. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  445. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  446. </el-footer>
  447. </el-dialog>
  448. <!-- 上传文件的modal -->
  449. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  450. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  451. </div>
  452. </template>
  453. <script>
  454. import {
  455. customerInformationSearch, // 客户信息列表查询`
  456. } from '@/api/customer/customerInformation.js'
  457. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  458. import Chooselist from '@/views/modules/common/Chooselist'
  459. import {searchProjectToolApplyHeader,
  460. searchProjectToolApplyDetail,
  461. comfirmProjectToolApply,
  462. cancelProjectToolApply,
  463. saveProjectHeaderMessage,
  464. editToolApplication,
  465. submitChange
  466. } from "@/api/tool/toolApply.js"
  467. import {
  468. deleteProjectFile,
  469. getFileContentList,
  470. downLoadProjectFile,
  471. getProjectPartNowBm,
  472. } from "@/api/project/project.js"
  473. import {
  474. getNodeAuthority, // 获取节点权限
  475. getApprovalList, // 查询审批信息
  476. } from '@/api/changeManagement/changeManagement.js'
  477. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  478. import OssComponents from "../oss/ossComponents";
  479. import DictDataSelect from "../sys/dict-data-select.vue"
  480. /*組件*/
  481. export default {
  482. components: {
  483. ApprovalInformation,
  484. OssComponents,
  485. Chooselist,
  486. projectUploadFile,
  487. DictDataSelect,
  488. },
  489. name: "null",
  490. data() {
  491. return {
  492. visible:false,
  493. fileContentList: [],
  494. activeName: 'detail',
  495. searchData:{
  496. page: 1,
  497. limit: 100,
  498. site:this.$store.state.user.site,
  499. applyNo:'',
  500. startDate:'',
  501. endDate:'',
  502. },
  503. toolData:[],
  504. visibleU:false,
  505. dataForm:{
  506. site: '',
  507. applyNo: '',
  508. applyBy:'',
  509. applyDate:'',
  510. applySumQty:'',
  511. applyReason:'',
  512. remark:'',
  513. createBy:'',
  514. detailList:[],
  515. status: '',
  516. rejectOpinion: '',
  517. nodeConclusion: '',
  518. quoter: '',
  519. quoterName: '',
  520. tp: '',
  521. tpName: '',
  522. purchaser: '',
  523. purchaserName: '',
  524. totalCost:'',
  525. menuId: this.$route.meta.menuId,
  526. userName: this.$store.state.user.name,
  527. },
  528. modelData:{
  529. site:'',
  530. applyNo:'',
  531. prNo:'',
  532. remark1:'',
  533. poNo:'',
  534. supplierName:'',
  535. allCost:'',
  536. remark2:'',
  537. },
  538. modelFlag:false,
  539. currentRow:{},
  540. currentRow2:{},
  541. height: 200,
  542. dataList1:[],
  543. detailList:[],
  544. dataListLoading: false,
  545. // 导出 start
  546. exportData: [],
  547. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  548. exportHeader: ["项目清单"],
  549. exportFooter: [],
  550. exportList:[],
  551. // 导出 start
  552. exportData2: [],
  553. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  554. exportHeader2: ["项目客户联系人"],
  555. exportFooter2: [],
  556. exportList2:[],
  557. tagNo:'',
  558. tagNo2:'',
  559. pageIndex: 1,
  560. pageSize: 100,
  561. totalPage: 0,
  562. ossColumns:[
  563. {
  564. userId: this.$store.state.user.name,
  565. functionId: 103001,
  566. serialNumber: '103001Table2FileName',
  567. tableId: '103001Table2',
  568. tableName: '文件信息表',
  569. columnProp: 'fileName',
  570. headerAlign: 'center',
  571. align: 'center',
  572. columnLabel: '文件名称',
  573. columnHidden: false,
  574. columnImage: false,
  575. columnSortable: false,
  576. sortLv: 0,
  577. status: true,
  578. fixed: '',
  579. columnWidth: 140
  580. },
  581. {
  582. userId: this.$store.state.user.name,
  583. functionId: 103001,
  584. serialNumber: '103001Table2FileRemark',
  585. tableId: '103001Table2',
  586. tableName: '文件信息表',
  587. columnProp: 'fileRemark',
  588. headerAlign: 'center',
  589. align: 'center',
  590. columnLabel: '备注',
  591. columnHidden: false,
  592. columnImage: false,
  593. columnSortable: false,
  594. sortLv: 0,
  595. status: true,
  596. fixed: '',
  597. columnWidth: 240
  598. },
  599. // {
  600. // userId: this.$store.state.user.name,
  601. // functionId: 103001,
  602. // serialNumber: '103001Table2OrderRef3',
  603. // tableId: '103001Table2',
  604. // tableName: '文件信息表',
  605. // columnProp: 'orderRef3',
  606. // headerAlign: 'center',
  607. // align: 'center',
  608. // columnLabel: '文件描述',
  609. // columnHidden: false,
  610. // columnImage: false,
  611. // columnSortable: false,
  612. // sortLv: 0,
  613. // status: true,
  614. // fixed: '',
  615. // columnWidth: 120
  616. // },
  617. {
  618. userId: this.$store.state.user.name,
  619. functionId: 103001,
  620. serialNumber: '103001Table2CreateDate',
  621. tableId: '103001Table2',
  622. tableName: '文件信息表',
  623. columnProp: 'createDate',
  624. headerAlign: 'center',
  625. align: 'center',
  626. columnLabel: '上传时间',
  627. columnHidden: false,
  628. columnImage: false,
  629. columnSortable: false,
  630. sortLv: 0,
  631. status: true,
  632. fixed: '',
  633. columnWidth: 140
  634. },
  635. {
  636. userId: this.$store.state.user.name,
  637. functionId: 103001,
  638. serialNumber: '103001Table2CreatedBy',
  639. tableId: '103001Table2',
  640. tableName: '文件信息表',
  641. columnProp: 'createBy',
  642. headerAlign: 'center',
  643. align: 'center',
  644. columnLabel: '上传人',
  645. columnHidden: false,
  646. columnImage: false,
  647. columnSortable: false,
  648. sortLv: 0,
  649. status: true,
  650. fixed: '',
  651. columnWidth: 140
  652. }
  653. ],
  654. // 导出 end
  655. columnList1: [
  656. {
  657. userId: this.$store.state.user.name,
  658. functionId: 106002,
  659. serialNumber: '106002Table1Site',
  660. tableId: "106002Table1",
  661. tableName: "刀具申请主表",
  662. columnProp: "site",
  663. headerAlign: "center",
  664. align: "left",
  665. columnLabel: "工厂编码",
  666. columnHidden: false,
  667. columnImage: false,
  668. columnSortable: false,
  669. sortLv: 0,
  670. status: true,
  671. fixed: '',
  672. columnWidth: 70
  673. },
  674. {
  675. userId: this.$store.state.user.name,
  676. functionId: 106002,
  677. serialNumber: '106002Table1DepartmentDesc',
  678. tableId: "106002Table1",
  679. tableName: "刀具申请主表",
  680. columnProp: "departmentDesc",
  681. headerAlign: "center",
  682. align: "left",
  683. columnLabel: "部门",
  684. columnHidden: false,
  685. columnImage: false,
  686. columnSortable: false,
  687. sortLv: 0,
  688. status: true,
  689. fixed: '',
  690. columnWidth: 70
  691. },
  692. {
  693. userId: this.$store.state.user.name,
  694. functionId: 106002,
  695. serialNumber: '106002Table1ApplyNo',
  696. tableId: "106002Table1",
  697. tableName: "刀具申请主表",
  698. columnProp: "applyNo",
  699. headerAlign: "center",
  700. align: "left",
  701. columnLabel: "申请单号",
  702. columnHidden: false,
  703. columnImage: false,
  704. columnSortable: false,
  705. sortLv: 0,
  706. status: true,
  707. fixed: '',
  708. columnWidth: 80
  709. },
  710. {
  711. userId: this.$store.state.user.name,
  712. functionId: 106002,
  713. serialNumber: '106002Table1ApplyBy',
  714. tableId: "106002Table1",
  715. tableName: "刀具申请主表",
  716. columnProp: "applyBy",
  717. headerAlign: "center",
  718. align: "left",
  719. columnLabel: "申请人",
  720. columnHidden: false,
  721. columnImage: false,
  722. columnSortable: false,
  723. sortLv: 0,
  724. status: true,
  725. fixed: '',
  726. columnWidth: 60
  727. },
  728. {
  729. userId: this.$store.state.user.name,
  730. functionId: 106002,
  731. serialNumber: '106002Table1Status',
  732. tableId: "106002Table1",
  733. tableName: "刀具申请主表",
  734. columnProp: "status",
  735. headerAlign: "center",
  736. align: "left",
  737. columnLabel: "状态",
  738. columnHidden: false,
  739. columnImage: false,
  740. columnSortable: false,
  741. sortLv: 0,
  742. status: true,
  743. fixed: '',
  744. columnWidth: 60
  745. },
  746. {
  747. userId: this.$store.state.user.name,
  748. functionId: 106002,
  749. serialNumber: '106002Table1ApplySumQty',
  750. tableId: "106002Table1",
  751. tableName: "刀具申请主表",
  752. columnProp: "applySumQty",
  753. headerAlign: "center",
  754. align: "right",
  755. columnLabel: "申请数量",
  756. columnHidden: false,
  757. columnImage: false,
  758. columnSortable: false,
  759. sortLv: 0,
  760. status: true,
  761. fixed: '',
  762. columnWidth: 60
  763. },
  764. {
  765. userId: this.$store.state.user.name,
  766. functionId: 106002,
  767. serialNumber: '106002Table1TotalCost',
  768. tableId: "106002Table1",
  769. tableName: "刀具申请主表",
  770. columnProp: "totalCost",
  771. headerAlign: "center",
  772. align: "right",
  773. columnLabel: "总成本",
  774. columnHidden: false,
  775. columnImage: false,
  776. columnSortable: false,
  777. sortLv: 0,
  778. status: true,
  779. fixed: '',
  780. columnWidth: 60
  781. },
  782. {
  783. userId: this.$store.state.user.name,
  784. functionId: 106002,
  785. serialNumber: '106002Table1QuoterName',
  786. tableId: "106002Table1",
  787. tableName: "刀具申请主表",
  788. columnProp: "quoterName",
  789. headerAlign: "center",
  790. align: "left",
  791. columnLabel: "报价员",
  792. columnHidden: false,
  793. columnImage: false,
  794. columnSortable: false,
  795. sortLv: 0,
  796. status: true,
  797. fixed: '',
  798. columnWidth: 60
  799. },
  800. {
  801. userId: this.$store.state.user.name,
  802. functionId: 106002,
  803. serialNumber: '106002Table1TpName',
  804. tableId: "106002Table1",
  805. tableName: "刀具申请主表",
  806. columnProp: "tpName",
  807. headerAlign: "center",
  808. align: "left",
  809. columnLabel: "TP",
  810. columnHidden: false,
  811. columnImage: false,
  812. columnSortable: false,
  813. sortLv: 0,
  814. status: true,
  815. fixed: '',
  816. columnWidth: 60
  817. },
  818. {
  819. userId: this.$store.state.user.name,
  820. functionId: 106002,
  821. serialNumber: '106002Table1PurchaserName',
  822. tableId: "106002Table1",
  823. tableName: "刀具申请主表",
  824. columnProp: "purchaserName",
  825. headerAlign: "center",
  826. align: "left",
  827. columnLabel: "采购员",
  828. columnHidden: false,
  829. columnImage: false,
  830. columnSortable: false,
  831. sortLv: 0,
  832. status: true,
  833. fixed: '',
  834. columnWidth: 60
  835. },
  836. {
  837. userId: this.$store.state.user.name,
  838. functionId: 106002,
  839. serialNumber: '106002Table1ApplyDate',
  840. tableId: "106002Table1",
  841. tableName: "刀具申请主表",
  842. columnProp: "applyDate",
  843. headerAlign: "center",
  844. align: "left",
  845. columnLabel: "申请日期",
  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: 106002,
  857. serialNumber: '106002Table1ApplyReason',
  858. tableId: "106002Table1",
  859. tableName: "刀具申请主表",
  860. columnProp: "applyReason",
  861. headerAlign: "center",
  862. align: "left",
  863. columnLabel: "申请原因",
  864. columnHidden: false,
  865. columnImage: false,
  866. columnSortable: false,
  867. sortLv: 0,
  868. status: true,
  869. fixed: '',
  870. columnWidth: 150
  871. },
  872. {
  873. userId: this.$store.state.user.name,
  874. functionId: 106002,
  875. serialNumber: '106002Table1Remark',
  876. tableId: "106002Table1",
  877. tableName: "刀具申请主表",
  878. columnProp: "remark",
  879. headerAlign: "center",
  880. align: "left",
  881. columnLabel: "申请备注",
  882. columnHidden: false,
  883. columnImage: false,
  884. columnSortable: false,
  885. sortLv: 0,
  886. status: true,
  887. fixed: '',
  888. columnWidth: 200
  889. },
  890. ],
  891. columnList2: [
  892. {
  893. userId: this.$store.state.user.name,
  894. functionId: 106002,
  895. serialNumber: '106002Table2SeqNo',
  896. tableId: '106002Table2',
  897. tableName: '工具申请明细',
  898. columnProp: 'seqNo',
  899. headerAlign: 'center',
  900. align: 'center',
  901. columnLabel: '序号',
  902. columnHidden: false,
  903. columnImage: false,
  904. columnSortable: false,
  905. sortLv: 0,
  906. status: true,
  907. fixed: '',
  908. columnWidth: 40
  909. },
  910. {
  911. userId: this.$store.state.user.name,
  912. functionId: 106002,
  913. serialNumber: '106002Table2QuotationNo',
  914. tableId: '106002Table2',
  915. tableName: '工具申请明细',
  916. columnProp: 'orderRef1',
  917. headerAlign: 'center',
  918. align: 'center',
  919. columnLabel: '项目编码',
  920. columnHidden: false,
  921. columnImage: false,
  922. columnSortable: false,
  923. sortLv: 0,
  924. status: true,
  925. fixed: '',
  926. columnWidth: 100
  927. },
  928. {
  929. userId: this.$store.state.user.name,
  930. functionId: 106002,
  931. serialNumber: '106002Table2ToolNo',
  932. tableId: '106002Table2',
  933. tableName: '工具申请明细',
  934. columnProp: 'toolId',
  935. headerAlign: 'center',
  936. align: 'center',
  937. columnLabel: '工具编码',
  938. columnHidden: false,
  939. columnImage: false,
  940. columnSortable: false,
  941. sortLv: 0,
  942. status: true,
  943. fixed: '',
  944. columnWidth: 70
  945. },
  946. {
  947. userId: this.$store.state.user.name,
  948. functionId: 106002,
  949. serialNumber: '106002Table2ToolDescription',
  950. tableId: '106002Table2',
  951. tableName: '工具申请明细',
  952. columnProp: 'toolDesc',
  953. headerAlign: 'center',
  954. align: 'center',
  955. columnLabel: '工具描述',
  956. columnHidden: false,
  957. columnImage: false,
  958. columnSortable: false,
  959. sortLv: 0,
  960. status: true,
  961. fixed: '',
  962. columnWidth: 120
  963. },
  964. {
  965. userId: this.$store.state.user.name,
  966. functionId: 106002,
  967. serialNumber: '106002Table2ApplyQty',
  968. tableId: '106002Table2',
  969. tableName: '工具申请明细',
  970. columnProp: 'applyQty',
  971. headerAlign: 'center',
  972. align: 'center',
  973. columnLabel: '申请数量',
  974. columnHidden: false,
  975. columnImage: false,
  976. columnSortable: false,
  977. sortLv: 0,
  978. status: true,
  979. fixed: '',
  980. columnWidth: 80
  981. },
  982. {
  983. userId: this.$store.state.user.name,
  984. functionId: 106002,
  985. serialNumber: '106002Table2UnitCost',
  986. tableId: '106002Table2',
  987. tableName: '工具申请明细',
  988. columnProp: 'standardCost',
  989. headerAlign: 'center',
  990. align: 'center',
  991. columnLabel: '工具成本',
  992. columnHidden: false,
  993. columnImage: false,
  994. columnSortable: false,
  995. sortLv: 0,
  996. status: true,
  997. fixed: '',
  998. columnWidth: 80
  999. },
  1000. {
  1001. userId: this.$store.state.user.name,
  1002. functionId: 106002,
  1003. serialNumber: '106002Table2QuotationNo',
  1004. tableId: '106002Table2',
  1005. tableName: '工具申请明细',
  1006. columnProp: 'orderRef2',
  1007. headerAlign: 'center',
  1008. align: 'center',
  1009. columnLabel: '物料编码',
  1010. columnHidden: false,
  1011. columnImage: false,
  1012. columnSortable: false,
  1013. sortLv: 0,
  1014. status: true,
  1015. fixed: '',
  1016. columnWidth: 70
  1017. }, {
  1018. userId: this.$store.state.user.name,
  1019. functionId: 106002,
  1020. serialNumber: '106002Table2QuotationNo',
  1021. tableId: '106002Table2',
  1022. tableName: '工具申请明细',
  1023. columnProp: 'orderRef3',
  1024. headerAlign: 'center',
  1025. align: 'center',
  1026. columnLabel: '工艺路线版本',
  1027. columnHidden: false,
  1028. columnImage: false,
  1029. columnSortable: false,
  1030. sortLv: 0,
  1031. status: true,
  1032. fixed: '',
  1033. columnWidth: 70
  1034. },
  1035. {
  1036. userId: this.$store.state.user.name,
  1037. functionId: 106002,
  1038. serialNumber: '106002Table2QuotationNo',
  1039. tableId: '106002Table2',
  1040. tableName: '工具申请明细',
  1041. columnProp: 'orderRef5',
  1042. headerAlign: 'center',
  1043. align: 'center',
  1044. columnLabel: '替代编码',
  1045. columnHidden: false,
  1046. columnImage: false,
  1047. columnSortable: false,
  1048. sortLv: 0,
  1049. status: true,
  1050. fixed: '',
  1051. columnWidth: 70
  1052. },{
  1053. userId: this.$store.state.user.name,
  1054. functionId: 106002,
  1055. serialNumber: '106002Table2QuotationNo',
  1056. tableId: '106002Table2',
  1057. tableName: '工具申请明细',
  1058. columnProp: 'operationNo',
  1059. headerAlign: 'center',
  1060. align: 'center',
  1061. columnLabel: '工序号',
  1062. columnHidden: false,
  1063. columnImage: false,
  1064. columnSortable: false,
  1065. sortLv: 0,
  1066. status: true,
  1067. fixed: '',
  1068. columnWidth: 70
  1069. },{
  1070. userId: this.$store.state.user.name,
  1071. functionId: 106002,
  1072. serialNumber: '106002Table2QuotationNo',
  1073. tableId: '106002Table2',
  1074. tableName: '工具申请明细',
  1075. columnProp: 'operationName',
  1076. headerAlign: 'center',
  1077. align: 'center',
  1078. columnLabel: '工序',
  1079. columnHidden: false,
  1080. columnImage: false,
  1081. columnSortable: false,
  1082. sortLv: 0,
  1083. status: true,
  1084. fixed: '',
  1085. columnWidth: 70
  1086. },
  1087. ],
  1088. columnFileContentArray: [
  1089. {
  1090. columnProp: 'fileName',
  1091. headeralign: 'left',
  1092. align: 'left',
  1093. columnLabel: '文件名称',
  1094. columnHidden: false,
  1095. columnImage: false,
  1096. columnSortable: false,
  1097. sortLv: 0,
  1098. status: true,
  1099. fixed: false
  1100. // }, {
  1101. // columnProp: 'createdBy',
  1102. // headeralign: 'left',
  1103. // align: 'left',
  1104. // columnLabel: '上传人',
  1105. // columnHidden: false,
  1106. // columnImage: false,
  1107. // columnSortable: true,
  1108. // sortLv: 0,
  1109. // status: true,
  1110. // fixed: false
  1111. }, {
  1112. columnProp: 'createDate',
  1113. headeralign: 'left',
  1114. align: 'left',
  1115. columnLabel: '上传时间',
  1116. columnHidden: false,
  1117. columnImage: false,
  1118. columnSortable: true,
  1119. sortLv: 0,
  1120. status: true,
  1121. fixed: false
  1122. }, {
  1123. columnProp: 'orderRef3',
  1124. headeralign: 'left',
  1125. align: 'left',
  1126. columnLabel: '类型',
  1127. columnHidden: false,
  1128. columnImage: false,
  1129. columnSortable: true,
  1130. sortLv: 0,
  1131. status: true,
  1132. fixed: false
  1133. },
  1134. ],
  1135. approvalList: [],
  1136. rejectOpinion: '',
  1137. submitModalFlag: false,
  1138. }
  1139. },
  1140. watch: {
  1141. // columnList1: {
  1142. // deep: true,
  1143. // handler: function (newV, oldV) {
  1144. // debugger
  1145. //
  1146. // }
  1147. // }
  1148. },
  1149. mounted() {
  1150. this.$nextTick(() => {
  1151. this.height = window.innerHeight - 520;
  1152. })
  1153. },
  1154. methods: {
  1155. // 查询审批信息
  1156. getApprovalList () {
  1157. if (Object.keys(this.currentRow).length !== 0) {
  1158. let tempData = {
  1159. site: this.$store.state.user.site,
  1160. menuId: this.$route.meta.menuId,
  1161. documentNo: this.currentRow.applyNo
  1162. }
  1163. getApprovalList(tempData).then(({data}) => {
  1164. if (data && data.code === 0) {
  1165. this.approvalList = data.rows
  1166. } else {
  1167. this.approvalList = []
  1168. }
  1169. })
  1170. }
  1171. },
  1172. // 获取基础数据列表S
  1173. getBaseList (val, type) {
  1174. this.tagNo = val
  1175. this.tagNo2 = type
  1176. this.$nextTick(() => {
  1177. let strVal = ''
  1178. if (val === 103) {
  1179. if(type==1) {
  1180. strVal = this.dataForm.quoter
  1181. }
  1182. if(type==2) {
  1183. strVal = this.dataForm.tp
  1184. }
  1185. if(type==3) {
  1186. strVal = this.dataForm.purchaser
  1187. }
  1188. }
  1189. this.$refs.baseList.init(val, strVal)
  1190. })
  1191. },
  1192. /* 列表方法的回调 */
  1193. getBaseData (val) {
  1194. if (this.tagNo === 103) {
  1195. if(this.tagNo2==1) {
  1196. this.dataForm.quoter = val.username
  1197. this.dataForm.quoterName = val.user_display
  1198. this.$nextTick(() => {
  1199. this.$triggerInputEvent(this.$refs.quoterName);
  1200. });
  1201. }
  1202. if(this.tagNo2==2) {
  1203. this.dataForm.tp = val.username
  1204. this.dataForm.tpName = val.user_display
  1205. this.$nextTick(() => {
  1206. this.$triggerInputEvent(this.$refs.tpName);
  1207. });
  1208. }
  1209. if(this.tagNo2==3) {
  1210. this.dataForm.purchaser = val.username
  1211. this.dataForm.purchaserName = val.user_display
  1212. this.$nextTick(() => {
  1213. this.$triggerInputEvent(this.$refs.purchaserName);
  1214. });
  1215. }
  1216. }
  1217. },
  1218. //导出excel
  1219. async createExportData() {
  1220. this.searchData.limit = -1
  1221. this.searchData.page = 1
  1222. await searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1223. this.exportList= data.page.list;
  1224. })
  1225. return this.exportList;
  1226. },
  1227. startDownload() {
  1228. // this.exportData = this.dataList
  1229. },
  1230. finishDownload() {
  1231. },
  1232. fields() {
  1233. let json = "{"
  1234. this.columnList1.forEach((item, index) => {
  1235. if (index == this.columnList1.length - 1) {
  1236. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1237. } else {
  1238. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1239. }
  1240. })
  1241. json += "}"
  1242. let s = eval("(" + json + ")")
  1243. return s
  1244. },
  1245. //导出excel
  1246. async createExportData2() {
  1247. return this.contactList;
  1248. },
  1249. startDownload2() {
  1250. // this.exportData = this.dataList
  1251. },
  1252. finishDownload2() {
  1253. },
  1254. fields2() {
  1255. let json = "{"
  1256. this.columnList2.forEach((item, index) => {
  1257. if (index == this.columnList2.length - 1) {
  1258. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1259. } else {
  1260. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1261. }
  1262. })
  1263. json += "}"
  1264. let s = eval("(" + json + ")")
  1265. return s
  1266. },
  1267. // 导出 end
  1268. // 获取数据列表
  1269. search () {
  1270. this.searchData.limit = this.pageSize
  1271. this.searchData.page = this.pageIndex
  1272. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  1273. if (data.code == 0) {
  1274. this.dataList1 = data.page.list
  1275. this.pageIndex = data.page.currPage
  1276. this.pageSize = data.page.pageSize
  1277. this.totalPage = data.page.totalCount
  1278. if(this.dataList1.length>0){
  1279. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1280. this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
  1281. }else {
  1282. this.currentRow ={}
  1283. }
  1284. this.refreshCurrentTabTable ()
  1285. }
  1286. this.dataListLoading = false
  1287. })
  1288. },
  1289. //单击切换订单
  1290. changeData(row) {
  1291. this.currentRow = JSON.parse(JSON.stringify(row));
  1292. this.currentRow2 = row;
  1293. this.refreshCurrentTabTable ();
  1294. },
  1295. addUploadFileModal(){
  1296. let currentData = {
  1297. site: this.currentRow.site,
  1298. createBy: this.$store.state.user.name,
  1299. projectId: this.currentRow.applyNo,
  1300. projectName: '',
  1301. remark: '',
  1302. };
  1303. //打开组件 去做新增业务
  1304. this.$nextTick(() => {
  1305. this.$refs.projectUploadFile.init(currentData);
  1306. })
  1307. },
  1308. deleteFile(row){
  1309. this.$confirm('确定要删除此文件?', '提示', {
  1310. confirmButtonText: '确定',
  1311. cancelButtonText: '取消',
  1312. type: 'warning'
  1313. }).then(() => {
  1314. deleteProjectFile(row).then(({data}) => {
  1315. if (data && data.code == 0) {
  1316. this.getFileContentData();
  1317. this.$message({
  1318. message: '操作成功',
  1319. type: 'success',
  1320. duration: 1500,
  1321. onClose: () => {
  1322. }
  1323. })
  1324. } else {
  1325. this.$alert(data.msg, '错误', {
  1326. confirmButtonText: '确定'
  1327. })
  1328. }
  1329. })
  1330. }).catch(() => {
  1331. })
  1332. },
  1333. tabClick (tab, event) {
  1334. // 刷新列表数据
  1335. this.refreshCurrentTabTable()
  1336. },
  1337. // 刷新页签的table数据
  1338. refreshCurrentTabTable () {
  1339. if (this.activeName == 'detail') {
  1340. this.searchToolApplyDetail();
  1341. }
  1342. if (this.activeName == 'down') {
  1343. // this.getFileContentData();
  1344. }
  1345. if (this.activeName === 'approvalInformation') {
  1346. this.getApprovalList()
  1347. }
  1348. },
  1349. searchToolApplyDetail(){
  1350. if(this.currentRow.applyNo){
  1351. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  1352. if (data.code == 0) {
  1353. this.detailList = data.rows
  1354. }
  1355. })
  1356. }else {
  1357. this.detailList =[]
  1358. }
  1359. },
  1360. editModal (row) {
  1361. this.getNodeAuthority(row)
  1362. this.dataForm = {
  1363. site: row.site,
  1364. applyNo: row.applyNo,
  1365. applyBy: row.applyBy,
  1366. applyDate: row.applyDate,
  1367. applySumQty: row.applySumQty,
  1368. applyReason: row.applyReason,
  1369. remark: row.remark,
  1370. createBy: row.createBy,
  1371. department:row.department,
  1372. detailList: [],
  1373. status: row.status,
  1374. rejectOpinion: '',
  1375. nodeConclusion: '',
  1376. quoter: row.quoter,
  1377. quoterName: row.quoterName,
  1378. tp: row.tp,
  1379. tpName: row.tpName,
  1380. purchaser: row.purchaser,
  1381. purchaserName: row.purchaserName,
  1382. totalCost:row.totalCost,
  1383. menuId: this.$route.meta.menuId,
  1384. userName: this.$store.state.user.name,
  1385. }
  1386. searchProjectToolApplyDetail({ site: row.site,
  1387. applyNo: row.applyNo,}).then(({data}) => {
  1388. if (data.code == 0) {
  1389. this.toolData = data.rows
  1390. }
  1391. })
  1392. this.visible=true
  1393. },
  1394. editModalU (row) {
  1395. this.getNodeAuthority(row)
  1396. this.dataForm = {
  1397. site: row.site,
  1398. applyNo: row.applyNo,
  1399. applyBy: row.applyBy,
  1400. applyDate: row.applyDate,
  1401. applySumQty: row.applySumQty,
  1402. applyReason: row.applyReason,
  1403. remark: row.remark,
  1404. createBy: row.createBy,
  1405. department:row.department,
  1406. detailList: [],
  1407. status: row.status,
  1408. rejectOpinion: '',
  1409. nodeConclusion: '',
  1410. quoter: row.quoter,
  1411. quoterName: row.quoterName,
  1412. tp: row.tp,
  1413. tpName: row.tpName,
  1414. purchaser: row.purchaser,
  1415. purchaserName: row.purchaserName,
  1416. menuId: this.$route.meta.menuId,
  1417. userName: this.$store.state.user.name,
  1418. }
  1419. searchProjectToolApplyDetail({ site: row.site,
  1420. applyNo: row.applyNo,}).then(({data}) => {
  1421. if (data.code == 0) {
  1422. this.toolData = data.rows
  1423. }
  1424. })
  1425. this.visibleU=true
  1426. },
  1427. comfirmApply (row) {
  1428. this.$confirm(`确定下达这个申请`, '提示', {
  1429. confirmButtonText: '确定',
  1430. cancelButtonText: '取消',
  1431. type: 'warning'
  1432. }).then(() => {
  1433. let tempData = {
  1434. site: row.site,
  1435. userName: this.$store.state.user.name,
  1436. applyNo: row.applyNo,
  1437. menuId: this.$route.meta.menuId
  1438. }
  1439. comfirmProjectToolApply(tempData).then(({data}) => {
  1440. if (data && data.code === 0) {
  1441. row.statusCode = '10'
  1442. row.status = '下达'
  1443. this.$message({
  1444. message: '操作成功',
  1445. type: 'success',
  1446. duration: 1500,
  1447. onClose: () => {}
  1448. })
  1449. } else {
  1450. this.$alert(data.msg, '错误', {
  1451. confirmButtonText: '确定'
  1452. })
  1453. }
  1454. })
  1455. })
  1456. },
  1457. cancelApply(row){
  1458. this.$confirm(`确定取消这个申请`, '提示', {
  1459. confirmButtonText: '确定',
  1460. cancelButtonText: '取消',
  1461. type: 'warning'
  1462. }).then(() => {
  1463. cancelProjectToolApply(row).then(({data}) => {
  1464. if (data && data.code === 0) {
  1465. this.search();
  1466. this.$message({
  1467. message: '操作成功',
  1468. type: 'success',
  1469. duration: 1500,
  1470. onClose: () => {
  1471. }
  1472. })
  1473. } else {
  1474. this.$alert(data.msg, '错误', {
  1475. confirmButtonText: '确定'
  1476. })
  1477. }
  1478. })
  1479. })
  1480. },
  1481. //刷新派设备文档的列表
  1482. getFileContentData() {
  1483. let currentData = {orderRef2: this.currentRow.applyNo};
  1484. getFileContentList(currentData).then(({data}) => {
  1485. //区分请求成功和失败的状况
  1486. if (data && data.code == 200) {
  1487. this.fileContentList = data.rows;
  1488. } else {
  1489. this.fileContentList = [];
  1490. }
  1491. });
  1492. },
  1493. // 下载
  1494. downloadFile(row){
  1495. // let inData={
  1496. // site:this.currentRow.site,
  1497. // username:this.$store.state.user.name,
  1498. // projectId:this.currentRow.projectId
  1499. // }
  1500. // getProjectUserRole(inData).then(({data}) => {
  1501. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1502. downLoadProjectFile(row)
  1503. .then(({data}) => {
  1504. // 不限制文件下载类型
  1505. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1506. // 下载文件名称
  1507. const fileName = row.fileName
  1508. // a标签下载
  1509. const linkNode = document.createElement('a')
  1510. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1511. linkNode.style.display = 'none'
  1512. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1513. console.log(linkNode)
  1514. // if(val == 'Y'){
  1515. // this.pdfVisible = true
  1516. // this.pdfUrl = linkNode.href
  1517. // }else {
  1518. document.body.appendChild(linkNode)
  1519. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1520. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1521. document.body.removeChild(linkNode)
  1522. // }
  1523. })
  1524. // }else {
  1525. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  1526. // confirmButtonText: '确定'
  1527. // })
  1528. // }
  1529. // })
  1530. },
  1531. // 每页数
  1532. sizeChangeHandle (val) {
  1533. this.pageSize = val
  1534. this.pageIndex = 1
  1535. this.search()
  1536. },
  1537. // 当前页
  1538. currentChangeHandle (val) {
  1539. this.pageIndex = val
  1540. this.search()
  1541. },
  1542. openMassageModel(){
  1543. if(Object.keys(this.currentRow).length === 0){
  1544. this.$alert('未选择记录!', '错误', {
  1545. confirmButtonText: '确定'
  1546. })
  1547. return false;
  1548. }
  1549. this.modelData={
  1550. site:this.currentRow.site,
  1551. applyNo:this.currentRow.applyNo,
  1552. prNo:this.currentRow.prNo,
  1553. remark1:this.currentRow.remark1,
  1554. poNo:this.currentRow.poNo,
  1555. supplierName:this.currentRow.supplierName,
  1556. allCost:this.currentRow.allCost,
  1557. remark2:this.currentRow.remark2,
  1558. }
  1559. this.modelFlag=true
  1560. },
  1561. changeSum() {
  1562. this.dataForm.applySumQty = 0
  1563. this.dataForm.totalCost =0
  1564. for (const item of this.toolData) {
  1565. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  1566. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
  1567. this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
  1568. }
  1569. },
  1570. saveHeaderMessage(){
  1571. this.$confirm('确定是否保存','提示',{
  1572. confirmButtonText:'确定',
  1573. cancelButtonText:'取消',
  1574. type:'warning'
  1575. }).then(()=>{
  1576. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  1577. if (data && data.code == 0) {
  1578. this.modelFlag=false;
  1579. this.currentRow.prNo=this.modelData.prNo
  1580. this.currentRow.remark1=this.modelData.remark1
  1581. this.currentRow.poNo=this.modelData.poNo
  1582. this.currentRow.supplierName=this.modelData.supplierName
  1583. this.currentRow.allCost=this.modelData.allCost
  1584. this.currentRow.totalCost=this.modelData.totalCost
  1585. this.currentRow.remark2=this.modelData.remark2
  1586. this.currentRow2.prNo=this.modelData.prNo
  1587. this.currentRow2.remark1=this.modelData.remark1
  1588. this.currentRow2.poNo=this.modelData.poNo
  1589. this.currentRow2.supplierName=this.modelData.supplierName
  1590. this.currentRow2.allCost=this.modelData.allCost
  1591. this.currentRow2.remark2=this.modelData.remark2
  1592. this.$message({
  1593. message: '操作成功',
  1594. type: 'success',
  1595. duration: 1500,
  1596. onClose: () => {
  1597. }
  1598. })
  1599. } else {
  1600. this.$alert(data.msg, '错误', {
  1601. confirmButtonText: '确定'
  1602. })
  1603. }
  1604. })
  1605. })
  1606. },
  1607. // 同意提交
  1608. agreeSubmit () {
  1609. this.$confirm(`是否确认提交?`, '提示', {
  1610. confirmButtonText: '确定',
  1611. cancelButtonText: '取消',
  1612. type: 'warning'
  1613. }).then(() => {
  1614. this.dataForm.nodeConclusion = 'Y'
  1615. this.submitData()
  1616. })
  1617. },
  1618. // 打开提交模态框
  1619. submitDataModal () {
  1620. this.rejectOpinion = ''
  1621. this.submitModalFlag = true
  1622. },
  1623. // 驳回提交
  1624. rejectSubmit () {
  1625. this.$confirm(`是否确认驳回?`, '提示', {
  1626. confirmButtonText: '确定',
  1627. cancelButtonText: '取消',
  1628. type: 'warning'
  1629. }).then(() => {
  1630. this.dataForm.rejectOpinion = this.rejectOpinion
  1631. this.dataForm.nodeConclusion = 'N'
  1632. this.submitData()
  1633. })
  1634. },
  1635. // 提交
  1636. submitData () {
  1637. this.dataForm.userName = this.$store.state.user.name
  1638. this.dataForm.menuId = this.$route.meta.menuId
  1639. this.dataForm.detailList = this.toolData
  1640. submitChange(this.dataForm).then(({data}) => {
  1641. if (data && data.code === 0) {
  1642. for (let i = 0; i <this.dataList1.length ; i++) {
  1643. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1644. this.dataList1[i].remark = this.dataForm.remark
  1645. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1646. this.dataList1[i].applyReason = this.dataForm.applyReason
  1647. }
  1648. }
  1649. this.refreshCurrentTabTable()
  1650. this.submitModalFlag = false
  1651. this.visible = false
  1652. this.$message({
  1653. message: '操作成功',
  1654. type: 'success',
  1655. duration: 1500,
  1656. onClose: () => {
  1657. }
  1658. })
  1659. } else {
  1660. this.$alert(data.msg, '错误', {
  1661. confirmButtonText: '确定'
  1662. })
  1663. }
  1664. })
  1665. },
  1666. saveData () {
  1667. this.dataForm.detailList = this.toolData
  1668. editToolApplication(this.dataForm).then(({data}) => {
  1669. if (data && data.code === 0) {
  1670. for (let i = 0; i <this.dataList1.length ; i++) {
  1671. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  1672. this.dataList1[i].remark = this.dataForm.remark
  1673. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  1674. this.dataList1[i].applyReason = this.dataForm.applyReason
  1675. this.dataList1[i].quoter = this.dataForm.quoter
  1676. this.dataList1[i].tp = this.dataForm.tp
  1677. this.dataList1[i].totalCost = this.dataForm.totalCost
  1678. this.dataList1[i].purchaser = this.dataForm.purchaser
  1679. this.dataList1[i].quoterName = this.dataForm.quoterName
  1680. this.dataList1[i].tpName = this.dataForm.tpName
  1681. this.dataList1[i].purchaserName = this.dataForm.purchaserName
  1682. }
  1683. }
  1684. this.visible = false
  1685. this.visibleU = false
  1686. this.refreshCurrentTabTable()
  1687. this.$message({
  1688. message: '操作成功',
  1689. type: 'success',
  1690. duration: 1500,
  1691. onClose: () => {
  1692. }
  1693. })
  1694. } else {
  1695. this.$alert(data.msg, '错误', {
  1696. confirmButtonText: '确定'
  1697. })
  1698. }
  1699. })
  1700. },
  1701. jumpBM(row){
  1702. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){
  1703. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  1704. }else {
  1705. let inData={
  1706. site:row.site,
  1707. testPartNo:row.orderRef2
  1708. }
  1709. getProjectPartNowBm(inData).then(({data}) => {
  1710. //区分请求成功和失败的状况
  1711. if (data && data.code == 0) {
  1712. if(data.rows==null||data.rows.length==0){
  1713. this.$alert('该物料没有benchmark', '警告', {confirmButtonText: '确定',});
  1714. }
  1715. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:data.rows[0].nowBm},})
  1716. } else {
  1717. }
  1718. });
  1719. }
  1720. },
  1721. // 获取流程的配置权限
  1722. async getNodeAuthority (row) {
  1723. let tempData = {
  1724. site: row.site,
  1725. stepId: row.stepId,
  1726. menuId: this.$route.meta.menuId
  1727. }
  1728. await getNodeAuthority(tempData).then(({data}) => {
  1729. if (data && data.code === 0) {
  1730. // this.plmChangeRequestArr = data.rows.plm_change_request
  1731. // this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  1732. // this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  1733. // this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  1734. // this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  1735. // this.plmChangeItemArr = data.rows.plm_change_item
  1736. // this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  1737. }
  1738. })
  1739. },
  1740. },
  1741. activated() {
  1742. },
  1743. }
  1744. </script>
  1745. <style >
  1746. .el-transfer-panel {
  1747. border: 2px solid #17b3a3;
  1748. border-radius: 4px;
  1749. overflow: hidden;
  1750. background: #fff;
  1751. display: inline-block;
  1752. vertical-align: middle;
  1753. width: 200px;
  1754. max-height: 100%;
  1755. -webkit-box-sizing: border-box;
  1756. box-sizing: border-box;
  1757. position: relative;
  1758. }
  1759. .el-transfer-panel .el-transfer-panel__header {
  1760. height: 40px;
  1761. line-height: 40px;
  1762. background: #17b3a3;
  1763. margin: 0;
  1764. padding-left: 15px;
  1765. border-bottom: 1px solid #17b3a3;
  1766. -webkit-box-sizing: border-box;
  1767. box-sizing: border-box;
  1768. color: #000;
  1769. }
  1770. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1771. font-size: 14px;
  1772. color: #303133;
  1773. font-weight: 400;
  1774. }
  1775. </style>