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.

3274 lines
117 KiB

2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
10 months ago
2 years ago
9 months ago
2 years ago
2 years ago
10 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
10 months ago
2 years ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
1 year ago
2 years ago
2 years ago
10 months ago
2 years ago
1 year ago
8 months ago
1 year ago
2 years ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
8 months ago
1 year ago
1 year ago
8 months ago
8 months ago
8 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
10 months ago
8 months ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
8 months ago
8 months ago
8 months ago
1 year ago
1 year ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
1 year ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
2 years ago
10 months ago
9 months ago
2 years ago
10 months ago
10 months ago
10 months ago
9 months ago
8 months ago
8 months ago
10 months ago
9 months ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
9 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
8 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months ago
1 year ago
10 months ago
2 years ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
8 months ago
10 months ago
9 months ago
10 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
2 years ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
7 months ago
10 months ago
8 months ago
8 months ago
7 months ago
8 months ago
10 months ago
10 months ago
7 months ago
1 year ago
10 months ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
2 years ago
1 year ago
2 years ago
10 months ago
2 years ago
2 years ago
10 months ago
1 year ago
1 year ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
10 months ago
2 years ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
8 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
2 years ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
2 years ago
10 months 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" clearable style="width: 120px"></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-input v-model="searchData.toolId" clearable style="width: 120px"></el-input>
  27. </el-form-item>
  28. <el-form-item :label="'PLM物料编码'">
  29. <el-input v-model="searchData.plmPartNo" clearable style="width: 120px"></el-input>
  30. </el-form-item>
  31. <el-form-item :label="'IFS物料编码'">
  32. <el-input v-model="searchData.ifsPartNo" clearable style="width: 120px"></el-input>
  33. </el-form-item>
  34. <el-form-item label="节点审批人">
  35. <el-input v-model="searchData.sp" clearable style="width: 120px"></el-input>
  36. </el-form-item>
  37. <el-form-item label="当前节点">
  38. <el-select v-model="searchData.nodeId" placeholder="请选择节点" clearable style="width: 120px">
  39. <el-option
  40. v-for="option in nodeOptions"
  41. :key="option.id"
  42. :label="option.name"
  43. :value="option.id">
  44. </el-option>
  45. </el-select>
  46. </el-form-item>
  47. <el-form-item :label="'状态'">
  48. <el-select v-model="searchData.status" clearable style="width: 80px">
  49. <el-option label="全部" value=""></el-option>
  50. <el-option label="草稿" value="草稿"></el-option>
  51. <el-option label="审批中" value="审批中"></el-option>
  52. <el-option label="下达" value="下达"></el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item label=" ">
  56. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  57. <!-- <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>-->
  58. <download-excel
  59. :fields="fields()"
  60. :data="exportData"
  61. type="xls"
  62. :name="exportName"
  63. :header="exportHeader"
  64. :footer="exportFooter"
  65. :fetch="createExportData"
  66. :before-generate="startDownload"
  67. :before-finish="finishDownload"
  68. worksheet="导出信息"
  69. class="el-button el-button--primary el-button--medium">
  70. {{ '导出' }}
  71. </download-excel>
  72. <el-button @click="filterVisible = true">搜索</el-button>
  73. </el-form-item>
  74. </el-form>
  75. <el-table
  76. :height="height"
  77. :data="dataList1"
  78. border
  79. ref="mainTable"
  80. @row-click="changeData"
  81. highlight-current-row
  82. v-loading="dataListLoading"
  83. style="width: 100%;">
  84. <el-table-column
  85. header-align="center"
  86. align="center"
  87. width="150"
  88. fixed="right"
  89. label="操作">
  90. <template slot-scope="scope">
  91. <template v-if="isAuth('106002:issued')">
  92. <el-link style="cursor: pointer" v-if="scope.row.status==='草稿'"
  93. :disabled="!!issueLoadingSet[scope.row.applyNo]"
  94. @click="comfirmApply(scope.row)">
  95. <i v-if="issueLoadingSet[scope.row.applyNo]" class="el-icon-loading"></i>下达
  96. </el-link>
  97. </template>
  98. <template v-if="isAuth('106002:update')">
  99. <a type="text" size="small" v-if="scope.row.status==='草稿'" @click="editModalU(scope.row)">修改</a>
  100. </template>
  101. <template v-if="isAuth('106002:approval')">
  102. <a type="text" size="small" v-if="scope.row.status==='审批中'" @click="editModal(scope.row)">审批</a>
  103. </template>
  104. <template v-if="isAuth('106002:detail')">
  105. <a type="text" size="small" @click="detail(scope.row)">详情</a>
  106. </template>
  107. <template v-if="isAuth('106002:remove')">
  108. <a type="text" size="small" v-if="scope.row.status==='草稿'" @click="cancelApply(scope.row)">删除</a>
  109. </template>
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. v-for="(item,index) in columnList1" :key="index"
  114. :sortable="item.columnSortable"
  115. :prop="item.columnProp"
  116. :header-align="item.headerAlign"
  117. :show-overflow-tooltip="item.showOverflowTooltip"
  118. :align="item.align"
  119. :fixed="item.fixed==''?false:item.fixed"
  120. :min-width="item.columnWidth"
  121. :label="item.columnLabel">
  122. <template slot-scope="scope">
  123. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  124. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. <el-pagination
  129. @size-change="sizeChangeHandle"
  130. @current-change="currentChangeHandle"
  131. :current-page="pageIndex"
  132. :page-sizes="[20, 50, 100, 1000]"
  133. :page-size="pageSize"
  134. :total="totalPage"
  135. layout="total, sizes, prev, pager, next, jumper">
  136. </el-pagination>
  137. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  138. <el-tab-pane label="基本信息" name="attribute">
  139. <order-attribute
  140. ref="dialogAttribute"
  141. :disabled="currentRow.status === '已完成'"
  142. :order-no="currentRow.applyNo"
  143. :approval-username="currentRow.sp"
  144. :proofing-status="currentRow.status"
  145. :super-admin="superAdmin"
  146. :code-no="'toolApply'"
  147. :function-type="'TL_Receipt'">
  148. </order-attribute>
  149. </el-tab-pane>
  150. <el-tab-pane label="工具明细" name="detail">
  151. <el-table
  152. :data="detailList"
  153. height="240"
  154. border
  155. v-loading="dataListLoading"
  156. style="width: 100%; ">
  157. <el-table-column
  158. v-for="(item,index) in columnList2" :key="index"
  159. :sortable="item.columnSortable"
  160. :prop="item.columnProp"
  161. :header-align="item.headerAlign"
  162. :show-overflow-tooltip="item.showOverflowTooltip"
  163. :align="item.align"
  164. :fixed="item.fixed==''?false:item.fixed"
  165. :min-width="item.columnWidth"
  166. :label="item.columnLabel">
  167. <template slot-scope="scope">
  168. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  169. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  170. </template>
  171. </el-table-column>
  172. <el-table-column
  173. header-align="center"
  174. align="center"
  175. width="120"
  176. fixed="right"
  177. label="操作">
  178. <template slot-scope="scope">
  179. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  180. </template>
  181. </el-table-column>
  182. <!-- <el-table-column-->
  183. <!-- fixed="right"-->
  184. <!-- header-align="center"-->
  185. <!-- align="center"-->
  186. <!-- width="100"-->
  187. <!-- label="操作">-->
  188. <!-- <template slot-scope="scope">-->
  189. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  190. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  191. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  192. <!-- </template>-->
  193. <!-- </el-table-column>-->
  194. </el-table>
  195. </el-tab-pane>
  196. <el-tab-pane label="处理信息" name="tab4">
  197. <!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
  198. <!-- &lt;!&ndash; <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>&ndash;&gt;-->
  199. <!-- &lt;!&ndash; <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>&ndash;&gt;-->
  200. <!-- </el-form>-->
  201. <el-form label-position="top" :model="currentRow">
  202. <el-row :gutter="15">
  203. <el-col :span="6">
  204. <el-form-item label="IFS PR编号">
  205. <el-input v-model="currentRow.prNo" readonly></el-input>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :span="18">
  209. <el-form-item label="备注">
  210. <el-input v-model="currentRow.remark1" readonly></el-input>
  211. </el-form-item>
  212. </el-col>
  213. </el-row>
  214. <el-row :gutter="15" style="margin-top: 0px">
  215. <el-col :span="4">
  216. <el-form-item label="采购订单号">
  217. <el-input v-model="currentRow.poNo" readonly></el-input>
  218. </el-form-item>
  219. </el-col>
  220. <el-col :span="8">
  221. <el-form-item label="厂商名称">
  222. <el-input v-model="currentRow.supplierName" readonly></el-input>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="4">
  226. <el-form-item label="总成本(元)">
  227. <el-input v-if="accessField('10601001')" v-model="currentRow.allCost" readonly></el-input>
  228. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="4">
  232. <el-form-item label="CS">
  233. <el-input v-model="currentRow.cs" readonly></el-input>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="4">
  237. <el-form-item label="CO">
  238. <el-input v-model="currentRow.co" readonly></el-input>
  239. </el-form-item>
  240. </el-col>
  241. </el-row>
  242. <el-row :gutter="15" style="margin-top: 0px">
  243. <el-col :span="24">
  244. <el-form-item label="备注">
  245. <el-input v-model="currentRow.remark2" readonly></el-input>
  246. </el-form-item>
  247. </el-col>
  248. </el-row>
  249. </el-form>
  250. </el-tab-pane>
  251. <el-tab-pane label="附件信息" name="down">
  252. <oss-components height="25vh" ref="oss" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  253. </el-tab-pane>
  254. <!-- 审批信息 -->
  255. <el-tab-pane label="审批信息" name="approvalInformation">
  256. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information>
  257. </el-tab-pane>
  258. </el-tabs>
  259. <el-dialog width="950px" v-drag :title="'刀模申请修改'" :close-on-click-modal="false" :visible.sync="visibleU">
  260. <el-form :inline="true" label-position="top" label-width="100px">
  261. <el-form-item :label="'申请编号'">
  262. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  263. </el-form-item>
  264. <el-form-item :label="'申请总数'">
  265. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  266. </el-form-item>
  267. <el-form-item :label="'总成本'">
  268. <el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  269. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  270. </el-form-item>
  271. <el-form-item :label="'申请人'" required="required">
  272. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  273. </el-form-item>
  274. <el-form-item :label="'申请日期'" required="required">
  275. <el-date-picker
  276. value-format="yyyy-MM-dd"
  277. style="width: 100%"
  278. v-model="dataForm.applyDate"
  279. type="date"
  280. disabled
  281. placeholder="结束日期">
  282. </el-date-picker>
  283. </el-form-item>
  284. <el-form-item label="部门" required="required">
  285. <dict-data-select
  286. :site="$store.state.user.site"
  287. v-model="dataForm.department"
  288. dict-type="tool_application_department"
  289. disabled style="width: 130px">
  290. </dict-data-select>
  291. </el-form-item>
  292. <el-form-item required="required">
  293. <span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价员</a></span>
  294. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  295. </el-form-item>
  296. <el-form-item required="required">
  297. <span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
  298. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  299. </el-form-item>
  300. <el-form-item required="required">
  301. <span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购员</a></span>
  302. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  303. </el-form-item>
  304. <el-form-item>
  305. <span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  306. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  307. </el-form-item>
  308. <el-form-item label="费用抵消">
  309. <dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select>
  310. </el-form-item>
  311. </el-form>
  312. <el-form :inline="true" label-position="top" label-width="100px">
  313. <el-form-item :label="'申请原因'">
  314. <el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
  315. </el-form-item>
  316. </el-form>
  317. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 60px">
  318. <el-form-item :label="'备注'">
  319. <el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
  320. </el-form-item>
  321. </el-form>
  322. <el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
  323. <el-tab-pane label="基本信息" name="attribute">
  324. <order-attribute
  325. :disabled="currentRow.status === '已完成'"
  326. :order-no="currentRow.applyNo"
  327. :approval-username="currentRow.sp"
  328. :proofing-status="currentRow.status"
  329. :super-admin="superAdmin"
  330. :code-no="'toolApply'"
  331. :function-type="'TL_Receipt'">
  332. </order-attribute>
  333. </el-tab-pane>
  334. <el-tab-pane label="工具明细" name="detail">
  335. <div class="rq">
  336. <el-button type="primary" v-if="isAuth('106002:saveDetail')" @click="addChangeDetail" >新增</el-button>
  337. <el-button type="primary" v-if="isAuth('106002:removeDetail')" @click="toolDetailBatchDelete" >删除</el-button>
  338. <el-table
  339. height="278"
  340. :data="toolData"
  341. border
  342. @selection-change="selectionChangeHandle"
  343. ref="toolTable"
  344. v-loading="dataListLoading"
  345. style="width: 100%;">
  346. <el-table-column
  347. type="selection"
  348. align="center"
  349. width="55">
  350. </el-table-column>
  351. <el-table-column
  352. v-for="(item,index) in columnList2" :key="index"
  353. :sortable="item.columnSortable"
  354. :prop="item.columnProp"
  355. :header-align="item.headerAlign"
  356. :show-overflow-tooltip="item.showOverflowTooltip"
  357. :align="item.align"
  358. :fixed="item.fixed==''?false:item.fixed"
  359. :min-width="item.columnWidth"
  360. :label="item.columnLabel">
  361. <template slot-scope="scope">
  362. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  363. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  364. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  365. </div>
  366. <div v-else-if=" (item.columnProp === 'standardCost')">
  367. <el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
  368. </div>
  369. <div v-else>
  370. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
  371. </div>
  372. </template>
  373. </el-table-column>
  374. </el-table>
  375. </div>
  376. </el-tab-pane>
  377. <el-tab-pane label="TP处理结果" name="tp">
  378. <el-form label-position="top">
  379. <el-row :gutter="15">
  380. <el-col :span="6">
  381. <el-form-item label="IFS PR编号">
  382. <el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp&&!superAdmin"></el-input>
  383. </el-form-item>
  384. </el-col>
  385. <el-col :span="24">
  386. <el-form-item label="备注" style="height: 240px">
  387. <el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp&&!superAdmin"></el-input>
  388. </el-form-item>
  389. </el-col>
  390. </el-row>
  391. </el-form>
  392. </el-tab-pane>
  393. <el-tab-pane label="采购处理结果" name="caigou">
  394. <el-form label-position="top">
  395. <el-row :gutter="15" style="margin-top: 0px">
  396. <el-col :span="6">
  397. <el-form-item label="采购订单号">
  398. <el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="6">
  402. <el-form-item label="厂商名称">
  403. <el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="6">
  407. <el-form-item label="总成本(元)">
  408. <el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. </el-row>
  412. <el-row :gutter="15" style="margin-top: 0px">
  413. <el-col :span="24">
  414. <el-form-item label="备注" style="height: 90px">
  415. <el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  416. </el-form-item>
  417. </el-col>
  418. </el-row>
  419. <el-row :gutter="15" style="margin-top: 0px">
  420. <el-col :span="4">
  421. <el-form-item>
  422. <span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  423. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  424. </el-form-item>
  425. </el-col>
  426. <el-col :span="6">
  427. <el-form-item label="CO">
  428. <el-input v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser && !superAdmin"></el-input>
  429. </el-form-item>
  430. </el-col>
  431. </el-row>
  432. </el-form>
  433. </el-tab-pane>
  434. <el-tab-pane label="附件信息" name="down">
  435. <oss-components ref="oss1" height="25vh" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  436. </el-tab-pane>
  437. </el-tabs>
  438. <el-footer style="height:35px;margin-top:15px;text-align:center">
  439. <el-button type="primary" @click="saveData()" class="bigButton">{{ '保存' }}</el-button>
  440. <el-button type="primary" @click="visibleU = false" class="bigButton">{{ '取消' }}</el-button>
  441. </el-footer>
  442. </el-dialog>
  443. <el-dialog width="950px" v-drag :title="'刀模申请审批'" :close-on-click-modal="false" :visible.sync="visible">
  444. <el-form :inline="true" label-position="top" label-width="100px">
  445. <el-form-item :label="'申请编号'">
  446. <el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
  447. </el-form-item>
  448. <el-form-item :label="'申请总数'">
  449. <el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
  450. </el-form-item>
  451. <el-form-item :label="'总成本'">
  452. <el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
  453. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  454. </el-form-item>
  455. <el-form-item :label="'申请人'" required="required">
  456. <el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
  457. </el-form-item>
  458. <el-form-item :label="'申请日期'" required="required">
  459. <el-date-picker
  460. value-format="yyyy-MM-dd"
  461. style="width: 100%"
  462. v-model="dataForm.applyDate"
  463. type="date"
  464. disabled
  465. placeholder="结束日期">
  466. </el-date-picker>
  467. </el-form-item>
  468. <el-form-item label="部门" required="required">
  469. <dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  470. </el-form-item>
  471. <el-form-item required="required">
  472. <span slot="label" style="" @click="getBaseList(2002,1)"><a herf="#">报价员</a></span>
  473. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  474. </el-form-item>
  475. <el-form-item required="required">
  476. <span slot="label" style="" @click="getBaseList(2042,2)"><a herf="#">TP</a></span>
  477. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  478. </el-form-item>
  479. <el-form-item required="required">
  480. <span slot="label" style="" @click="getBaseList(2000,3)"><a herf="#">采购员</a></span>
  481. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  482. </el-form-item>
  483. <el-form-item>
  484. <span slot="label" style="" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  485. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  486. </el-form-item>
  487. <el-form-item label="费用抵消">
  488. <dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" dict-type="tool_offset_of_expenses"></dict-data-select>
  489. </el-form-item>
  490. </el-form>
  491. <el-form :inline="true" label-position="top" label-width="100px">
  492. <el-form-item :label="'申请原因'">
  493. <el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
  494. </el-form-item>
  495. </el-form>
  496. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 45px">
  497. <el-form-item :label="'备注'">
  498. <el-input type="textarea" style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
  499. </el-form-item>
  500. </el-form>
  501. <el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
  502. <el-tab-pane label="基本信息" name="attribute">
  503. <order-attribute
  504. :disabled="currentRow.status === '已完成'"
  505. :order-no="currentRow.applyNo"
  506. :approval-username="currentRow.sp"
  507. :proofing-status="currentRow.status"
  508. :super-admin="superAdmin"
  509. :code-no="'toolApply'"
  510. :function-type="'TL_Receipt'">
  511. </order-attribute>
  512. </el-tab-pane>
  513. <el-tab-pane label="工具明细" name="detail">
  514. <div class="rq">
  515. <el-table
  516. height="278"
  517. :data="toolData"
  518. border
  519. @selection-change="selectionChangeHandle"
  520. ref="toolTable"
  521. v-loading="dataListLoading"
  522. style="width: 100%;">
  523. <el-table-column
  524. type="selection"
  525. align="center"
  526. width="55">
  527. </el-table-column>
  528. <el-table-column
  529. v-for="(item,index) in columnList2" :key="index"
  530. :sortable="item.columnSortable"
  531. :prop="item.columnProp"
  532. :header-align="item.headerAlign"
  533. :show-overflow-tooltip="item.showOverflowTooltip"
  534. :align="item.align"
  535. :fixed="item.fixed==''?false:item.fixed"
  536. :min-width="item.columnWidth"
  537. :label="item.columnLabel">
  538. <template slot-scope="scope">
  539. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  540. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  541. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  542. </div>
  543. <div v-else-if=" (item.columnProp === 'standardCost')">
  544. <el-input v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
  545. </div>
  546. <div v-else>
  547. <el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" :disabled="changeApplyDetailFlag('applyQty') === 'N'" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
  548. </div>
  549. </template>
  550. </el-table-column>
  551. </el-table>
  552. </div>
  553. </el-tab-pane>
  554. <el-tab-pane label="TP处理结果" name="tp">
  555. <el-form label-position="top">
  556. <el-row :gutter="15">
  557. <el-col :span="6">
  558. <el-form-item label="IFS PR编号">
  559. <el-input v-model="modelData.prNo" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
  560. </el-form-item>
  561. </el-col>
  562. <el-col :span="24">
  563. <el-form-item label="备注" style="height: 240px">
  564. <el-input type="textarea" v-model="modelData.remark1" :rows="3" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
  565. </el-form-item>
  566. </el-col>
  567. </el-row>
  568. </el-form>
  569. </el-tab-pane>
  570. <el-tab-pane label="采购处理结果" name="caigou">
  571. <el-form label-position="top">
  572. <el-row :gutter="15">
  573. <el-col :span="6">
  574. <el-form-item label="采购订单号">
  575. <el-input v-model="modelData.poNo" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
  576. </el-form-item>
  577. </el-col>
  578. <el-col :span="6">
  579. <el-form-item label="厂商名称">
  580. <el-input v-model="modelData.supplierName" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
  581. </el-form-item>
  582. </el-col>
  583. <el-col :span="6">
  584. <el-form-item label="总成本(元)">
  585. <el-input v-if="accessField('10601001')" v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  586. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  587. </el-form-item>
  588. </el-col>
  589. </el-row>
  590. <el-row :gutter="15">
  591. <el-col :span="24">
  592. <el-form-item label="备注" style="height: 90px">
  593. <el-input type="textarea" v-model="modelData.remark2" :rows="3" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  594. </el-form-item>
  595. </el-col>
  596. </el-row>
  597. <el-row :gutter="15">
  598. <el-col :span="4">
  599. <el-form-item>
  600. <span slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  601. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  602. </el-form-item>
  603. </el-col>
  604. <el-col :span="6">
  605. <el-form-item label="CO">
  606. <el-input v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser && !superAdmin"></el-input>
  607. </el-form-item>
  608. </el-col>
  609. </el-row>
  610. </el-form>
  611. </el-tab-pane>
  612. <el-tab-pane label="附件信息" name="down">
  613. <oss-components ref="oss2" height="25vh" :dataList="fileList" :visibleFlag="dataForm.status === '草稿' || (dataForm.status === '审批中' && operatorFlag)" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  614. </el-tab-pane>
  615. </el-tabs>
  616. <el-footer style="height:35px;margin-top:15px;text-align:center">
  617. <template v-if="dataForm.status === '草稿' || (dataForm.status === '审批中' && ((dataForm.sp && dataForm.sp.split(';').includes(sp)) || superAdmin))">
  618. <el-button type="primary" @click="saveData" class="bigButton">保存</el-button>
  619. </template>
  620. <el-button type="primary" @click="visible = false" class="bigButton">{{ '取消' }}</el-button>
  621. <template v-if="isAuth('106002:submit')">
  622. <template v-if="superAdmin || (dataForm.sp && dataForm.sp.split(';').includes(sp))">
  623. <el-button v-if="dataForm.status === '审批中'" type="primary" :loading="submitLoading" :disabled="submitLoading" @click="agreeSubmit" class="bigButton">同意</el-button>
  624. </template>
  625. </template>
  626. <template v-if="isAuth('106002:rejected')">
  627. <template v-if="superAdmin || (dataForm.sp && dataForm.sp.split(';').includes(sp))">
  628. <el-button v-if="dataForm.status === '审批中' && dataForm.isReject === 'Y'" type="primary" @click="submitDataModal" class="bigButton">驳回</el-button>
  629. </template>
  630. </template>
  631. </el-footer>
  632. </el-dialog>
  633. <el-dialog width="600px" v-drag :title="'处理信息'" :close-on-click-modal="false" :visible.sync="modelFlag">
  634. <el-form label-position="top">
  635. <el-row :gutter="15">
  636. <el-col :span="6">
  637. <el-form-item label="IFS PR编号">
  638. <el-input v-model="modelData.prNo"></el-input>
  639. </el-form-item>
  640. </el-col>
  641. <el-col :span="18">
  642. <el-form-item label="备注">
  643. <el-input v-model="modelData.remark1"></el-input>
  644. </el-form-item>
  645. </el-col>
  646. </el-row>
  647. <el-row :gutter="15" style="margin-top: 20px">
  648. <el-col :span="6">
  649. <el-form-item label="采购订单号">
  650. <el-input v-model="modelData.poNo"></el-input>
  651. </el-form-item>
  652. </el-col>
  653. <el-col :span="6">
  654. <el-form-item label="厂商名称">
  655. <el-input v-model="modelData.supplierName"></el-input>
  656. </el-form-item>
  657. </el-col>
  658. <el-col :span="6">
  659. <el-form-item label="总成本(元)">
  660. <el-input v-if="accessField('10601001')" v-model="modelData.allCost" type="number"></el-input>
  661. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  662. </el-form-item>
  663. </el-col>
  664. </el-row>
  665. <el-row :gutter="15" style="margin-top: 0px">
  666. <el-col :span="24">
  667. <el-form-item label="备注">
  668. <el-input v-model="modelData.remark2"></el-input>
  669. </el-form-item>
  670. </el-col>
  671. </el-row>
  672. </el-form>
  673. <span slot="footer" class="dialog-footer">
  674. <el-button type="primary" @click="saveHeaderMessage()">{{ '保存' }}</el-button>
  675. <el-button type="primary" @click="modelFlag = false">{{ '取消' }}</el-button>
  676. </span>
  677. </el-dialog>
  678. <!-- 提交 -->
  679. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag"
  680. width="500px">
  681. <el-form :inline="true" label-position="top">
  682. <el-form-item :label="'驳回意见'">
  683. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit
  684. style="width: 479px;height: 30px"></el-input>
  685. </el-form-item>
  686. </el-form>
  687. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  688. <el-button type="primary" :loading="submitLoading" :disabled="submitLoading" @click="rejectSubmit">确定</el-button>
  689. <el-button type="primary" :disabled="submitLoading" @click="submitModalFlag = false">取消</el-button>
  690. </el-footer>
  691. </el-dialog>
  692. <el-dialog title="新增工具明细" top="25vh" width="1000px" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag">
  693. <div class="rq">
  694. <el-form :inline="true" label-position="top" :model="toolDetailSearchData">
  695. <el-form-item label="项目号">
  696. <el-input v-model="toolDetailSearchData.projectId" clearable style="width: 120px"></el-input>
  697. </el-form-item>
  698. <el-form-item label="项目名称">
  699. <el-input v-model="toolDetailSearchData.projectName" clearable style="width: 120px"></el-input>
  700. </el-form-item>
  701. <el-form-item label="客户名称">
  702. <el-input v-model="toolDetailSearchData.customerName" clearable style="width: 120px"></el-input>
  703. </el-form-item>
  704. <el-form-item label="PLM物料编码">
  705. <el-input v-model="toolDetailSearchData.testPartNo" clearable style="width: 120px"></el-input>
  706. </el-form-item>
  707. <el-form-item label="IFS物料编码">
  708. <el-input v-model="toolDetailSearchData.finalPartNo" clearable style="width: 120px"></el-input>
  709. </el-form-item>
  710. <el-form-item label="物料名称">
  711. <el-input v-model="toolDetailSearchData.partName" clearable style="width: 120px"></el-input>
  712. </el-form-item>
  713. <el-form-item label="客户料号">
  714. <el-input v-model="toolDetailSearchData.customerPartNo" clearable style="width: 120px"></el-input>
  715. </el-form-item>
  716. <el-form-item label="工具编码">
  717. <el-input v-model="toolDetailSearchData.toolId" clearable style="width: 120px"></el-input>
  718. </el-form-item>
  719. <el-form-item label="工具描述">
  720. <el-input v-model="toolDetailSearchData.toolDescription" clearable style="width: 120px"></el-input>
  721. </el-form-item>
  722. <el-form-item :label="' '">
  723. <el-button type="primary" @click="addChangeDetail()">查询</el-button>
  724. </el-form-item>
  725. </el-form>
  726. <el-table
  727. :height="380"
  728. :data="dataList2"
  729. @selection-change="selectionData"
  730. border
  731. style="width: 100%;">
  732. <el-table-column
  733. type="selection"
  734. header-align="center"
  735. align="center"
  736. width="50"
  737. >
  738. </el-table-column>
  739. <el-table-column
  740. v-for="(item,index) in columnList3" :key="index"
  741. :sortable="item.columnSortable"
  742. :prop="item.columnProp"
  743. :header-align="item.headerAlign"
  744. :show-overflow-tooltip="item.showOverflowTooltip"
  745. :align="item.align"
  746. :fixed="item.fixed==''?false:item.fixed"
  747. :min-width="item.columnWidth"
  748. :label="item.columnLabel">
  749. <template slot-scope="scope">
  750. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  751. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  752. </template>
  753. </el-table-column>
  754. </el-table>
  755. <el-pagination
  756. @size-change="sizeChangeHandle1"
  757. @current-change="currentChangeHandle1"
  758. :current-page="pageIndex1"
  759. :page-sizes="[20, 50, 100, 1000]"
  760. :page-size="pageSize1"
  761. :total="totalPage1"
  762. layout="total, sizes, prev, pager, next, jumper">
  763. </el-pagination>
  764. </div>
  765. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  766. <el-button type="primary" @click="applyDetail">应用</el-button>
  767. <el-button type="primary" @click="addDetail">保存</el-button>
  768. <el-button type="primary" @click="toolDetailFlag = false">关闭</el-button>
  769. </el-footer>
  770. </el-dialog>
  771. <el-dialog width="950px" v-drag :title="'刀模申请详情'" :close-on-click-modal="false" :visible.sync="visibleD">
  772. <el-form :inline="true" label-position="top" label-width="100px">
  773. <el-form-item :label="'申请编号'">
  774. <el-input v-model="dataForm.applyNo" readonly style="width: 130px" disabled></el-input>
  775. </el-form-item>
  776. <el-form-item :label="'申请总数'">
  777. <el-input v-model="dataForm.applySumQty" readonly style="width: 130px" disabled></el-input>
  778. </el-form-item>
  779. <el-form-item :label="'总成本'">
  780. <el-input v-if="accessField('10601001')" v-model="dataForm.totalCost" style="width: 130px" readonly disabled></el-input>
  781. <el-input v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" readonly disabled></el-input>
  782. </el-form-item>
  783. <el-form-item :label="'申请人'">
  784. <el-input v-model="dataForm.applyBy" style="width: 130px" readonly disabled></el-input>
  785. </el-form-item>
  786. <el-form-item :label="'申请日期'">
  787. <el-date-picker
  788. value-format="yyyy-MM-dd"
  789. style="width: 100%"
  790. v-model="dataForm.applyDate"
  791. type="date"
  792. disabled
  793. readonly
  794. placeholder="结束日期">
  795. </el-date-picker>
  796. </el-form-item>
  797. <el-form-item label="部门">
  798. <dict-data-select :site="$store.state.user.site" readonly v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
  799. </el-form-item>
  800. <el-form-item>
  801. <span slot="label" style="">报价员</span>
  802. <el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  803. </el-form-item>
  804. <el-form-item>
  805. <span slot="label" style="">TP</span>
  806. <el-input v-model="dataForm.tpName" ref="tpName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  807. </el-form-item>
  808. <el-form-item>
  809. <span slot="label" style="">采购员</span>
  810. <el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  811. </el-form-item>
  812. <el-form-item>
  813. <span slot="label" style="">CS</span>
  814. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  815. </el-form-item>
  816. <el-form-item label="费用抵消">
  817. <dict-data-select v-model="dataForm.offsetOfExpenses" style="width: 330px" disabled dict-type="tool_offset_of_expenses"></dict-data-select>
  818. </el-form-item>
  819. </el-form>
  820. <el-form :inline="true" label-position="top" label-width="100px">
  821. <el-form-item :label="'申请原因'">
  822. <el-input type="textarea" readonly style="width: 930px" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.applyReason"/>
  823. </el-form-item>
  824. </el-form>
  825. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 45px">
  826. <el-form-item :label="'备注'">
  827. <el-input type="textarea" style="width: 930px" readonly resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="dataForm.remark"/>
  828. </el-form-item>
  829. </el-form>
  830. <el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card">
  831. <el-tab-pane label="基本信息" name="attribute">
  832. <order-attribute
  833. :disabled="currentRow.status === '已完成'"
  834. :readonly="visibleD"
  835. :order-no="currentRow.applyNo"
  836. :approval-username="currentRow.sp"
  837. :proofing-status="currentRow.status"
  838. :super-admin="superAdmin"
  839. :code-no="'toolApply'"
  840. :function-type="'TL_Receipt'">
  841. </order-attribute>
  842. </el-tab-pane>
  843. <el-tab-pane label="工具明细" name="detail">
  844. <div class="rq">
  845. <el-table
  846. height="278"
  847. :data="toolData"
  848. border
  849. @selection-change="selectionChangeHandle"
  850. ref="toolTable"
  851. v-loading="dataListLoading"
  852. style="width: 100%;">
  853. <el-table-column
  854. type="selection"
  855. align="center"
  856. width="55">
  857. </el-table-column>
  858. <el-table-column
  859. v-for="(item,index) in columnList2" :key="index"
  860. :sortable="item.columnSortable"
  861. :prop="item.columnProp"
  862. :header-align="item.headerAlign"
  863. :show-overflow-tooltip="item.showOverflowTooltip"
  864. :align="item.align"
  865. :fixed="item.fixed==''?false:item.fixed"
  866. :min-width="item.columnWidth"
  867. :label="item.columnLabel">
  868. <template slot-scope="scope">
  869. <div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
  870. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  871. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  872. </div>
  873. <div v-else-if=" (item.columnProp === 'standardCost')">
  874. <el-input readonly v-if="accessField('10601001')" v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入成本" style="width:98%"></el-input>
  875. </div>
  876. <div v-else>
  877. <el-input readonly v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" :disabled="changeApplyDetailFlag('applyQty') === 'N'" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" style="width:98%"></el-input>
  878. </div>
  879. </template>
  880. </el-table-column>
  881. <el-table-column
  882. header-align="center"
  883. align="center"
  884. width="120"
  885. fixed="right"
  886. label="操作">
  887. <template slot-scope="scope">
  888. <a type="text" size="small" @click="jumpBM(scope.row)">跳转BenchMark</a>
  889. </template>
  890. </el-table-column>
  891. </el-table>
  892. </div>
  893. </el-tab-pane>
  894. <el-tab-pane label="TP处理结果" name="tp">
  895. <el-form label-position="top">
  896. <el-row :gutter="15">
  897. <el-col :span="6">
  898. <el-form-item label="IFS PR编号">
  899. <el-input readonly v-model="modelData.prNo" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
  900. </el-form-item>
  901. </el-col>
  902. <el-col :span="24">
  903. <el-form-item label="备注" style="height: 240px">
  904. <el-input readonly type="textarea" v-model="modelData.remark1" :rows="3" :disabled="$store.state.user.name !== dataForm.tp&&!superAdmin"></el-input>
  905. </el-form-item>
  906. </el-col>
  907. </el-row>
  908. </el-form>
  909. </el-tab-pane>
  910. <el-tab-pane label="采购处理结果" name="caigou">
  911. <el-form label-position="top">
  912. <el-row :gutter="15">
  913. <el-col :span="6">
  914. <el-form-item label="采购订单号">
  915. <el-input readonly v-model="modelData.poNo" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
  916. </el-form-item>
  917. </el-col>
  918. <el-col :span="6">
  919. <el-form-item label="厂商名称">
  920. <el-input readonly v-model="modelData.supplierName" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
  921. </el-form-item>
  922. </el-col>
  923. <el-col :span="6">
  924. <el-form-item label="总成本(元)">
  925. <el-input readonly v-if="accessField('10601001')" v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  926. <el-input readonly v-if="!accessField('10601001')" v-model="valueNull" style="width: 130px" disabled></el-input>
  927. </el-form-item>
  928. </el-col>
  929. </el-row>
  930. <el-row :gutter="15">
  931. <el-col :span="24">
  932. <el-form-item label="备注" style="height: 90px">
  933. <el-input readonly type="textarea" v-model="modelData.remark2" :rows="3" :disabled="$store.state.user.name!==dataForm.purchaser&&!superAdmin"></el-input>
  934. </el-form-item>
  935. </el-col>
  936. </el-row>
  937. <el-row :gutter="15">
  938. <el-col :span="4">
  939. <el-form-item>
  940. <span slot="label" style="">CS</span>
  941. <el-input v-model="dataForm.csName" ref="csName" placeholder="请选择人员" readonly style="width: 130px"></el-input>
  942. </el-form-item>
  943. </el-col>
  944. <el-col :span="6">
  945. <el-form-item label="CO">
  946. <el-input readonly v-model="modelData.co" :disabled="$store.state.user.name !== dataForm.purchaser&&!superAdmin"></el-input>
  947. </el-form-item>
  948. </el-col>
  949. </el-row>
  950. </el-form>
  951. </el-tab-pane>
  952. <el-tab-pane label="附件信息" name="down">
  953. <oss-components ref="oss3" height="25vh" :readonly="visibleD" :dataList="fileList" label="附件" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.applyNo"></oss-components>
  954. </el-tab-pane>
  955. </el-tabs>
  956. <el-footer style="height:35px;margin-top:15px;text-align:center">
  957. <el-button type="primary" @click="visibleD = false" class="bigButton">{{ '关闭' }}</el-button>
  958. </el-footer>
  959. </el-dialog>
  960. <!-- 上传文件的modal -->
  961. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  962. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  963. <filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
  964. </div>
  965. </template>
  966. <script>
  967. import {
  968. customerInformationSearch, // 客户信息列表查询`
  969. } from '@/api/customer/customerInformation.js'
  970. import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
  971. import Chooselist from '@/views/modules/common/Chooselist'
  972. import {
  973. searchProjectToolApplyHeader,
  974. searchProjectToolApplyDetail,
  975. comfirmProjectToolApply,
  976. cancelProjectToolApply,
  977. saveProjectHeaderMessage,
  978. editToolApplication,
  979. submitChange
  980. } from "@/api/tool/toolApply.js"
  981. import {
  982. deleteProjectFile,
  983. getFileContentList,
  984. downLoadProjectFile,
  985. getProjectPartNowBm,
  986. } from "@/api/project/project.js"
  987. import {
  988. getNodeAuthority, // 获取节点权限
  989. getApprovalList, // 查询审批信息
  990. checkSuperAdmin, // 校验是否为超级管理员
  991. } from '@/api/changeManagement/changeManagement.js'
  992. import {
  993. getNodeList
  994. } from "@/api/sampleManagement/technicalSpecificationList.js"
  995. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  996. import OssComponents from "../oss/ossComponents";
  997. import DictDataSelect from "../sys/dict-data-select.vue"
  998. import orderAttribute from "../demoComponents/orderProperties"
  999. import FilterSearch from "../../common/filterSearch.vue";
  1000. import {technicalSpecificationListSearchByAnyField} from "../../../api/sampleManagement/technicalSpecificationList";
  1001. import {
  1002. queryProjectPartToolForApply,
  1003. searchProjectToolApplyHeaderByAnyField,
  1004. toolDetailBatchDelete, toolDetailBatchSave
  1005. } from "../../../api/tool/toolApply";
  1006. import {isAuth} from "../../../utils";
  1007. /*組件*/
  1008. export default {
  1009. components: {
  1010. FilterSearch,
  1011. ApprovalInformation,
  1012. OssComponents,
  1013. Chooselist,
  1014. projectUploadFile,
  1015. DictDataSelect,
  1016. orderAttribute,
  1017. },
  1018. computed: {
  1019. changeApplyHeaderFlag() {
  1020. return (value) => {
  1021. if (!this.plmChangeApplyHeaderArr) {
  1022. return 'N'
  1023. }
  1024. let arr = this.plmChangeApplyHeaderArr.filter(a => a.fieldId === value)
  1025. if (arr.length > 0) {
  1026. return arr[0].updateFlag
  1027. }
  1028. return 'N'
  1029. }
  1030. },
  1031. changeApplyDetailFlag() {
  1032. return (value) => {
  1033. if (!this.plmChangeApplyDetailArr) {
  1034. return 'N'
  1035. }
  1036. let arr = this.plmChangeApplyDetailArr.filter(a => a.fieldId === value)
  1037. if (arr.length > 0) {
  1038. return arr[0].updateFlag
  1039. }
  1040. return 'N'
  1041. }
  1042. },
  1043. },
  1044. name: "null",
  1045. data() {
  1046. return {
  1047. visible: false,
  1048. filterVisible: false,
  1049. isFilterSearch: false,
  1050. operatorFlag: false,
  1051. filterSearchData: {},
  1052. fileContentList: [],
  1053. activeName: 'detail',
  1054. activeModelName: 'detail',
  1055. searchData: {
  1056. page: 1,
  1057. limit: 100,
  1058. site: this.$store.state.user.site,
  1059. applyNo: '',
  1060. startDate: '',
  1061. endDate: '',
  1062. status: '',
  1063. nodeId: '',
  1064. sp: '',
  1065. menuId: this.$route.meta.menuId,
  1066. toolId: '',
  1067. plmPartNo: '',
  1068. ifsPartNo: ''
  1069. },
  1070. nodeOptions: [],
  1071. toolData: [],
  1072. fileList: [],
  1073. selectionDataList: [],
  1074. dataSelections: [],
  1075. chooseDataList: [],
  1076. visibleU: false,
  1077. visibleD: false,
  1078. isInitialized: false,
  1079. plmChangeApplyHeaderArr: [],
  1080. plmChangeApplyDetailArr: [],
  1081. dataForm: {
  1082. site: '',
  1083. applyNo: '',
  1084. applyBy: '',
  1085. applyDate: '',
  1086. applySumQty: '',
  1087. applyReason: '',
  1088. remark: '',
  1089. createBy: '',
  1090. detailList: [],
  1091. status: '',
  1092. rejectOpinion: '',
  1093. nodeConclusion: '',
  1094. quoter: '',
  1095. quoterName: '',
  1096. tp: '',
  1097. tpName: '',
  1098. purchaser: '',
  1099. purchaserName: '',
  1100. totalCost: '',
  1101. menuId: this.$route.meta.menuId,
  1102. userName: this.$store.state.user.name,
  1103. nodeId: '',
  1104. sp: '',
  1105. isReject: '',
  1106. offsetOfExpenses: '',
  1107. cs: '',
  1108. csName: '',
  1109. },
  1110. valueNull: '******',
  1111. modelData: {
  1112. site: '',
  1113. applyNo: '',
  1114. prNo: '',
  1115. remark1: '',
  1116. poNo: '',
  1117. supplierName: '',
  1118. allCost: '',
  1119. remark2: '',
  1120. co: '',
  1121. },
  1122. toolDetailSearchData:{
  1123. projectId: '',
  1124. projectName: '',
  1125. customerName: '',
  1126. testPartNo: '',
  1127. finalPartNo: '',
  1128. partName: '',
  1129. customerPartNo: '',
  1130. toolId: '',
  1131. toolDescription: '',
  1132. no:1,
  1133. size:20,
  1134. },
  1135. toolDetailData:{
  1136. },
  1137. modelFlag: false,
  1138. toolDetailFlag: false,
  1139. currentRow: {},
  1140. currentRow2: {},
  1141. height: 200,
  1142. dataList2: [],
  1143. dataList1: [],
  1144. detailList: [],
  1145. toolDetailList: [],
  1146. dataListLoading: false,
  1147. // 导出 start
  1148. exportData: [],
  1149. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  1150. exportHeader: ["项目清单"],
  1151. exportFooter: [],
  1152. exportList: [],
  1153. // 导出 start
  1154. exportData2: [],
  1155. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  1156. exportHeader2: ["项目客户联系人"],
  1157. exportFooter2: [],
  1158. exportList2: [],
  1159. tagNo: '',
  1160. tagNo2: '',
  1161. pageIndex: 1,
  1162. pageSize: 100,
  1163. totalPage: 0,
  1164. pageIndex1: 1,
  1165. pageSize1: 100,
  1166. totalPage1: 0,
  1167. ossColumns: [
  1168. {
  1169. userId: this.$store.state.user.name,
  1170. functionId: 103001,
  1171. serialNumber: '103001Table2FileName',
  1172. tableId: '103001Table2',
  1173. tableName: '文件信息表',
  1174. columnProp: 'fileName',
  1175. headerAlign: 'center',
  1176. align: 'center',
  1177. columnLabel: '文件名称',
  1178. columnHidden: false,
  1179. columnImage: false,
  1180. columnSortable: false,
  1181. sortLv: 0,
  1182. status: true,
  1183. fixed: '',
  1184. columnWidth: 140
  1185. },
  1186. {
  1187. userId: this.$store.state.user.name,
  1188. functionId: 103001,
  1189. serialNumber: '103001Table2FileRemark',
  1190. tableId: '103001Table2',
  1191. tableName: '文件信息表',
  1192. columnProp: 'fileRemark',
  1193. headerAlign: 'center',
  1194. align: 'center',
  1195. columnLabel: '备注',
  1196. columnHidden: false,
  1197. columnImage: false,
  1198. columnSortable: false,
  1199. sortLv: 0,
  1200. status: true,
  1201. fixed: '',
  1202. columnWidth: 240
  1203. },
  1204. // {
  1205. // userId: this.$store.state.user.name,
  1206. // functionId: 103001,
  1207. // serialNumber: '103001Table2OrderRef3',
  1208. // tableId: '103001Table2',
  1209. // tableName: '文件信息表',
  1210. // columnProp: 'orderRef3',
  1211. // headerAlign: 'center',
  1212. // align: 'center',
  1213. // columnLabel: '文件描述',
  1214. // columnHidden: false,
  1215. // columnImage: false,
  1216. // columnSortable: false,
  1217. // sortLv: 0,
  1218. // status: true,
  1219. // fixed: '',
  1220. // columnWidth: 120
  1221. // },
  1222. {
  1223. userId: this.$store.state.user.name,
  1224. functionId: 103001,
  1225. serialNumber: '103001Table2CreateDate',
  1226. tableId: '103001Table2',
  1227. tableName: '文件信息表',
  1228. columnProp: 'createDate',
  1229. headerAlign: 'center',
  1230. align: 'center',
  1231. columnLabel: '上传时间',
  1232. columnHidden: false,
  1233. columnImage: false,
  1234. columnSortable: false,
  1235. sortLv: 0,
  1236. status: true,
  1237. fixed: '',
  1238. columnWidth: 140
  1239. },
  1240. {
  1241. userId: this.$store.state.user.name,
  1242. functionId: 103001,
  1243. serialNumber: '103001Table2CreatedBy',
  1244. tableId: '103001Table2',
  1245. tableName: '文件信息表',
  1246. columnProp: 'createBy',
  1247. headerAlign: 'center',
  1248. align: 'center',
  1249. columnLabel: '上传人',
  1250. columnHidden: false,
  1251. columnImage: false,
  1252. columnSortable: false,
  1253. sortLv: 0,
  1254. status: true,
  1255. fixed: '',
  1256. columnWidth: 140
  1257. }
  1258. ],
  1259. // 导出 end
  1260. columnList1: [
  1261. {
  1262. userId: this.$store.state.user.name,
  1263. functionId: 106002,
  1264. serialNumber: '106002Table1Site',
  1265. tableId: "106002Table1",
  1266. tableName: "刀具申请主表",
  1267. columnProp: "site",
  1268. headerAlign: "center",
  1269. align: "left",
  1270. columnLabel: "工厂编码",
  1271. columnHidden: false,
  1272. columnImage: false,
  1273. columnSortable: false,
  1274. sortLv: 0,
  1275. status: true,
  1276. fixed: '',
  1277. columnWidth: 70
  1278. },
  1279. {
  1280. userId: this.$store.state.user.name,
  1281. functionId: 106002,
  1282. serialNumber: '106002Table1DepartmentDesc',
  1283. tableId: "106002Table1",
  1284. tableName: "刀具申请主表",
  1285. columnProp: "departmentDesc",
  1286. headerAlign: "center",
  1287. align: "left",
  1288. columnLabel: "部门",
  1289. columnHidden: false,
  1290. columnImage: false,
  1291. columnSortable: false,
  1292. sortLv: 0,
  1293. status: true,
  1294. fixed: '',
  1295. columnWidth: 70
  1296. },
  1297. {
  1298. userId: this.$store.state.user.name,
  1299. functionId: 106002,
  1300. serialNumber: '106002Table1ApplyNo',
  1301. tableId: "106002Table1",
  1302. tableName: "刀具申请主表",
  1303. columnProp: "applyNo",
  1304. headerAlign: "center",
  1305. align: "left",
  1306. columnLabel: "申请单号",
  1307. columnHidden: false,
  1308. columnImage: false,
  1309. columnSortable: false,
  1310. sortLv: 0,
  1311. status: true,
  1312. fixed: '',
  1313. columnWidth: 80
  1314. },
  1315. {
  1316. userId: this.$store.state.user.name,
  1317. functionId: 106002,
  1318. serialNumber: '106002Table1ApplyBy',
  1319. tableId: "106002Table1",
  1320. tableName: "刀具申请主表",
  1321. columnProp: "applyBy",
  1322. headerAlign: "center",
  1323. align: "left",
  1324. columnLabel: "申请人",
  1325. columnHidden: false,
  1326. columnImage: false,
  1327. columnSortable: false,
  1328. sortLv: 0,
  1329. status: true,
  1330. fixed: '',
  1331. columnWidth: 60
  1332. },
  1333. {
  1334. userId: this.$store.state.user.name,
  1335. functionId: 106002,
  1336. serialNumber: '106002Table1ApplyDate',
  1337. tableId: "106002Table1",
  1338. tableName: "刀具申请主表",
  1339. columnProp: "applyDate",
  1340. headerAlign: "center",
  1341. align: "left",
  1342. columnLabel: "申请日期",
  1343. columnHidden: false,
  1344. columnImage: false,
  1345. columnSortable: false,
  1346. sortLv: 0,
  1347. status: true,
  1348. fixed: '',
  1349. columnWidth: 80
  1350. },
  1351. {
  1352. userId: this.$store.state.user.name,
  1353. functionId: 106002,
  1354. serialNumber: '106002Table1SP',
  1355. tableId: "106002Table1",
  1356. tableName: "刀具申请主表",
  1357. columnProp: "sp",
  1358. headerAlign: "center",
  1359. align: "left",
  1360. columnLabel: "当前审批人",
  1361. columnHidden: false,
  1362. columnImage: false,
  1363. columnSortable: false,
  1364. sortLv: 0,
  1365. status: true,
  1366. fixed: '',
  1367. columnWidth: 90
  1368. },
  1369. {
  1370. userId: this.$store.state.user.name,
  1371. functionId: 106002,
  1372. serialNumber: '106002Table1NodeName',
  1373. tableId: "106002Table1",
  1374. tableName: "刀具申请主表",
  1375. columnProp: "nodeName",
  1376. headerAlign: "center",
  1377. align: "left",
  1378. columnLabel: "当前节点",
  1379. columnHidden: false,
  1380. columnImage: false,
  1381. columnSortable: false,
  1382. sortLv: 0,
  1383. status: true,
  1384. fixed: '',
  1385. columnWidth: 120
  1386. },
  1387. {
  1388. userId: this.$store.state.user.name,
  1389. functionId: 106002,
  1390. serialNumber: '106002Table1FirstToolId',
  1391. tableId: "106002Table1",
  1392. tableName: "刀具申请主表",
  1393. columnProp: "firstToolId",
  1394. headerAlign: "center",
  1395. align: "left",
  1396. columnLabel: "工具编码",
  1397. columnHidden: false,
  1398. columnImage: false,
  1399. columnSortable: false,
  1400. sortLv: 0,
  1401. status: true,
  1402. fixed: '',
  1403. columnWidth: 100
  1404. },
  1405. {
  1406. userId: this.$store.state.user.name,
  1407. functionId: 106002,
  1408. serialNumber: '106002Table1FirstToolDesc',
  1409. tableId: "106002Table1",
  1410. tableName: "刀具申请主表",
  1411. columnProp: "firstToolDesc",
  1412. headerAlign: "center",
  1413. align: "left",
  1414. columnLabel: "工具描述",
  1415. columnHidden: false,
  1416. columnImage: false,
  1417. columnSortable: false,
  1418. sortLv: 0,
  1419. status: true,
  1420. fixed: '',
  1421. columnWidth: 150
  1422. },
  1423. {
  1424. userId: this.$store.state.user.name,
  1425. functionId: 106002,
  1426. serialNumber: '106002Table1ApplySumQty',
  1427. tableId: "106002Table1",
  1428. tableName: "刀具申请主表",
  1429. columnProp: "applySumQty",
  1430. headerAlign: "center",
  1431. align: "right",
  1432. columnLabel: "申请数量",
  1433. columnHidden: false,
  1434. columnImage: false,
  1435. columnSortable: false,
  1436. sortLv: 0,
  1437. status: true,
  1438. fixed: '',
  1439. columnWidth: 60
  1440. },
  1441. {
  1442. userId: this.$store.state.user.name,
  1443. functionId: 106002,
  1444. serialNumber: '106002Table1TotalCost',
  1445. tableId: "106002Table1",
  1446. tableName: "刀具申请主表",
  1447. columnProp: "totalCost",
  1448. headerAlign: "center",
  1449. align: "right",
  1450. columnLabel: "总成本",
  1451. columnHidden: false,
  1452. columnImage: false,
  1453. columnSortable: false,
  1454. sortLv: 0,
  1455. status: true,
  1456. fixed: '',
  1457. columnWidth: 60
  1458. },
  1459. {
  1460. userId: this.$store.state.user.name,
  1461. functionId: 106002,
  1462. serialNumber: '106002Table1QuoterName',
  1463. tableId: "106002Table1",
  1464. tableName: "刀具申请主表",
  1465. columnProp: "quoterName",
  1466. headerAlign: "center",
  1467. align: "left",
  1468. columnLabel: "报价员",
  1469. columnHidden: false,
  1470. columnImage: false,
  1471. columnSortable: false,
  1472. sortLv: 0,
  1473. status: true,
  1474. fixed: '',
  1475. columnWidth: 60
  1476. },
  1477. {
  1478. userId: this.$store.state.user.name,
  1479. functionId: 106002,
  1480. serialNumber: '106002Table1TpName',
  1481. tableId: "106002Table1",
  1482. tableName: "刀具申请主表",
  1483. columnProp: "tpName",
  1484. headerAlign: "center",
  1485. align: "left",
  1486. columnLabel: "TP",
  1487. columnHidden: false,
  1488. columnImage: false,
  1489. columnSortable: false,
  1490. sortLv: 0,
  1491. status: true,
  1492. fixed: '',
  1493. columnWidth: 60
  1494. },
  1495. {
  1496. userId: this.$store.state.user.name,
  1497. functionId: 106002,
  1498. serialNumber: '106002Table1PurchaserName',
  1499. tableId: "106002Table1",
  1500. tableName: "刀具申请主表",
  1501. columnProp: "purchaserName",
  1502. headerAlign: "center",
  1503. align: "left",
  1504. columnLabel: "采购员",
  1505. columnHidden: false,
  1506. columnImage: false,
  1507. columnSortable: false,
  1508. sortLv: 0,
  1509. status: true,
  1510. fixed: '',
  1511. columnWidth: 60
  1512. },
  1513. {
  1514. userId: this.$store.state.user.name,
  1515. functionId: 106002,
  1516. serialNumber: '106002Table1CsName',
  1517. tableId: "106002Table1",
  1518. tableName: "刀具申请主表",
  1519. columnProp: "csName",
  1520. headerAlign: "center",
  1521. align: "left",
  1522. columnLabel: "CS",
  1523. columnHidden: false,
  1524. columnImage: false,
  1525. columnSortable: false,
  1526. sortLv: 0,
  1527. status: true,
  1528. fixed: '',
  1529. columnWidth: 60
  1530. },
  1531. {
  1532. userId: this.$store.state.user.name,
  1533. functionId: 106002,
  1534. serialNumber: '106002Table1ApplyReason',
  1535. tableId: "106002Table1",
  1536. tableName: "刀具申请主表",
  1537. columnProp: "applyReason",
  1538. headerAlign: "center",
  1539. align: "left",
  1540. columnLabel: "申请原因",
  1541. columnHidden: false,
  1542. columnImage: false,
  1543. columnSortable: false,
  1544. sortLv: 0,
  1545. status: true,
  1546. fixed: '',
  1547. columnWidth: 150
  1548. },
  1549. {
  1550. userId: this.$store.state.user.name,
  1551. functionId: 106002,
  1552. serialNumber: '106002Table1Remark',
  1553. tableId: "106002Table1",
  1554. tableName: "刀具申请主表",
  1555. columnProp: "remark",
  1556. headerAlign: "center",
  1557. align: "left",
  1558. columnLabel: "申请备注",
  1559. columnHidden: false,
  1560. columnImage: false,
  1561. columnSortable: false,
  1562. sortLv: 0,
  1563. status: true,
  1564. fixed: '',
  1565. columnWidth: 200
  1566. },
  1567. {
  1568. userId: this.$store.state.user.name,
  1569. functionId: 106002,
  1570. serialNumber: '106002Table1Status',
  1571. tableId: "106002Table1",
  1572. tableName: "刀具申请主表",
  1573. columnProp: "status",
  1574. headerAlign: "center",
  1575. align: "left",
  1576. columnLabel: "状态",
  1577. columnHidden: false,
  1578. columnImage: false,
  1579. columnSortable: false,
  1580. sortLv: 0,
  1581. status: true,
  1582. fixed: '',
  1583. columnWidth: 60
  1584. },
  1585. {
  1586. userId: this.$store.state.user.name,
  1587. functionId: 106002,
  1588. serialNumber: '106002Table1NodeId',
  1589. tableId: "106002Table1",
  1590. tableName: "刀具申请主表",
  1591. columnProp: "nodeId",
  1592. headerAlign: "center",
  1593. align: "left",
  1594. columnLabel: "当前节点",
  1595. columnHidden: false,
  1596. columnImage: false,
  1597. columnSortable: false,
  1598. sortLv: 0,
  1599. status: true,
  1600. fixed: '',
  1601. columnWidth: 60
  1602. },
  1603. ],
  1604. columnList2: [
  1605. {
  1606. userId: this.$store.state.user.name,
  1607. functionId: 106002,
  1608. serialNumber: '106002Table2SeqNo',
  1609. tableId: '106002Table2',
  1610. tableName: '工具申请明细',
  1611. columnProp: 'seqNo',
  1612. headerAlign: 'center',
  1613. align: 'center',
  1614. columnLabel: '序号',
  1615. columnHidden: false,
  1616. columnImage: false,
  1617. columnSortable: false,
  1618. sortLv: 0,
  1619. status: true,
  1620. fixed: '',
  1621. columnWidth: 40
  1622. },
  1623. {
  1624. userId: this.$store.state.user.name,
  1625. functionId: 106002,
  1626. serialNumber: '106002Table2SeqNo',
  1627. tableId: '106002Table2',
  1628. tableName: '工具申请明细',
  1629. columnProp: 'customerName',
  1630. headerAlign: 'center',
  1631. align: 'center',
  1632. columnLabel: '客户名称',
  1633. columnHidden: false,
  1634. columnImage: false,
  1635. columnSortable: false,
  1636. sortLv: 0,
  1637. status: true,
  1638. fixed: '',
  1639. columnWidth: 170
  1640. },
  1641. {
  1642. userId: this.$store.state.user.name,
  1643. functionId: 106002,
  1644. serialNumber: '106002Table2QuotationNo',
  1645. tableId: '106002Table2',
  1646. tableName: '工具申请明细',
  1647. columnProp: 'orderRef1',
  1648. headerAlign: 'center',
  1649. align: 'center',
  1650. columnLabel: '项目号',
  1651. columnHidden: false,
  1652. columnImage: false,
  1653. columnSortable: false,
  1654. sortLv: 0,
  1655. status: true,
  1656. fixed: '',
  1657. columnWidth: 100
  1658. },
  1659. {
  1660. userId: this.$store.state.user.name,
  1661. functionId: 106002,
  1662. serialNumber: '106002Table2QuotationNo',
  1663. tableId: '106002Table2',
  1664. tableName: '工具申请明细',
  1665. columnProp: 'projectName',
  1666. headerAlign: 'center',
  1667. align: 'center',
  1668. columnLabel: '项目名称',
  1669. columnHidden: false,
  1670. columnImage: false,
  1671. columnSortable: false,
  1672. sortLv: 0,
  1673. status: true,
  1674. fixed: '',
  1675. columnWidth: 220
  1676. },
  1677. {
  1678. userId: this.$store.state.user.name,
  1679. functionId: 106002,
  1680. serialNumber: '106002Table2ToolNo',
  1681. tableId: '106002Table2',
  1682. tableName: '工具申请明细',
  1683. columnProp: 'toolId',
  1684. headerAlign: 'center',
  1685. align: 'center',
  1686. columnLabel: '工具编码',
  1687. columnHidden: false,
  1688. columnImage: false,
  1689. columnSortable: false,
  1690. sortLv: 0,
  1691. status: true,
  1692. fixed: '',
  1693. columnWidth: 70
  1694. },
  1695. {
  1696. userId: this.$store.state.user.name,
  1697. functionId: 106002,
  1698. serialNumber: '106002Table2ToolDescription',
  1699. tableId: '106002Table2',
  1700. tableName: '工具申请明细',
  1701. columnProp: 'toolDesc',
  1702. headerAlign: 'center',
  1703. align: 'center',
  1704. columnLabel: '工具描述',
  1705. columnHidden: false,
  1706. columnImage: false,
  1707. columnSortable: false,
  1708. sortLv: 0,
  1709. status: true,
  1710. fixed: '',
  1711. columnWidth: 120
  1712. },
  1713. {
  1714. userId: this.$store.state.user.name,
  1715. functionId: 106002,
  1716. serialNumber: '106002Table2ApplyQty',
  1717. tableId: '106002Table2',
  1718. tableName: '工具申请明细',
  1719. columnProp: 'applyQty',
  1720. headerAlign: 'center',
  1721. align: 'center',
  1722. columnLabel: '申请数量',
  1723. columnHidden: false,
  1724. columnImage: false,
  1725. columnSortable: false,
  1726. sortLv: 0,
  1727. status: true,
  1728. fixed: '',
  1729. columnWidth: 80
  1730. },
  1731. {
  1732. userId: this.$store.state.user.name,
  1733. functionId: 106002,
  1734. serialNumber: '106002Table2UnitCost',
  1735. tableId: '106002Table2',
  1736. tableName: '工具申请明细',
  1737. columnProp: 'standardCost',
  1738. headerAlign: 'center',
  1739. align: 'center',
  1740. columnLabel: '工具成本',
  1741. columnHidden: false,
  1742. columnImage: false,
  1743. columnSortable: false,
  1744. sortLv: 0,
  1745. status: true,
  1746. fixed: '',
  1747. columnWidth: 80
  1748. },
  1749. {
  1750. userId: this.$store.state.user.name,
  1751. functionId: 106002,
  1752. serialNumber: '106002Table2QuotationNo',
  1753. tableId: '106002Table2',
  1754. tableName: '工具申请明细',
  1755. columnProp: 'plmPartNo',
  1756. headerAlign: 'center',
  1757. align: 'center',
  1758. columnLabel: 'PLM物料编码',
  1759. columnHidden: false,
  1760. columnImage: false,
  1761. columnSortable: false,
  1762. sortLv: 0,
  1763. status: true,
  1764. fixed: '',
  1765. columnWidth: 100
  1766. },
  1767. {
  1768. userId: this.$store.state.user.name,
  1769. functionId: 106002,
  1770. serialNumber: '106002Table2IfsPartNo',
  1771. tableId: '106002Table2',
  1772. tableName: '工具申请明细',
  1773. columnProp: 'ifsPartNo',
  1774. headerAlign: 'center',
  1775. align: 'center',
  1776. columnLabel: 'IFS物料编码',
  1777. columnHidden: false,
  1778. columnImage: false,
  1779. columnSortable: false,
  1780. sortLv: 0,
  1781. status: true,
  1782. fixed: '',
  1783. columnWidth: 100
  1784. },
  1785. {
  1786. userId: this.$store.state.user.name,
  1787. functionId: 106002,
  1788. serialNumber: '106002Table2PartDesc',
  1789. tableId: '106002Table2',
  1790. tableName: '工具申请明细',
  1791. columnProp: 'partDesc',
  1792. headerAlign: 'center',
  1793. align: 'center',
  1794. columnLabel: '物料名称',
  1795. columnHidden: false,
  1796. columnImage: false,
  1797. columnSortable: false,
  1798. sortLv: 0,
  1799. status: true,
  1800. fixed: '',
  1801. columnWidth: 160
  1802. },
  1803. {
  1804. userId: this.$store.state.user.name,
  1805. functionId: 106002,
  1806. serialNumber: '106002Table2CustomerPartNo',
  1807. tableId: '106002Table2',
  1808. tableName: '工具申请明细',
  1809. columnProp: 'customerPartNo',
  1810. headerAlign: 'center',
  1811. align: 'center',
  1812. columnLabel: '客户料号',
  1813. columnHidden: false,
  1814. columnImage: false,
  1815. columnSortable: false,
  1816. sortLv: 0,
  1817. status: true,
  1818. fixed: '',
  1819. columnWidth: 70
  1820. },
  1821. {
  1822. userId: this.$store.state.user.name,
  1823. functionId: 106002,
  1824. serialNumber: '106002Table2QuotationNo',
  1825. tableId: '106002Table2',
  1826. tableName: '工具申请明细',
  1827. columnProp: 'orderRef3',
  1828. headerAlign: 'center',
  1829. align: 'center',
  1830. columnLabel: '工艺路线版本',
  1831. columnHidden: false,
  1832. columnImage: false,
  1833. columnSortable: false,
  1834. sortLv: 0,
  1835. status: true,
  1836. fixed: '',
  1837. columnWidth: 70
  1838. },
  1839. {
  1840. userId: this.$store.state.user.name,
  1841. functionId: 106002,
  1842. serialNumber: '106002Table2QuotationNo',
  1843. tableId: '106002Table2',
  1844. tableName: '工具申请明细',
  1845. columnProp: 'orderRef5',
  1846. headerAlign: 'center',
  1847. align: 'center',
  1848. columnLabel: '替代编码',
  1849. columnHidden: false,
  1850. columnImage: false,
  1851. columnSortable: false,
  1852. sortLv: 0,
  1853. status: true,
  1854. fixed: '',
  1855. columnWidth: 70
  1856. }, {
  1857. userId: this.$store.state.user.name,
  1858. functionId: 106002,
  1859. serialNumber: '106002Table2QuotationNo',
  1860. tableId: '106002Table2',
  1861. tableName: '工具申请明细',
  1862. columnProp: 'operationNo',
  1863. headerAlign: 'center',
  1864. align: 'center',
  1865. columnLabel: '工序号',
  1866. columnHidden: false,
  1867. columnImage: false,
  1868. columnSortable: false,
  1869. sortLv: 0,
  1870. status: true,
  1871. fixed: '',
  1872. columnWidth: 70
  1873. }, {
  1874. userId: this.$store.state.user.name,
  1875. functionId: 106002,
  1876. serialNumber: '106002Table2QuotationNo',
  1877. tableId: '106002Table2',
  1878. tableName: '工具申请明细',
  1879. columnProp: 'operationName',
  1880. headerAlign: 'center',
  1881. align: 'center',
  1882. columnLabel: '工序',
  1883. columnHidden: false,
  1884. columnImage: false,
  1885. columnSortable: false,
  1886. sortLv: 0,
  1887. status: true,
  1888. fixed: '',
  1889. columnWidth: 70
  1890. },
  1891. ],
  1892. columnFileContentArray: [
  1893. {
  1894. columnProp: 'fileName',
  1895. headeralign: 'left',
  1896. align: 'left',
  1897. columnLabel: '文件名称',
  1898. columnHidden: false,
  1899. columnImage: false,
  1900. columnSortable: false,
  1901. sortLv: 0,
  1902. status: true,
  1903. fixed: false
  1904. // }, {
  1905. // columnProp: 'createdBy',
  1906. // headeralign: 'left',
  1907. // align: 'left',
  1908. // columnLabel: '上传人',
  1909. // columnHidden: false,
  1910. // columnImage: false,
  1911. // columnSortable: true,
  1912. // sortLv: 0,
  1913. // status: true,
  1914. // fixed: false
  1915. }, {
  1916. columnProp: 'createDate',
  1917. headeralign: 'left',
  1918. align: 'left',
  1919. columnLabel: '上传时间',
  1920. columnHidden: false,
  1921. columnImage: false,
  1922. columnSortable: true,
  1923. sortLv: 0,
  1924. status: true,
  1925. fixed: false
  1926. }, {
  1927. columnProp: 'orderRef3',
  1928. headeralign: 'left',
  1929. align: 'left',
  1930. columnLabel: '类型',
  1931. columnHidden: false,
  1932. columnImage: false,
  1933. columnSortable: true,
  1934. sortLv: 0,
  1935. status: true,
  1936. fixed: false
  1937. },
  1938. ],
  1939. columnList3: [
  1940. {
  1941. userId: this.$store.state.user.name,
  1942. functionId: 106002,
  1943. columnProp: 'projectId',
  1944. headerAlign: 'center',
  1945. align: 'center',
  1946. columnLabel: '项目号',
  1947. columnHidden: false,
  1948. columnImage: false,
  1949. columnSortable: false,
  1950. sortLv: 0,
  1951. status: true,
  1952. fixed: '',
  1953. columnWidth: 120
  1954. },
  1955. {
  1956. userId: this.$store.state.user.name,
  1957. functionId: 106002,
  1958. columnProp: 'projectName',
  1959. headerAlign: 'center',
  1960. align: 'center',
  1961. columnLabel: '项目名称',
  1962. columnHidden: false,
  1963. columnImage: false,
  1964. columnSortable: false,
  1965. sortLv: 0,
  1966. status: true,
  1967. fixed: '',
  1968. columnWidth: 200
  1969. },
  1970. {
  1971. userId: this.$store.state.user.name,
  1972. functionId: 106002,
  1973. columnProp: 'customerName',
  1974. headerAlign: 'center',
  1975. align: 'center',
  1976. columnLabel: '客户名称',
  1977. columnHidden: false,
  1978. columnImage: false,
  1979. columnSortable: false,
  1980. sortLv: 0,
  1981. status: true,
  1982. fixed: '',
  1983. columnWidth: 120
  1984. },
  1985. {
  1986. userId: this.$store.state.user.name,
  1987. functionId: 106002,
  1988. columnProp: 'testPartNo',
  1989. headerAlign: 'center',
  1990. align: 'center',
  1991. columnLabel: 'PLM物料编码',
  1992. columnHidden: false,
  1993. columnImage: false,
  1994. columnSortable: false,
  1995. sortLv: 0,
  1996. status: true,
  1997. fixed: '',
  1998. columnWidth: 120
  1999. },
  2000. {
  2001. userId: this.$store.state.user.name,
  2002. functionId: 106002,
  2003. columnProp: 'finalPartNo',
  2004. headerAlign: 'center',
  2005. align: 'center',
  2006. columnLabel: 'IFS物料编码',
  2007. columnHidden: false,
  2008. columnImage: false,
  2009. columnSortable: false,
  2010. sortLv: 0,
  2011. status: true,
  2012. fixed: '',
  2013. columnWidth: 120
  2014. },
  2015. {
  2016. userId: this.$store.state.user.name,
  2017. functionId: 106002,
  2018. columnProp: 'partName',
  2019. headerAlign: 'center',
  2020. align: 'center',
  2021. columnLabel: '物料名称',
  2022. columnHidden: false,
  2023. columnImage: false,
  2024. columnSortable: false,
  2025. sortLv: 0,
  2026. status: true,
  2027. fixed: '',
  2028. columnWidth: 100
  2029. },
  2030. {
  2031. userId: this.$store.state.user.name,
  2032. functionId: 106002,
  2033. columnProp: 'customerPartNo',
  2034. headerAlign: 'center',
  2035. align: 'center',
  2036. columnLabel: '客户料号',
  2037. columnHidden: false,
  2038. columnImage: false,
  2039. columnSortable: false,
  2040. sortLv: 0,
  2041. status: true,
  2042. fixed: '',
  2043. columnWidth: 120
  2044. },
  2045. {
  2046. userId: this.$store.state.user.name,
  2047. functionId: 106002,
  2048. columnProp: 'toolId',
  2049. headerAlign: 'center',
  2050. align: 'center',
  2051. columnLabel: '工具编码',
  2052. columnHidden: false,
  2053. columnImage: false,
  2054. columnSortable: false,
  2055. sortLv: 0,
  2056. status: true,
  2057. fixed: '',
  2058. columnWidth: 80
  2059. },
  2060. {
  2061. userId: this.$store.state.user.name,
  2062. functionId: 106002,
  2063. columnProp: 'toolDescription',
  2064. headerAlign: 'center',
  2065. align: 'center',
  2066. columnLabel: '工具描述',
  2067. columnHidden: false,
  2068. columnImage: false,
  2069. columnSortable: false,
  2070. sortLv: 0,
  2071. status: true,
  2072. fixed: '',
  2073. columnWidth: 160
  2074. }
  2075. ],
  2076. approvalList: [],
  2077. rejectOpinion: '',
  2078. submitLoading: false,
  2079. issueLoadingSet: {},
  2080. submitModalFlag: false,
  2081. processField: '',
  2082. sp: this.$store.state.user.name,
  2083. superAdmin: false,
  2084. }
  2085. },
  2086. watch: {
  2087. // columnList1: {
  2088. // deep: true,
  2089. // handler: function (newV, oldV) {
  2090. // debugger
  2091. //
  2092. // }
  2093. // }
  2094. visibleU (newV, oldV) {
  2095. if (newV === true){
  2096. const tryCall = () => {
  2097. if (this.$refs.oss1) {
  2098. this.$refs.oss1.handleQuery()
  2099. this.$refs.dialogAttribute.getProperties()
  2100. } else {
  2101. // 如果未定义,再次尝试延迟执行
  2102. setTimeout(tryCall, 50)
  2103. }
  2104. }
  2105. if (this.isInitialized) {
  2106. tryCall()
  2107. } else {
  2108. // 组件尚未初始化完成,监听 mounted 事件后再调用
  2109. this.$once('hook:mounted', tryCall)
  2110. }
  2111. }
  2112. },
  2113. visible(newV, oldV){
  2114. if (newV === true){
  2115. const tryCall = () => {
  2116. if (this.$refs.oss2) {
  2117. this.$refs.oss2.handleQuery()
  2118. this.$refs.dialogAttribute.getProperties()
  2119. } else {
  2120. // 如果未定义,再次尝试延迟执行
  2121. setTimeout(tryCall, 50)
  2122. }
  2123. }
  2124. if (this.isInitialized) {
  2125. tryCall()
  2126. } else {
  2127. // 组件尚未初始化完成,监听 mounted 事件后再调用
  2128. this.$once('hook:mounted', tryCall)
  2129. }
  2130. }
  2131. },
  2132. visibleD(newV, oldV){
  2133. if (newV === true){
  2134. const tryCall = () => {
  2135. if (this.$refs.oss3) {
  2136. this.$refs.oss3.handleQuery()
  2137. this.$refs.dialogAttribute.getProperties()
  2138. } else {
  2139. // 如果未定义,再次尝试延迟执行
  2140. setTimeout(tryCall, 50)
  2141. }
  2142. }
  2143. if (this.isInitialized) {
  2144. tryCall()
  2145. } else {
  2146. // 组件尚未初始化完成,监听 mounted 事件后再调用
  2147. this.$once('hook:mounted', tryCall)
  2148. }
  2149. }
  2150. },
  2151. toolDetailFlag(newV, oldV){
  2152. if(newV === false){
  2153. this.toolDetailSearchData={
  2154. projectId: '',
  2155. projectName: '',
  2156. customerName: '',
  2157. testPartNo: '',
  2158. finalPartNo: '',
  2159. partName: '',
  2160. customerPartNo: '',
  2161. toolId: '',
  2162. toolDescription: '',
  2163. no:1,
  2164. size:20,
  2165. }
  2166. }
  2167. }
  2168. },
  2169. mounted() {
  2170. this.$nextTick(() => {
  2171. //this.height = window.innerHeight - 520;
  2172. this.isInitialized = true
  2173. this.height = window.innerHeight / 2 - 30
  2174. this.fieldColumn()
  2175. })
  2176. this.fetchNodeOptions()
  2177. },
  2178. methods: {
  2179. isAuth,
  2180. fetchNodeOptions() {
  2181. getNodeList(this.searchData).then(({ data }) => {
  2182. if (data && data.code === 0) {
  2183. this.nodeOptions = data.rows.map(item => ({
  2184. id: item.nodeId,
  2185. name: item.nodeName
  2186. }));
  2187. } else {
  2188. this.$message.error('获取节点列表失败');
  2189. }
  2190. }).catch(error => {
  2191. this.$message.error('请求失败:' + error);
  2192. });
  2193. },
  2194. // 校验是否为超级管理员
  2195. checkSuperAdmin () {
  2196. checkSuperAdmin().then(({data}) => {
  2197. this.superAdmin = data.superAdmin
  2198. })
  2199. },
  2200. accessProcessField(key) {
  2201. return this.processField.indexOf(key) !== -1 || false
  2202. },
  2203. // 查询审批信息
  2204. getApprovalList() {
  2205. if (Object.keys(this.currentRow).length !== 0) {
  2206. let tempData = {
  2207. site: this.$store.state.user.site,
  2208. menuId: this.$route.meta.menuId,
  2209. documentNo: this.currentRow.applyNo
  2210. }
  2211. getApprovalList(tempData).then(({data}) => {
  2212. if (data && data.code === 0) {
  2213. this.approvalList = data.rows
  2214. } else {
  2215. this.approvalList = []
  2216. }
  2217. })
  2218. }
  2219. },
  2220. // 获取基础数据列表S
  2221. getBaseList(val, type) {
  2222. this.tagNo = val
  2223. this.tagNo2 = type
  2224. this.$nextTick(() => {
  2225. let strVal = ''
  2226. if (val === 2002) {
  2227. if (this.changeApplyHeaderFlag('quoter') === 'N' && this.currentRow.status === '审批中') {
  2228. this.$alert('没有权限在审批过程中修改!', '错误', {
  2229. confirmButtonText: '确定'
  2230. })
  2231. return false
  2232. }
  2233. strVal = this.dataForm.quoter
  2234. } else if (val === 2042) {
  2235. if (this.changeApplyHeaderFlag('tp') === 'N' && this.currentRow.status === '审批中') {
  2236. this.$alert('没有权限在审批过程中修改!', '错误', {
  2237. confirmButtonText: '确定'
  2238. })
  2239. return false
  2240. }
  2241. strVal = this.dataForm.tp
  2242. } else if (val === 2000) {
  2243. if (this.changeApplyHeaderFlag('purchaser') === 'N' && this.currentRow.status === '审批中') {
  2244. this.$alert('没有权限在审批过程中修改!', '错误', {
  2245. confirmButtonText: '确定'
  2246. })
  2247. return false
  2248. }
  2249. strVal = this.dataForm.purchaser
  2250. }
  2251. this.$refs.baseList.init(val, strVal)
  2252. })
  2253. },
  2254. /* 列表方法的回调 */
  2255. getBaseData(val) {
  2256. if (this.tagNo === 2002) {
  2257. this.dataForm.quoter = val.username
  2258. this.dataForm.quoterName = val.user_display
  2259. this.$nextTick(() => {
  2260. this.$triggerInputEvent(this.$refs.quoterName);
  2261. });
  2262. } else if (this.tagNo === 2042) {
  2263. this.dataForm.tp = val.username
  2264. this.dataForm.tpName = val.user_display
  2265. this.$nextTick(() => {
  2266. this.$triggerInputEvent(this.$refs.tpName);
  2267. });
  2268. } else if (this.tagNo === 2000) {
  2269. this.dataForm.purchaser = val.username
  2270. this.dataForm.purchaserName = val.user_display
  2271. this.$nextTick(() => {
  2272. this.$triggerInputEvent(this.$refs.purchaserName);
  2273. });
  2274. } else if (this.tagNo === 2051) {
  2275. this.dataForm.cs = val.username
  2276. this.dataForm.csName = val.user_display
  2277. this.$nextTick(() => {
  2278. this.$triggerInputEvent(this.$refs.csName);
  2279. });
  2280. }
  2281. },
  2282. //导出excel
  2283. async createExportData() {
  2284. this.searchData.limit = -1
  2285. this.searchData.page = 1
  2286. await searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  2287. this.exportList = data.page.list;
  2288. })
  2289. return this.exportList;
  2290. },
  2291. startDownload() {
  2292. // this.exportData = this.dataList
  2293. },
  2294. finishDownload() {
  2295. },
  2296. fields() {
  2297. let json = "{"
  2298. this.columnList1.forEach((item, index) => {
  2299. if (index == this.columnList1.length - 1) {
  2300. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2301. } else {
  2302. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2303. }
  2304. })
  2305. json += "}"
  2306. let s = eval("(" + json + ")")
  2307. return s
  2308. },
  2309. //导出excel
  2310. async createExportData2() {
  2311. return this.contactList;
  2312. },
  2313. startDownload2() {
  2314. // this.exportData = this.dataList
  2315. },
  2316. finishDownload2() {
  2317. },
  2318. fields2() {
  2319. let json = "{"
  2320. this.columnList2.forEach((item, index) => {
  2321. if (index == this.columnList2.length - 1) {
  2322. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2323. } else {
  2324. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2325. }
  2326. })
  2327. json += "}"
  2328. let s = eval("(" + json + ")")
  2329. return s
  2330. },
  2331. // 导出 end
  2332. // 获取数据列表
  2333. search() {
  2334. this.searchData.limit = this.pageSize
  2335. this.searchData.page = this.pageIndex
  2336. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  2337. if (data.code == 0) {
  2338. this.dataList1 = data.page.list
  2339. this.pageIndex = data.page.currPage
  2340. this.pageSize = data.page.pageSize
  2341. this.totalPage = data.page.totalCount
  2342. if(this.dataForm.sp===null){
  2343. this.dataForm.sp = ''
  2344. }
  2345. this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
  2346. // 加载每条记录的首条工具明细信息
  2347. this.loadToolDetailInfo()
  2348. if (this.dataList1.length > 0) {
  2349. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  2350. this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
  2351. } else {
  2352. this.currentRow = {}
  2353. }
  2354. this.refreshCurrentTabTable()
  2355. }
  2356. this.dataListLoading = false
  2357. })
  2358. this.isFilterSearch = false
  2359. },
  2360. // 加载每条申请记录的首条工具明细信息
  2361. loadToolDetailInfo() {
  2362. this.dataList1.forEach(item => {
  2363. searchProjectToolApplyDetail({
  2364. site: item.site,
  2365. applyNo: item.applyNo
  2366. }).then(({data}) => {
  2367. if (data && data.code === 0 && data.rows && data.rows.length > 0) {
  2368. const firstDetail = data.rows[0]
  2369. // 使用$set确保响应式更新
  2370. this.$set(item, 'firstToolId', firstDetail.toolId)
  2371. this.$set(item, 'firstToolDesc', firstDetail.toolDesc)
  2372. } else {
  2373. // 如果没有明细数据,清空这两个字段
  2374. this.$set(item, 'firstToolId', '')
  2375. this.$set(item, 'firstToolDesc', '')
  2376. }
  2377. }).catch(() => {
  2378. // 忽略错误,只是显示为空
  2379. this.$set(item, 'firstToolId', '')
  2380. this.$set(item, 'firstToolDesc', '')
  2381. })
  2382. })
  2383. },
  2384. //单击切换订单
  2385. changeData(row) {
  2386. this.dataForm.status = row.status
  2387. if(this.dataForm.sp===null){
  2388. this.dataForm.sp = ''
  2389. }
  2390. this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
  2391. this.currentRow = JSON.parse(JSON.stringify(row));
  2392. this.currentRow2 = row;
  2393. this.refreshCurrentTabTable();
  2394. },
  2395. addUploadFileModal() {
  2396. let currentData = {
  2397. site: this.currentRow.site,
  2398. createBy: this.$store.state.user.name,
  2399. projectId: this.currentRow.applyNo,
  2400. projectName: '',
  2401. remark: '',
  2402. };
  2403. //打开组件 去做新增业务
  2404. this.$nextTick(() => {
  2405. this.$refs.projectUploadFile.init(currentData);
  2406. })
  2407. },
  2408. deleteFile(row) {
  2409. this.$confirm('确定要删除此文件?', '提示', {
  2410. confirmButtonText: '确定',
  2411. cancelButtonText: '取消',
  2412. type: 'warning'
  2413. }).then(() => {
  2414. deleteProjectFile(row).then(({data}) => {
  2415. if (data && data.code == 0) {
  2416. this.getFileContentData();
  2417. this.$message({
  2418. message: '操作成功',
  2419. type: 'success',
  2420. duration: 1500,
  2421. onClose: () => {
  2422. }
  2423. })
  2424. } else {
  2425. this.$alert(data.msg, '错误', {
  2426. confirmButtonText: '确定'
  2427. })
  2428. }
  2429. })
  2430. }).catch(() => {
  2431. })
  2432. },
  2433. tabClick(tab, event) {
  2434. // 刷新列表数据
  2435. this.refreshCurrentTabTable()
  2436. },
  2437. // 刷新页签的table数据
  2438. refreshCurrentTabTable() {
  2439. if (this.activeName == 'detail') {
  2440. this.searchToolApplyDetail();
  2441. }
  2442. if (this.activeName == 'down') {
  2443. // this.getFileContentData();
  2444. }
  2445. if (this.activeName === 'approvalInformation') {
  2446. this.getApprovalList()
  2447. }
  2448. if (this.activeName == 'attribute') { // 基本信息
  2449. }
  2450. },
  2451. searchToolApplyDetail() {
  2452. if (this.currentRow.applyNo) {
  2453. searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
  2454. if (data.code == 0) {
  2455. this.detailList = data.rows
  2456. }
  2457. })
  2458. } else {
  2459. this.detailList = []
  2460. }
  2461. },
  2462. // 审批
  2463. editModal(row) {
  2464. this.getNodeAuthority(row)
  2465. this.checkSuperAdmin()
  2466. this.dataForm = {
  2467. site: row.site,
  2468. applyNo: row.applyNo,
  2469. applyBy: row.applyBy,
  2470. applyDate: row.applyDate,
  2471. applySumQty: row.applySumQty,
  2472. applyReason: row.applyReason,
  2473. remark: row.remark,
  2474. createBy: row.createBy,
  2475. department: row.department,
  2476. detailList: [],
  2477. status: row.status,
  2478. rejectOpinion: '',
  2479. nodeConclusion: '',
  2480. quoter: row.quoter,
  2481. quoterName: row.quoterName,
  2482. tp: row.tp,
  2483. tpName: row.tpName,
  2484. purchaser: row.purchaser,
  2485. purchaserName: row.purchaserName,
  2486. totalCost: row.totalCost,
  2487. menuId: this.$route.meta.menuId,
  2488. userName: this.$store.state.user.name,
  2489. nodeId: row.nodeId,
  2490. sp: row.sp,
  2491. isReject: row.isReject,
  2492. cs: row.cs,
  2493. csName: row.csName,
  2494. offsetOfExpenses: row.offsetOfExpenses,
  2495. }
  2496. searchProjectToolApplyDetail({
  2497. site: row.site,
  2498. applyNo: row.applyNo,
  2499. }).then(({data}) => {
  2500. if (data.code == 0) {
  2501. this.toolData = data.rows
  2502. this.openModelMessage()
  2503. this.visible = true
  2504. }
  2505. })
  2506. },
  2507. detail(row) {
  2508. this.getNodeAuthority(row)
  2509. this.checkSuperAdmin()
  2510. this.dataForm = {
  2511. site: row.site,
  2512. applyNo: row.applyNo,
  2513. applyBy: row.applyBy,
  2514. applyDate: row.applyDate,
  2515. applySumQty: row.applySumQty,
  2516. applyReason: row.applyReason,
  2517. remark: row.remark,
  2518. createBy: row.createBy,
  2519. department: row.department,
  2520. detailList: [],
  2521. status: row.status,
  2522. rejectOpinion: '',
  2523. nodeConclusion: '',
  2524. quoter: row.quoter,
  2525. quoterName: row.quoterName,
  2526. tp: row.tp,
  2527. tpName: row.tpName,
  2528. purchaser: row.purchaser,
  2529. purchaserName: row.purchaserName,
  2530. totalCost: row.totalCost,
  2531. menuId: this.$route.meta.menuId,
  2532. userName: this.$store.state.user.name,
  2533. nodeId: row.nodeId,
  2534. sp: row.sp,
  2535. isReject: row.isReject,
  2536. cs: row.cs,
  2537. csName: row.csName,
  2538. offsetOfExpenses: row.offsetOfExpenses,
  2539. }
  2540. searchProjectToolApplyDetail({
  2541. site: row.site,
  2542. applyNo: row.applyNo,
  2543. }).then(({data}) => {
  2544. if (data.code == 0) {
  2545. this.toolData = data.rows
  2546. this.openModelMessage()
  2547. this.visibleD = true
  2548. }
  2549. })
  2550. },
  2551. editModalU(row) {
  2552. this.getNodeAuthority(row)
  2553. this.dataForm = {
  2554. site: row.site,
  2555. applyNo: row.applyNo,
  2556. applyBy: row.applyBy,
  2557. applyDate: row.applyDate,
  2558. applySumQty: row.applySumQty,
  2559. applyReason: row.applyReason,
  2560. remark: row.remark,
  2561. createBy: row.createBy,
  2562. department: row.department,
  2563. detailList: [],
  2564. status: row.status,
  2565. rejectOpinion: '',
  2566. nodeConclusion: '',
  2567. quoter: row.quoter,
  2568. quoterName: row.quoterName,
  2569. tp: row.tp,
  2570. tpName: row.tpName,
  2571. purchaser: row.purchaser,
  2572. purchaserName: row.purchaserName,
  2573. totalCost: row.totalCost,
  2574. menuId: this.$route.meta.menuId,
  2575. userName: this.$store.state.user.name,
  2576. nodeId: row.nodeId,
  2577. offsetOfExpenses: row.offsetOfExpenses,
  2578. cs: row.cs,
  2579. csName: row.csName
  2580. }
  2581. searchProjectToolApplyDetail({
  2582. site: row.site,
  2583. applyNo: row.applyNo,
  2584. }).then(({data}) => {
  2585. if (data.code == 0) {
  2586. this.toolData = data.rows
  2587. this.openModelMessage()
  2588. this.visibleU = true
  2589. }
  2590. })
  2591. },
  2592. comfirmApply(row) {
  2593. this.$confirm(`确定下达这个申请`, '提示', {
  2594. confirmButtonText: '确定',
  2595. cancelButtonText: '取消',
  2596. type: 'warning'
  2597. }).then(() => {
  2598. this.$set(this.issueLoadingSet, row.applyNo, true)
  2599. let tempData = {
  2600. site: row.site,
  2601. userName: this.$store.state.user.name,
  2602. applyNo: row.applyNo,
  2603. menuId: this.$route.meta.menuId
  2604. }
  2605. comfirmProjectToolApply(tempData).then(({data}) => {
  2606. if (data && data.code === 0) {
  2607. this.search()
  2608. this.$message({
  2609. message: '操作成功',
  2610. type: 'success',
  2611. duration: 1500,
  2612. onClose: () => {
  2613. }
  2614. })
  2615. } else {
  2616. this.$alert(data.msg, '错误', {
  2617. confirmButtonText: '确定'
  2618. })
  2619. }
  2620. }).finally(() => {
  2621. this.$set(this.issueLoadingSet, row.applyNo, false)
  2622. })
  2623. })
  2624. },
  2625. cancelApply(row) {
  2626. this.$confirm(`确定删除这个申请`, '提示', {
  2627. confirmButtonText: '确定',
  2628. cancelButtonText: '取消',
  2629. type: 'warning'
  2630. }).then(() => {
  2631. cancelProjectToolApply(row).then(({data}) => {
  2632. if (data && data.code === 0) {
  2633. this.search();
  2634. this.$message({
  2635. message: '操作成功',
  2636. type: 'success',
  2637. duration: 1500,
  2638. onClose: () => {
  2639. }
  2640. })
  2641. } else {
  2642. this.$alert(data.msg, '错误', {
  2643. confirmButtonText: '确定'
  2644. })
  2645. }
  2646. })
  2647. })
  2648. },
  2649. //刷新派设备文档的列表
  2650. getFileContentData() {
  2651. let currentData = {orderRef2: this.currentRow.applyNo};
  2652. getFileContentList(currentData).then(({data}) => {
  2653. //区分请求成功和失败的状况
  2654. if (data && data.code == 200) {
  2655. this.fileContentList = data.rows;
  2656. } else {
  2657. this.fileContentList = [];
  2658. }
  2659. });
  2660. },
  2661. // 下载
  2662. downloadFile(row) {
  2663. // let inData={
  2664. // site:this.currentRow.site,
  2665. // username:this.$store.state.user.name,
  2666. // projectId:this.currentRow.projectId
  2667. // }
  2668. // getProjectUserRole(inData).then(({data}) => {
  2669. // if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  2670. downLoadProjectFile(row)
  2671. .then(({data}) => {
  2672. // 不限制文件下载类型
  2673. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  2674. // 下载文件名称
  2675. const fileName = row.fileName
  2676. // a标签下载
  2677. const linkNode = document.createElement('a')
  2678. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  2679. linkNode.style.display = 'none'
  2680. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  2681. console.log(linkNode)
  2682. // if(val == 'Y'){
  2683. // this.pdfVisible = true
  2684. // this.pdfUrl = linkNode.href
  2685. // }else {
  2686. document.body.appendChild(linkNode)
  2687. linkNode.click() // 模拟在按钮上的一次鼠标单击
  2688. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  2689. document.body.removeChild(linkNode)
  2690. // }
  2691. })
  2692. // }else {
  2693. // this.$alert('没有权限下载这个项目的文件!', '错误', {
  2694. // confirmButtonText: '确定'
  2695. // })
  2696. // }
  2697. // })
  2698. },
  2699. // 每页数
  2700. sizeChangeHandle(val) {
  2701. this.pageSize = val
  2702. this.pageIndex = 1
  2703. if ( this.isFilterSearch === false){
  2704. this.search()
  2705. } else {
  2706. this.queryByAnyField(this.filterSearchData)
  2707. }
  2708. },
  2709. // 当前页
  2710. currentChangeHandle(val) {
  2711. this.pageIndex = val
  2712. if ( this.isFilterSearch === false){
  2713. this.search()
  2714. } else {
  2715. this.queryByAnyField(this.filterSearchData)
  2716. }
  2717. },
  2718. sizeChangeHandle1(val) {
  2719. this.pageSize1 = val
  2720. this.pageIndex1 = 1
  2721. this.addChangeDetail()
  2722. },
  2723. currentChangeHandle1(val) {
  2724. this.pageIndex1 = val
  2725. this.addChangeDetail()
  2726. },
  2727. openModelMessage() {
  2728. this.modelData = {
  2729. site: this.currentRow.site,
  2730. applyNo: this.currentRow.applyNo,
  2731. prNo: this.currentRow.prNo,
  2732. remark1: this.currentRow.remark1,
  2733. poNo: this.currentRow.poNo,
  2734. supplierName: this.currentRow.supplierName,
  2735. allCost: this.currentRow.allCost,
  2736. remark2: this.currentRow.remark2,
  2737. co: this.currentRow.co
  2738. }
  2739. },
  2740. openMassageModel() {
  2741. if (Object.keys(this.currentRow).length === 0) {
  2742. this.$alert('未选择记录!', '错误', {
  2743. confirmButtonText: '确定'
  2744. })
  2745. return false;
  2746. }
  2747. this.modelData = {
  2748. site: this.currentRow.site,
  2749. applyNo: this.currentRow.applyNo,
  2750. prNo: this.currentRow.prNo,
  2751. remark1: this.currentRow.remark1,
  2752. poNo: this.currentRow.poNo,
  2753. supplierName: this.currentRow.supplierName,
  2754. allCost: this.currentRow.allCost,
  2755. remark2: this.currentRow.remark2,
  2756. co: this.currentRow.co
  2757. }
  2758. this.modelFlag = true
  2759. },
  2760. changeSum(row) {
  2761. if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
  2762. row.standardCost = 0
  2763. // this.$alert('成本不能为负数或者不填', '错误', {
  2764. // confirmButtonText: '确定'
  2765. // })
  2766. }
  2767. this.dataForm.applySumQty = 0
  2768. this.dataForm.totalCost = 0
  2769. for (const item of this.toolData) {
  2770. // 累加之前先确保值存在,并将 null 或 undefined 转换为0
  2771. this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
  2772. this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty * item.standardCost : 0);
  2773. }
  2774. },
  2775. saveHeaderMessage() {
  2776. this.$confirm('确定是否保存', '提示', {
  2777. confirmButtonText: '确定',
  2778. cancelButtonText: '取消',
  2779. type: 'warning'
  2780. }).then(() => {
  2781. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  2782. if (data && data.code === 0) {
  2783. this.modelFlag = false;
  2784. this.currentRow.prNo = this.modelData.prNo
  2785. this.currentRow.remark1 = this.modelData.remark1
  2786. this.currentRow.poNo = this.modelData.poNo
  2787. this.currentRow.supplierName = this.modelData.supplierName
  2788. this.currentRow.allCost = this.modelData.allCost
  2789. this.currentRow.totalCost = this.modelData.totalCost
  2790. this.currentRow.remark2 = this.modelData.remark2
  2791. this.currentRow.co = this.modelData.co
  2792. this.$message({
  2793. message: '操作成功',
  2794. type: 'success',
  2795. duration: 1500,
  2796. onClose: () => {
  2797. }
  2798. })
  2799. } else {
  2800. this.$alert(data.msg, '错误', {
  2801. confirmButtonText: '确定'
  2802. })
  2803. }
  2804. })
  2805. })
  2806. },
  2807. saveHeaderMessage2() {
  2808. saveProjectHeaderMessage(this.modelData).then(({data}) => {
  2809. if (data && data.code === 0) {
  2810. this.modelFlag = false;
  2811. this.currentRow.prNo = this.modelData.prNo
  2812. this.currentRow.remark1 = this.modelData.remark1
  2813. this.currentRow.poNo = this.modelData.poNo
  2814. this.currentRow.supplierName = this.modelData.supplierName
  2815. this.currentRow.allCost = this.modelData.allCost
  2816. this.currentRow.totalCost = this.modelData.totalCost
  2817. this.currentRow.remark2 = this.modelData.remark2
  2818. this.currentRow.co = this.modelData.co
  2819. this.$message({
  2820. message: '操作成功',
  2821. type: 'success',
  2822. duration: 1500,
  2823. onClose: () => {}
  2824. })
  2825. } else {
  2826. this.$alert(data.msg, '错误', {
  2827. confirmButtonText: '确定'
  2828. })
  2829. }
  2830. })
  2831. },
  2832. // 同意提交
  2833. agreeSubmit() {
  2834. // 校验:当费用抵消为"Charge Back To Customer"时,CS必填
  2835. if (this.dataForm.offsetOfExpenses === 'Charge Back To Customer' && !this.dataForm.cs) {
  2836. this.$alert('当费用抵消为"Charge Back To Customer"时,CS必填!', '错误', {
  2837. confirmButtonText: '确定'
  2838. })
  2839. return
  2840. }
  2841. this.$confirm(`是否确认提交?`, '提示', {
  2842. confirmButtonText: '确定',
  2843. cancelButtonText: '取消',
  2844. type: 'warning'
  2845. }).then(() => {
  2846. this.dataForm.nodeConclusion = 'Y'
  2847. this.submitData()
  2848. })
  2849. },
  2850. // 打开提交模态框
  2851. submitDataModal() {
  2852. this.rejectOpinion = ''
  2853. this.submitModalFlag = true
  2854. },
  2855. // 驳回提交
  2856. rejectSubmit() {
  2857. this.$confirm(`是否确认驳回?`, '提示', {
  2858. confirmButtonText: '确定',
  2859. cancelButtonText: '取消',
  2860. type: 'warning'
  2861. }).then(() => {
  2862. this.dataForm.rejectOpinion = this.rejectOpinion
  2863. this.dataForm.nodeConclusion = 'N'
  2864. this.submitData()
  2865. })
  2866. },
  2867. // 提交
  2868. submitData() {
  2869. this.dataForm.userName = this.$store.state.user.name
  2870. this.dataForm.menuId = this.$route.meta.menuId
  2871. this.dataForm.detailList = this.toolData
  2872. this.submitLoading = true
  2873. submitChange(this.dataForm).then(({data}) => {
  2874. if (data && data.code === 0) {
  2875. this.saveHeaderMessage2()
  2876. for (let i = 0; i < this.dataList1.length; i++) {
  2877. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  2878. this.dataList1[i].remark = this.dataForm.remark
  2879. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  2880. this.dataList1[i].applyReason = this.dataForm.applyReason
  2881. }
  2882. }
  2883. this.search();
  2884. this.refreshCurrentTabTable()
  2885. this.submitModalFlag = false
  2886. this.visible = false
  2887. this.$message({
  2888. message: '操作成功',
  2889. type: 'success',
  2890. duration: 1500,
  2891. onClose: () => {
  2892. }
  2893. })
  2894. } else {
  2895. this.$alert(data.msg, '错误', {
  2896. confirmButtonText: '确定'
  2897. })
  2898. }
  2899. }).finally(() => {
  2900. this.submitLoading = false
  2901. })
  2902. },
  2903. saveData() {
  2904. this.dataForm.detailList = this.toolData
  2905. editToolApplication(this.dataForm).then(({data}) => {
  2906. if (data && data.code === 0) {
  2907. this.saveHeaderMessage2()
  2908. for (let i = 0; i < this.dataList1.length; i++) {
  2909. if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
  2910. this.dataList1[i].remark = this.dataForm.remark
  2911. this.dataList1[i].applySumQty = this.dataForm.applySumQty
  2912. this.dataList1[i].applyReason = this.dataForm.applyReason
  2913. this.dataList1[i].quoter = this.dataForm.quoter
  2914. this.dataList1[i].tp = this.dataForm.tp
  2915. this.dataList1[i].totalCost = this.dataForm.totalCost
  2916. this.dataList1[i].purchaser = this.dataForm.purchaser
  2917. this.dataList1[i].quoterName = this.dataForm.quoterName
  2918. this.dataList1[i].tpName = this.dataForm.tpName
  2919. this.dataList1[i].purchaserName = this.dataForm.purchaserName
  2920. }
  2921. }
  2922. this.visible = false
  2923. this.visibleU = false
  2924. this.search()
  2925. this.refreshCurrentTabTable()
  2926. // this.$message({
  2927. // message: '操作成功',
  2928. // type: 'success',
  2929. // duration: 1500,
  2930. // onClose: () => {
  2931. // }
  2932. // })
  2933. } else {
  2934. this.$alert(data.msg, '错误', {
  2935. confirmButtonText: '确定'
  2936. })
  2937. }
  2938. })
  2939. },
  2940. jumpBM(row) {
  2941. this.visibleD = false
  2942. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  2943. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  2944. } else {
  2945. let inData = {
  2946. site: row.site,
  2947. testPartNo: row.orderRef2
  2948. }
  2949. getProjectPartNowBm(inData).then(({data}) => {
  2950. //区分请求成功和失败的状况
  2951. if (data && data.code === 0) {
  2952. if (data.rows == null || data.rows.length === 0) {
  2953. this.$alert('该物料未创建技术参数卡!', '警告', {confirmButtonText: '确定',});
  2954. }
  2955. this.$router.push({
  2956. name: `sampleManagement-technicalSpecificationList`,
  2957. params: {nowCodeNo: data.rows[0].nowBm},
  2958. })
  2959. } else {
  2960. }
  2961. });
  2962. }
  2963. },
  2964. // 获取流程的配置权限
  2965. async getNodeAuthority(row) {
  2966. let tempData = {
  2967. site: row.site,
  2968. stepId: row.stepId,
  2969. menuId: this.$route.meta.menuId
  2970. }
  2971. await getNodeAuthority(tempData).then(({data}) => {
  2972. if (data && data.code === 0) {
  2973. this.plmChangeApplyHeaderArr = data.rows.plm_project_tool_applyHeader;
  2974. this.plmChangeApplyDetailArr = data.rows.plm_project_tool_applyDetail;
  2975. // this.plmChangeRequestArr = data.rows.plm_change_request
  2976. // this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  2977. // this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  2978. // this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  2979. // this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  2980. // this.plmChangeItemArr = data.rows.plm_change_item
  2981. // this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  2982. }
  2983. })
  2984. },
  2985. fieldColumn() {
  2986. if (!this.accessField('10601001')) {
  2987. this.columnList2 = this.columnList2.filter(item => item.columnProp !== 'standardCost');
  2988. this.columnList1 = this.columnList1.filter(item => item.columnProp !== 'totalCost');
  2989. }
  2990. },
  2991. queryByAnyField(params){
  2992. params.no = this.pageIndex
  2993. params.size = this.pageSize
  2994. params.site = this.$store.state.user.site
  2995. params.userId = this.$store.state.user.id.toString()
  2996. this.dataListLoading = true;
  2997. searchProjectToolApplyHeaderByAnyField(params).then(({data})=>{
  2998. if (data && data.code === 0){
  2999. this.dataList1 = data.page.list
  3000. this.totalPage = data.page.totalCount
  3001. // 加载每条记录的首条工具明细信息
  3002. this.loadToolDetailInfo()
  3003. }else {
  3004. this.$message.warning(data.msg)
  3005. }
  3006. this.dataListLoading = false;
  3007. }).catch((error)=>{
  3008. this.$message.error(error)
  3009. this.dataListLoading = false;
  3010. })
  3011. this.filterSearchData = params
  3012. this.isFilterSearch = true
  3013. this.filterVisible = false
  3014. },
  3015. selectionChangeHandle(val){
  3016. this.selectionDataList = val;
  3017. },
  3018. selectionData (val) {
  3019. this.dataSelections = val
  3020. },
  3021. addChangeDetail(){
  3022. this.toolDetailFlag = true
  3023. this.toolDetailSearchData.no = this.pageIndex1
  3024. this.toolDetailSearchData.size = this.pageSize1
  3025. queryProjectPartToolForApply(this.toolDetailSearchData).then(({data})=>{
  3026. if (data && data.code === 0){
  3027. this.dataList2 = data.rows
  3028. this.totalPage1 = data.total
  3029. }else {
  3030. this.$message.error(data.msg)
  3031. }
  3032. }).catch((error)=>{
  3033. this.$message.error(error)
  3034. })
  3035. },
  3036. addDetail(){
  3037. if (this.dataSelections.length === 0) {
  3038. this.$message.warning("请勾选工具明细!")
  3039. return
  3040. }
  3041. this.dataSelections.forEach(item => {
  3042. // 确保没有重复的元素
  3043. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) {
  3044. this.chooseDataList.push(item)
  3045. }
  3046. })
  3047. this.chooseDataList = this.chooseDataList.map(item => {
  3048. return {
  3049. ...item,
  3050. applyNo: this.dataForm.applyNo
  3051. };
  3052. });
  3053. toolDetailBatchSave(this.chooseDataList).then(({data})=>{
  3054. if (data && data.code === 0){
  3055. this.$message.success("添加成功")
  3056. searchProjectToolApplyDetail({
  3057. site: this.dataForm.site,
  3058. applyNo: this.dataForm.applyNo,
  3059. }).then(({data}) => {
  3060. if (data.code == 0) {
  3061. this.toolData = data.rows
  3062. }
  3063. })
  3064. }else {
  3065. this.$message.error(data.msg)
  3066. }
  3067. }).catch((error)=>{
  3068. this.$message.error(error)
  3069. })
  3070. this.toolDetailFlag = false
  3071. this.dataSelections = []
  3072. },
  3073. applyDetail(){
  3074. if (this.dataSelections.length === 0) {
  3075. this.$message.warning("请勾选工具明细!")
  3076. return
  3077. }
  3078. this.dataSelections.forEach(item => {
  3079. // 确保没有重复的元素
  3080. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) {
  3081. this.chooseDataList.push(item)
  3082. }
  3083. })
  3084. this.chooseDataList = this.chooseDataList.map(item => {
  3085. return {
  3086. ...item,
  3087. applyNo: this.dataForm.applyNo
  3088. };
  3089. });
  3090. toolDetailBatchSave(this.chooseDataList).then(({data})=>{
  3091. if (data && data.code === 0){
  3092. this.$message.success("添加成功")
  3093. searchProjectToolApplyDetail({
  3094. site: this.dataForm.site,
  3095. applyNo: this.dataForm.applyNo,
  3096. }).then(({data}) => {
  3097. if (data.code == 0) {
  3098. this.toolData = data.rows
  3099. }
  3100. })
  3101. }else {
  3102. this.$message.error(data.msg)
  3103. }
  3104. }).catch((error)=>{
  3105. this.$message.error(error)
  3106. })
  3107. this.dataSelections = []
  3108. },
  3109. toolDetailBatchDelete(){
  3110. if (this.selectionDataList.length === 0) {
  3111. this.$message.warning('请勾选要删除的工具明细信息!')
  3112. return
  3113. }
  3114. this.$confirm(`是否删除这 ` + this.selectionDataList.length + ` 条工具明细信息?`, '提示', {
  3115. confirmButtonText: '确定',
  3116. cancelButtonText: '取消',
  3117. type: 'warning'
  3118. }).then(() => {
  3119. toolDetailBatchDelete(this.selectionDataList).then(({data}) => {
  3120. if (data && data.code === 0) {
  3121. this.searchToolApplyDetail()
  3122. this.selectionDataList = []
  3123. searchProjectToolApplyDetail({
  3124. site: this.dataForm.site,
  3125. applyNo: this.dataForm.applyNo,
  3126. }).then(({data}) => {
  3127. if (data.code == 0) {
  3128. this.toolData = data.rows
  3129. }
  3130. })
  3131. this.$message({
  3132. message: '操作成功',
  3133. type: 'success',
  3134. duration: 1500,
  3135. onClose: () => {
  3136. }
  3137. })
  3138. } else {
  3139. this.$alert(data.msg, '错误', {
  3140. confirmButtonText: '确定'
  3141. })
  3142. }
  3143. })
  3144. })
  3145. },
  3146. },
  3147. activated() {
  3148. this.checkSuperAdmin()
  3149. if (this.$route.params.type === 'tokenLogin') {
  3150. if (this.$route.params.docNo) {
  3151. this.searchData.applyNo = this.$route.params.docNo
  3152. }
  3153. this.searchData.limit = this.pageSize
  3154. this.searchData.page = this.pageIndex
  3155. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  3156. if (data && data.code === 0) {
  3157. this.dataList1 = data.page.list
  3158. this.pageIndex = data.page.currPage
  3159. this.pageSize = data.page.pageSize
  3160. this.totalPage = data.page.totalCount
  3161. if (this.dataList1.length > 0) {
  3162. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  3163. this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
  3164. //进入审批界面
  3165. this.editModal(this.dataList1[0])
  3166. } else {
  3167. this.currentRow = {}
  3168. }
  3169. this.refreshCurrentTabTable()
  3170. }
  3171. this.dataListLoading = false
  3172. })
  3173. }
  3174. if (localStorage.getItem('ToolApplyData') != null && localStorage.getItem('ToolApplyData') !== undefined) {
  3175. let data = JSON.parse(localStorage.getItem('ToolApplyData'));
  3176. if (data) {
  3177. this.searchData.applyNo = data.applyNo
  3178. }
  3179. this.searchData.limit = this.pageSize
  3180. this.searchData.page = this.pageIndex
  3181. searchProjectToolApplyHeader(this.searchData).then(({data}) => {
  3182. if (data.code == 0) {
  3183. this.dataList1 = data.page.list
  3184. this.pageIndex = data.page.currPage
  3185. this.pageSize = data.page.pageSize
  3186. this.totalPage = data.page.totalCount
  3187. if(this.dataForm.sp===null){
  3188. this.dataForm.sp = ''
  3189. }
  3190. this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp))
  3191. if (this.dataList1.length > 0) {
  3192. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  3193. this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
  3194. //进入编辑界面
  3195. // this.editModalU(this.dataList1[0])
  3196. } else {
  3197. this.currentRow = {}
  3198. }
  3199. this.refreshCurrentTabTable()
  3200. }
  3201. this.dataListLoading = false
  3202. })
  3203. localStorage.removeItem('ToolApplyData');
  3204. }
  3205. },
  3206. }
  3207. </script>
  3208. <style scoped lang="scss">
  3209. /deep/ .el-dialog__footer {
  3210. height: 50px !important;
  3211. }
  3212. /deep/ .customer-tab .el-tabs__content {
  3213. padding: 5px !important;
  3214. }
  3215. </style>