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.

3462 lines
125 KiB

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