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.

3716 lines
125 KiB

2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
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
1 year 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
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
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
2 years 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
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years 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
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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
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
1 year 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
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
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years 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
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
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
2 years 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
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
2 years ago
2 years ago
2 years ago
2 years 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
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year 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
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
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
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
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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'打样单号'">
  6. <el-input v-model="searchData.proofingNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户编码'">
  9. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'客户名称'">
  12. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'CS'">
  15. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'物料编码'">
  18. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'物料名称'">
  21. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'要求交付日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item label=" ">
  33. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  46. <el-form-item label="BU">
  47. <bu-select v-model="searchData.buNo" style="width: 120px"></bu-select>
  48. </el-form-item>
  49. <el-form-item :label="'项目编码'">
  50. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'项目名称'">
  53. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  54. </el-form-item>
  55. <el-form-item :label="'NPI工程师'">
  56. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  57. </el-form-item>
  58. <el-form-item :label="'IFS物料编码'">
  59. <el-input v-model="searchData.finalPartNo" clearable style="width: 120px"></el-input>
  60. </el-form-item>
  61. <el-form-item :label="'客户物料编码'">
  62. <el-input v-model="searchData.customerPartNo" clearable style="width: 120px"></el-input>
  63. </el-form-item>
  64. <el-form-item :label="'优先等级'">
  65. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"></dict-data-select>
  66. </el-form-item>
  67. <el-form-item :label="'状态'">
  68. <el-select v-model="searchData.proofingStatus" style="width: 120px">
  69. <el-option label="全部" value=""></el-option>
  70. <el-option label="草稿" value="草稿"></el-option>
  71. <el-option label="审批中" value="审批中"></el-option>
  72. <el-option label="已完成" value="已完成"></el-option>
  73. </el-select>
  74. </el-form-item>
  75. <el-form-item :label="' '">
  76. <el-button @click="getDataList()">查询</el-button>
  77. <el-button type="primary" @click="addModal()">新增</el-button>
  78. <el-button type="primary" @click="delModal()">删除</el-button>
  79. <download-excel
  80. :fields="fields()"
  81. :data="exportData"
  82. type="xls"
  83. :name="exportName"
  84. :header="exportHeader"
  85. :footer="exportFooter"
  86. :fetch="createExportData"
  87. :before-generate="startDownload"
  88. :before-finish="finishDownload"
  89. worksheet="导出信息"
  90. class="el-button el-button--primary el-button--medium">
  91. {{ "导出" }}
  92. </download-excel>
  93. </el-form-item>
  94. </el-form>
  95. <!-- 打样列表 -->
  96. <el-table
  97. :height="height"
  98. :data="dataList"
  99. border
  100. :row-style="rowStyle"
  101. ref="proofingTable"
  102. @row-click="proofingClickRow"
  103. @selection-change="selectionProofing"
  104. @current-change="changeCurrentRow"
  105. v-loading="dataListLoading"
  106. style="width: 100%;">
  107. <el-table-column
  108. type="selection"
  109. header-align="center"
  110. align="center"
  111. :selectable="selectFlag"
  112. width="50">
  113. </el-table-column>
  114. <el-table-column
  115. v-for="(item,index) in columnList" :key="index"
  116. :sortable="item.columnSortable"
  117. :prop="item.columnProp"
  118. :header-align="item.headerAlign"
  119. :show-overflow-tooltip="item.showOverflowTooltip"
  120. :align="item.align"
  121. :fixed="item.fixed === ''?false:item.fixed"
  122. :min-width="item.columnWidth"
  123. :label="item.columnLabel">
  124. <template slot-scope="scope">
  125. <div v-if="item.columnProp === 'proofingResultStatus'">
  126. <span v-if="!item.columnHidden">
  127. <span v-show="scope.row.proofingResultStatus === 'B'">草稿</span>
  128. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  129. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  130. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  131. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  132. </span>
  133. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  134. style="width: 100px; height: 80px"/></span>
  135. </div>
  136. <div v-else>
  137. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  138. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  139. style="width: 100px; height: 80px"/></span>
  140. </div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column
  144. fixed="right"
  145. header-align="center"
  146. align="center"
  147. width="100"
  148. label="操作">
  149. <template slot-scope="scope">
  150. <el-link style="cursor: pointer" @click="updateModal(scope.row)" v-if="scope.row.proofingStatus !== '已完成'">
  151. 编辑
  152. </el-link>
  153. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '草稿'"
  154. @click="updateModalStatus(scope.row,'C')">下达
  155. </el-link>
  156. <el-link style="cursor: pointer" v-if="scope.row.proofingStatus === '已完成'" @click="getDetailData(scope.row)">
  157. 详情
  158. </el-link>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <selectDiv ref="selectDiv"></selectDiv>
  163. <!-- 分页插件 -->
  164. <el-pagination style="margin-top: 0px"
  165. @size-change="sizeChangeHandle"
  166. @current-change="currentChangeHandle"
  167. :current-page="pageIndex"
  168. :page-sizes="[20, 50, 100, 200, 500]"
  169. :page-size="pageSize"
  170. :total="totalPage"
  171. layout="total, sizes, prev, pager, next, jumper">
  172. </el-pagination>
  173. <!-- 打样模态框 -->
  174. <el-dialog :title="modalData.title" @close="closeModalDiaLog" @open="openModalDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" top="10vh" width="1200px">
  175. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules">
  176. <el-row :gutter="15">
  177. <el-col :span="8">
  178. <el-row :gutter="10">
  179. <el-col :span="10">
  180. <el-form-item prop="customerNo" label="客户编码" :show-message="false">
  181. <span style="cursor: pointer" slot="label" v-if="modalData.flag === '1'"
  182. @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  183. <el-input :disabled="modalData.flag !== '1' && columnFlagByHeader('customerNo')"
  184. v-model="modalData.customerNo" @blur="handleQueryCustomer"></el-input>
  185. </el-form-item>
  186. </el-col>
  187. <el-col :span="14">
  188. <el-form-item label=" " :show-message="false">
  189. <el-input disabled v-model="modalData.customerDesc"></el-input>
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. </el-col>
  194. <el-col :span="4">
  195. <el-form-item label="打样数量" prop="proofingNumber" :show-message="false">
  196. <el-input-number :controls="false" :disabled="detailVisible" :min="0" v-model="modalData.proofingNumber" :step="0" style="width: 100%"></el-input-number>
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="4">
  200. <el-form-item label="优先等级" :show-message="false">
  201. <dict-data-select v-if="modalFlag" :disabled="columnFlagByHeader('priorityLevel') || detailVisible"
  202. v-model="modalData.priorityLevel"
  203. dict-type="priority_Level"></dict-data-select>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="4">
  207. <el-form-item label="要求交付日期" prop="requiredDeliveryDate" :show-message="false">
  208. <el-date-picker v-model="modalData.requiredDeliveryDate" style="width: 100%" type="date"
  209. value-format="yyyy-MM-dd" placeholder="选择日期"
  210. :disabled="columnFlagByHeader('requiredDeliveryDate') || detailVisible"></el-date-picker>
  211. </el-form-item>
  212. </el-col>
  213. </el-row>
  214. <el-row :gutter="15">
  215. <el-col :span="8">
  216. <el-row :gutter="10">
  217. <el-col :span="10">
  218. <el-form-item prop="projectId" label="项目编码" :show-message="false">
  219. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'"
  220. @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
  221. <el-input :disabled="(!modalData.customerNo || modalData.flag !== '1')"
  222. v-model="modalData.projectId" @blur="handleQueryProjectByCustomer"></el-input>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="14">
  226. <el-form-item label=" " :show-message="false">
  227. <el-input disabled v-model="modalData.projectName"></el-input>
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. </el-col>
  232. <el-col :span="4">
  233. <el-form-item :show-message="false">
  234. <label v-if="columnFlagByHeader('tracker') || detailVisible" slot="label">CS</label>
  235. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2051)"><a herf="#">CS</a></span>
  236. <el-input v-model="modalData.trackerName" :disabled="columnFlagByHeader('tracker') || detailVisible" readonly>
  237. <span slot="suffix" v-show="modalData.trackerName && !detailVisible" @click="clearModalData('tracker')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  238. </el-input>
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="4">
  242. <el-form-item :show-message="false">
  243. <label v-if="columnFlagByHeader('engineer') || detailVisible" slot="label">NPI工程师</label>
  244. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2052)"><a>NPI工程师</a></span>
  245. <el-input v-model="modalData.engineerName" :disabled="columnFlagByHeader('engineer') || detailVisible" readonly>
  246. <span slot="suffix" v-show="modalData.engineerName && !detailVisible" @click="clearModalData('engineer')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  247. </el-input>
  248. </el-form-item>
  249. </el-col>
  250. <el-col :span="4">
  251. <el-form-item>
  252. <label v-if="columnFlagByHeader('approver') || detailVisible" slot="label">Approver</label>
  253. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2053)"><a
  254. herf="#">Approver</a></span>
  255. <el-input v-model="modalData.approverName" :disabled="columnFlagByHeader('approver') || detailVisible" readonly>
  256. <span slot="suffix" v-show="modalData.approverName && !detailVisible" @click="clearModalData('approver')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  257. </el-input>
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="4">
  261. <el-form-item>
  262. <label v-if="columnFlagByDelegateAccess('delegateAccess') || detailVisible" slot="label">DelegateAccess</label>
  263. <span v-else style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  264. <el-input v-model="delegateAccessName" :disabled="columnFlagByDelegateAccess('delegateAccess') || detailVisible" readonly>
  265. <span slot="suffix" v-show="delegateAccessName && !detailVisible" @click="selectionDelegateAccess = []"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
  266. </el-input>
  267. </el-form-item>
  268. </el-col>
  269. </el-row>
  270. <el-row :gutter="15">
  271. <el-col :span="24">
  272. <el-form-item label="样品寄送地址" class="auto">
  273. <el-input type="textarea" v-model="modalData.sendSamplesAddress" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  274. </el-form-item>
  275. </el-col>
  276. </el-row>
  277. <el-row :gutter="15">
  278. <el-col :span="24">
  279. <el-form-item label="备注" style="height: 90px">
  280. <el-input type="textarea" v-model="modalData.technicalConsiderations" :disabled="detailVisible" :rows="3" resize='none' show-word-limit></el-input>
  281. </el-form-item>
  282. </el-col>
  283. </el-row>
  284. </el-form>
  285. <div class="rq">
  286. <el-form :inline="true" label-position="top" :model="projectPartData" v-if="modalData.flag === '1'">
  287. <el-form-item label="物料编码">
  288. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  289. </el-form-item>
  290. <el-form-item label="物料名称">
  291. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  292. </el-form-item>
  293. <el-form-item label="IFS料号">
  294. <el-input v-model="projectPartData.finalPartNo" clearable style="width: 120px"></el-input>
  295. </el-form-item>
  296. <el-form-item label="客户料号">
  297. <el-input v-model="projectPartData.customerPartNo" clearable style="width: 120px"></el-input>
  298. </el-form-item>
  299. <el-form-item label=" " v-if="modalData.projectId">
  300. <el-button type="primary" @click="getProjectPartList">查询</el-button>
  301. </el-form-item>
  302. </el-form>
  303. <el-table
  304. :height="300"
  305. :data="projectPartList"
  306. ref="projectPartTable"
  307. @row-click="projectPartClickRow"
  308. @selection-change="selectionProjectPart"
  309. :row-key="getRowKeys"
  310. border
  311. v-loading="queryLoading"
  312. style="width: 100%;">
  313. <el-table-column
  314. type="selection"
  315. header-align="center"
  316. align="center"
  317. :selectable="checkSelectable"
  318. :reserve-selection="true"
  319. width="50">
  320. </el-table-column>
  321. <el-table-column
  322. v-for="(item,index) in projectPartDetailList" :key="index"
  323. :sortable="item.columnSortable"
  324. :prop="item.columnProp"
  325. :header-align="item.headerAlign"
  326. :show-overflow-tooltip="item.showOverflowTooltip"
  327. :align="item.align"
  328. :fixed="item.fixed===''?false:item.fixed"
  329. :min-width="item.columnWidth"
  330. :label="item.columnLabel">
  331. <template slot-scope="scope">
  332. <template v-if="item.columnProp === 'testPartNo'">
  333. <a @click="handleRouter(scope.row)">{{ scope.row[item.columnProp] }}</a>
  334. </template>
  335. <template v-else>
  336. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  337. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  338. </template>
  339. </template>
  340. </el-table-column>
  341. </el-table>
  342. </div>
  343. <el-pagination style="margin-top: 0"
  344. @size-change="handleSizeChange"
  345. @current-change="handleCurrentChange"
  346. :current-page="no"
  347. :page-sizes="[20, 50, 100, 200, 500]"
  348. :page-size="size"
  349. :total="total"
  350. layout="total, sizes, prev, pager, next, jumper">
  351. </el-pagination>
  352. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  353. <el-button type="primary" @click="saveData()">保存</el-button>
  354. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  355. <el-button v-if="modalData.proofingStatus === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  356. <el-button v-if="modalData.proofingStatus === '审批中' && modalData.isReject === 'Y'"
  357. @click="rejectVisible = true" type="primary">驳回
  358. </el-button>
  359. </el-footer>
  360. </el-dialog>
  361. <!-- 录入打样结果模态框 -->
  362. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag"
  363. width="785px">
  364. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  365. style="margin-left: 0px;margin-top: 10px;">
  366. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  367. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd"
  368. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  369. </el-form-item>
  370. </el-form>
  371. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules"
  372. style="margin-left:0px;margin-top: 5px;">
  373. <el-form-item label="打样结果信息" prop="proofingResultInformation"
  374. :rules="enterResultRules.proofingResultInformation">
  375. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none'
  376. show-word-limit style="width: 500px;height: 30px"></el-input>
  377. </el-form-item>
  378. </el-form>
  379. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  380. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  381. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  382. </el-form>
  383. <el-table
  384. :height="200"
  385. :data="fileContentList"
  386. border
  387. v-loading="dataListLoading"
  388. style="width: 100%">
  389. <el-table-column
  390. v-for="(item,index) in fileColumnList" :key="index"
  391. :sortable="item.columnSortable"
  392. :prop="item.columnProp"
  393. :header-align="item.headerAlign"
  394. :show-overflow-tooltip="item.showOverflowTooltip"
  395. :align="item.align"
  396. :fixed="item.fixed===''?false:item.fixed"
  397. :min-width="item.columnWidth"
  398. :label="item.columnLabel">
  399. <template slot-scope="scope">
  400. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  401. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  402. </template>
  403. </el-table-column>
  404. <el-table-column
  405. fixed="right"
  406. header-align="center"
  407. align="center"
  408. width="100"
  409. label="操作">
  410. <template slot-scope="scope">
  411. <a @click="deleteFile(scope.row)">删除</a>
  412. </template>
  413. </el-table-column>
  414. </el-table>
  415. </el-form>
  416. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  417. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  418. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  419. </el-footer>
  420. </el-dialog>
  421. <!-- 录入送样信息模态框 -->
  422. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag"
  423. width="620px">
  424. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules"
  425. style="margin-left: 0px;margin-top: 10px;">
  426. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate"
  427. :rules="submitResultRules.actualitySendSamplesDate">
  428. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd"
  429. placeholder="请选择日期" style="width: 200px"></el-date-picker>
  430. </el-form-item>
  431. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  432. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  433. <el-option label="客户自提" value="客户自提"></el-option>
  434. <el-option label="人员带货" value="人员带货"></el-option>
  435. <el-option label="其它" value="其它"></el-option>
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item label="送货信息">
  439. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  440. </el-form-item>
  441. </el-form>
  442. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  443. <el-form-item label="送货备注">
  444. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none'
  445. show-word-limit style="width: 456px;height: 30px"></el-input>
  446. </el-form-item>
  447. </el-form>
  448. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  449. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  450. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  451. </el-footer>
  452. </el-dialog>
  453. <!-- 客户回复模态框 -->
  454. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag"
  455. width="620px">
  456. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules"
  457. style="margin-left: 0px;margin-top: 10px;">
  458. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  459. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd"
  460. placeholder="请选择日期" style="width: 185px"></el-date-picker>
  461. </el-form-item>
  462. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  463. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  464. <el-option label="接受" value="接受"></el-option>
  465. <el-option label="不接受" value="不接受"></el-option>
  466. </el-select>
  467. </el-form-item>
  468. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  469. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  470. </el-form-item>
  471. </el-form>
  472. <el-form :inline="true" label-position="top" :model="customerResponseData"
  473. style="margin-left:0px;margin-top: 5px;">
  474. <el-form-item label="客户回复信息">
  475. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none'
  476. show-word-limit style="width: 595px;height: 30px"></el-input>
  477. </el-form-item>
  478. </el-form>
  479. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  480. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  481. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  482. </el-footer>
  483. </el-dialog>
  484. <!--选择项目模态框-->
  485. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList"
  486. :visible.sync="chooseProjectListFlag" width="35%" :close-on-click-modal="false">
  487. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  488. <el-row :gutter="10">
  489. <el-col :span="6">
  490. <el-form-item label="项目编码">
  491. <el-input v-model="searchProjectData.projectId"></el-input>
  492. </el-form-item>
  493. </el-col>
  494. <el-col :span="6">
  495. <el-form-item label="项目名称">
  496. <el-input v-model="searchProjectData.projectName"></el-input>
  497. </el-form-item>
  498. </el-col>
  499. <el-col :span="6">
  500. <el-form-item label=" ">
  501. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  502. </el-form-item>
  503. </el-col>
  504. </el-row>
  505. <el-table :height="223"
  506. :data="projectList"
  507. border
  508. @row-click="projectClickRow">
  509. <el-table-column label="项目编码" prop="projectId"/>
  510. <el-table-column label="项目名称" prop="projectName"/>
  511. </el-table>
  512. </el-form>
  513. </el-dialog>
  514. <!-- 页签 -->
  515. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 300px;" type="border-card"
  516. @tab-click="tabClick" class="customer-tab">
  517. <el-tab-pane label="基本信息" name="attribute">
  518. <proofing-attribute ref="dialogAttribute" :disabled="proofingCurrentRow.proofingStatus === '已完成'" :order-no="proofingCurrentRow.proofingNo" :code-no="'Proofing'" :function-type="'order'"></proofing-attribute>
  519. </el-tab-pane>
  520. <!-- 项目信息页签 -->
  521. <el-tab-pane label="项目信息" name="project_information">
  522. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  523. <el-row :gutter="20">
  524. <el-col :span="8">
  525. <div class="grid-content bg-purple">
  526. <el-form-item label="项目号">
  527. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  528. </el-form-item>
  529. </div>
  530. </el-col>
  531. <el-col :span="8">
  532. <div class="grid-content bg-purple">
  533. <el-form-item label="项目名称">
  534. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  535. </el-form-item>
  536. </div>
  537. </el-col>
  538. <el-col :span="8">
  539. <div class="grid-content bg-purple">
  540. <el-form-item label="项目类型">
  541. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  542. </el-form-item>
  543. </div>
  544. </el-col>
  545. </el-row>
  546. <el-row :gutter="20">
  547. <el-col :span="8">
  548. <div class="grid-content bg-purple">
  549. <el-form-item label="客户来源">
  550. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  551. </el-form-item>
  552. </div>
  553. </el-col>
  554. <el-col :span="8">
  555. <div class="grid-content bg-purple">
  556. <el-form-item label="优先级">
  557. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  558. </el-form-item>
  559. </div>
  560. </el-col>
  561. <el-col :span="8">
  562. <div class="grid-content bg-purple">
  563. <el-form-item label="终端客户">
  564. <el-input v-model="projectInformationData.finalCustomerName" readonly></el-input>
  565. </el-form-item>
  566. </div>
  567. </el-col>
  568. </el-row>
  569. <el-row :gutter="20">
  570. <el-col :span="8">
  571. <div class="grid-content bg-purple">
  572. <el-form-item label="项目经理">
  573. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  574. </el-form-item>
  575. </div>
  576. </el-col>
  577. <el-col :span="8">
  578. <div class="grid-content bg-purple">
  579. <el-form-item label="项目负责人">
  580. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  581. </el-form-item>
  582. </div>
  583. </el-col>
  584. <el-col :span="8">
  585. <div class="grid-content bg-purple">
  586. <el-form-item label="项目权限">
  587. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  588. </el-form-item>
  589. </div>
  590. </el-col>
  591. </el-row>
  592. <el-row :gutter="20">
  593. <el-col :span="6">
  594. <div class="grid-content bg-purple">
  595. <el-form-item label="创建时间">
  596. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  597. </el-form-item>
  598. </div>
  599. </el-col>
  600. <el-col :span="6">
  601. <div class="grid-content bg-purple">
  602. <el-form-item label="创建人">
  603. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  604. </el-form-item>
  605. </div>
  606. </el-col>
  607. <el-col :span="6">
  608. <div class="grid-content bg-purple">
  609. <el-form-item label="更新时间">
  610. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  611. </el-form-item>
  612. </div>
  613. </el-col>
  614. <el-col :span="6">
  615. <div class="grid-content bg-purple">
  616. <el-form-item label="更新人">
  617. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  618. </el-form-item>
  619. </div>
  620. </el-col>
  621. </el-row>
  622. <el-row :gutter="20">
  623. <el-col :span="24">
  624. <div class="grid-content bg-purple">
  625. <el-form-item label="项目描述">
  626. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  627. </el-form-item>
  628. </div>
  629. </el-col>
  630. </el-row>
  631. <el-row :gutter="20">
  632. <el-col :span="24">
  633. <div class="grid-content bg-purple">
  634. <el-form-item label="其它特殊要求">
  635. <el-input v-model="projectInformationData.remark" readonly></el-input>
  636. </el-form-item>
  637. </div>
  638. </el-col>
  639. </el-row>
  640. </el-form>
  641. </el-tab-pane>
  642. <!-- 客户信息页签 -->
  643. <el-tab-pane label="客户信息" name="customer_information">
  644. <customer-info :project="proofingCurrentRow"></customer-info>
  645. </el-tab-pane>
  646. <el-tab-pane label="附件信息" name="proofing_file">
  647. <oss-components label="打样单号" style="margin-top: 5px" height="28vh" :columns="ossColumns"
  648. :order-ref2="proofingCurrentRow.proofingNo"
  649. :order-ref1="proofingCurrentRow.site" :disabled="proofingCurrentRow.proofingStatus === '已完成'"></oss-components>
  650. </el-tab-pane>
  651. <!-- 审批信息 -->
  652. <el-tab-pane label="审批信息" name="approvalInformation">
  653. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="320"></approval-information>
  654. </el-tab-pane>
  655. </el-tabs>
  656. <!-- chooseList模态框 -->
  657. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  658. <!-- 客户地址 -->
  659. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  660. <el-table
  661. :height="300"
  662. :data="addressList"
  663. @row-dblclick="getAddressData"
  664. border
  665. style="width: 100%;">
  666. <el-table-column
  667. v-for="(item,index) in columnAddressList" :key="index"
  668. :sortable="item.columnSortable"
  669. :prop="item.columnProp"
  670. :header-align="item.headerAlign"
  671. :show-overflow-tooltip="item.showOverflowTooltip"
  672. :align="item.align"
  673. :fixed="item.fixed==''?false:item.fixed"
  674. :min-width="item.columnWidth"
  675. :label="item.columnLabel">
  676. <template slot-scope="scope">
  677. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  678. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  679. style="width: 100px; height: 80px"/></span>
  680. </template>
  681. </el-table-column>
  682. </el-table>
  683. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  684. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  685. </el-footer>
  686. </el-dialog>
  687. <!-- 联系人 -->
  688. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  689. <el-table
  690. :height="300"
  691. :data="contactList"
  692. @row-dblclick="getContactData"
  693. border
  694. style="width: 100%;">
  695. <el-table-column
  696. v-for="(item,index) in columnContactList" :key="index"
  697. :sortable="item.columnSortable"
  698. :prop="item.columnProp"
  699. :header-align="item.headerAlign"
  700. :show-overflow-tooltip="item.showOverflowTooltip"
  701. :align="item.align"
  702. :fixed="item.fixed==''?false:item.fixed"
  703. :min-width="item.columnWidth"
  704. :label="item.columnLabel">
  705. <template slot-scope="scope">
  706. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  707. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  708. style="width: 100px; height: 80px"/></span>
  709. </template>
  710. </el-table-column>
  711. </el-table>
  712. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  713. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  714. </el-footer>
  715. </el-dialog>
  716. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag
  717. :visible.sync="delegateAccessVisible" width="40vw">
  718. <el-form :inline="true" label-position="top" :model="proofingDelegateAccess">
  719. <el-form-item label="编码">
  720. <el-input v-model="proofingDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  721. </el-form-item>
  722. <el-form-item label="名称">
  723. <el-input v-model="proofingDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  724. </el-form-item>
  725. <el-form-item label=" ">
  726. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  727. </el-form-item>
  728. </el-form>
  729. <el-table v-if="delegateAccessVisible"
  730. :height="300"
  731. :data="baseDelegateAccessList"
  732. @selection-change="handleSelectionChange"
  733. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  734. ref="delegateAccesstTable"
  735. border
  736. style="width: 100%;">
  737. <el-table-column
  738. type="selection"
  739. header-align="center"
  740. align="center"
  741. width="50">
  742. </el-table-column>
  743. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  744. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  745. </el-table>
  746. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  747. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  748. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  749. </el-footer>
  750. </el-dialog>
  751. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="rejectVisible" width="500px">
  752. <el-form label-position="top">
  753. <el-form-item label="驳回意见" class="auto">
  754. <el-input type="textarea" v-model="rejectOpinion" :rows="3"></el-input>
  755. </el-form-item>
  756. </el-form>
  757. <el-footer style="text-align:center;height: 30px;line-height: 30px;">
  758. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  759. <el-button type="primary" @click="rejectVisible = false">取消</el-button>
  760. </el-footer>
  761. </el-dialog>
  762. <!-- 上传文件的modal -->
  763. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  764. </div>
  765. </template>
  766. <script>
  767. import {
  768. proofingInformationSearch, // 打样信息列表查询
  769. proofingInformationSave, // 打样信息新增
  770. proofingInformationEdit, // 打样信息编辑
  771. proofingInformationDelete, // 打样信息删除
  772. getFileContentList, // 获取打样单附件列表
  773. proofingResultSearch, // 获取打样结果对象
  774. deleteProofingFile, // 文件删除
  775. saveProofingResult, // 保存打样结果
  776. saveSubmitResult, // 保存送样结果
  777. saveCustomerResponse, // 保存客户回复
  778. getProjectPartList, // 获取产品列表
  779. getProjectInformation, // 获取项目信息
  780. getCustomerInformation, // 获取客户信息
  781. } from '@/api/proofing/proofingInformation.js'
  782. import {
  783. downLoadQuotationFile, // 文件下载
  784. searchProjectInfoList,
  785. } from '@/api/quotation/quotationInformation.js'
  786. import {
  787. customerAddressSearch, // 客户联系地址列表查询
  788. } from '@/api/customer/customerAddress.js'
  789. import {
  790. customerContactSearch, // 客户联系人列表查询
  791. } from '@/api/customer/customerContact.js'
  792. import Chooselist from '@/views/modules/common/Chooselist'
  793. import proofingUploadFile from "./proofing_upload_file"
  794. import DictDataSelect from "../sys/dict-data-select.vue";
  795. import {
  796. proofingInformationEditStatus, queryBuList,
  797. searchDelegateAccess,
  798. searchDelegateAccessByUser, submitChange
  799. } from "../../../api/proofing/proofingInformation";
  800. import {getNodeAuthority, getApprovalList} from "../../../api/changeManagement/changeManagement";
  801. import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue";
  802. import profingFile from "./profingFile"
  803. import proofingAttribute from "../demoComponents/orderProperties"
  804. import ApprovalInformation from "../changeManagement/approvalInformation.vue";
  805. import {queryCustomer} from "../../../api/customer/customerInformation";
  806. import {queryProjectByCustomer} from "../../../api/project/project";
  807. import OssComponents from "../oss/ossComponents.vue";
  808. import BuSelect from "../base/BuSelect.vue";
  809. import CustomerInfo from "../quotation/sellForQuotation/customerInfo.vue";
  810. export default {
  811. components: {
  812. CustomerInfo,
  813. BuSelect,
  814. OssComponents,
  815. ApprovalInformation,
  816. ProjectInfo
  817. , DictDataSelect
  818. , Chooselist
  819. , proofingUploadFile
  820. , profingFile
  821. , proofingAttribute
  822. },
  823. watch: {
  824. searchData: {
  825. deep: true,
  826. handler: function (newV, oldV) {
  827. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  828. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  829. }
  830. },
  831. 'modalData.proofingNo'(newV, oldV) {
  832. if (newV) {
  833. this.modalData.proofingNo = newV.toUpperCase()
  834. }
  835. },
  836. 'modalData.customerNo'(newV, oldV) {
  837. if (newV) {
  838. this.modalData.customerNo = newV.toUpperCase()
  839. }
  840. if (oldV) {
  841. if (!newV) {
  842. this.modalData.customerDesc = ''
  843. }
  844. this.modalData.projectId = ''
  845. this.modalData.consignee = ''
  846. this.modalData.consigneeContact = ''
  847. this.modalData.sendSamplesAddress = ''
  848. }
  849. },
  850. 'modalData.projectId'(newV, oldV) {
  851. if (newV) {
  852. this.modalData.projectId = newV.toUpperCase()
  853. }
  854. if (oldV) {
  855. if (!newV) {
  856. this.modalData.projectName = ''
  857. }
  858. this.modalData.testPartNo = ''
  859. this.modalData.partName = ''
  860. this.projectPartListSelections = [];
  861. this.projectPartList = [];
  862. this.$refs.projectPartTable.clearSelection();
  863. }
  864. },
  865. rejectVisible(newVal, oldVal) {
  866. if (newVal === false) {
  867. this.rejectOpinion = ''
  868. }
  869. },
  870. "searchData.proofingNo"(newVal, oldVal) {
  871. this.searchData.proofingNo = newVal.toUpperCase()
  872. },
  873. 'modalFlag'(newVal, oldVal){
  874. if (newVal === false){
  875. this.detailVisible = false
  876. this.projectPartData.finalPartNo = ''
  877. this.projectPartData.customerPartNo = ''
  878. this.no = 1
  879. this.size = 20
  880. this.total = 0
  881. this.projectPartList = []
  882. this.projectPartListSelections = []
  883. }
  884. },
  885. 'modalData.tracker'(newVal,oldVal){
  886. if (!newVal){
  887. this.modalData.trackerName = ''
  888. }
  889. },
  890. 'modalData.engineer'(newVal,oldVal){
  891. if (!newVal){
  892. this.modalData.engineerName = ''
  893. }
  894. },
  895. 'modalData.approver'(newVal,oldVal){
  896. if (!newVal){
  897. this.modalData.approverName = ''
  898. }
  899. },
  900. },
  901. computed: {
  902. delegateAccessName: {
  903. get() {
  904. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  905. },
  906. set(val) {
  907. }
  908. },
  909. columnFlagByHeader() {
  910. return (value) => {
  911. if (this.modalData.flag === '1') {
  912. return false
  913. }
  914. if (!this.columnFieldList1) {
  915. return true
  916. }
  917. let arr = this.columnFieldList1.filter(a => a.fieldId === value)
  918. if (arr.length > 0) {
  919. return arr[0].updateFlag === 'N'
  920. }
  921. return true
  922. }
  923. },
  924. columnFlagByDelegateAccess() {
  925. return (value) => {
  926. if (this.modalData.flag === '1') {
  927. return false
  928. }
  929. if (!this.columnFieldList2) {
  930. return true
  931. }
  932. let arr = this.columnFieldList2.filter(a => a.fieldId === value)
  933. if (arr.length > 0) {
  934. return arr[0].updateFlag === 'N'
  935. }
  936. return true
  937. }
  938. },
  939. },
  940. data() {
  941. return {
  942. approvalList: [],
  943. selectionDelegateAccess: [],
  944. selectionDelegateAccess2: [],
  945. delegateAccessVisible: false,
  946. baseDelegateAccessList: [],
  947. proofingDelegateAccess: {
  948. delegateAccess: '',
  949. delegateAccessName: '',
  950. },
  951. activeName: 'part',
  952. // 导出
  953. exportData: [],
  954. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  955. exportHeader: ['设备分类'],
  956. exportFooter: [],
  957. resultList: [],
  958. // ======== 行高 ========
  959. height: 300,
  960. secondHeight: 200,
  961. // ======== 分页 ========
  962. pageIndex: 1,
  963. pageSize: 50,
  964. totalPage: 0,
  965. selectedDataNum: 0,
  966. // 条件查询
  967. searchData: {
  968. site: this.$store.state.user.site,
  969. customerNo: '',
  970. customerDesc: '',
  971. trackerName: '',
  972. testPartNo: '',
  973. partName: '',
  974. proofingStatus: '',
  975. proofingResultStatus: '',
  976. startDate: '',
  977. endDate: '',
  978. projectId: '',
  979. projectName: '',
  980. engineerName: '',
  981. priorityLevel: '',
  982. proofingNo: '',
  983. customerPartNo: '',
  984. finalPartNo: '',
  985. page: 1,
  986. limit: 10,
  987. menuId: this.$route.meta.menuId,
  988. buNo: '',
  989. },
  990. // 其它
  991. dataListLoading: false,
  992. // 初始页签
  993. activeTable: 'attribute',
  994. // ======== 数据对象 ========
  995. modalData: {
  996. flag: '1',
  997. title: '打样新增',
  998. site: this.$store.state.user.site,
  999. proofingNo: '',
  1000. customerNo: '',
  1001. customerDesc: '',
  1002. projectId: '',
  1003. projectName: '',
  1004. tracker: '',
  1005. trackerName: '',
  1006. testPartNo: '',
  1007. partName: '',
  1008. engineer: '',
  1009. engineerName: '',
  1010. approver: '',
  1011. approverName: '',
  1012. priorityLevel: '',
  1013. proofingNumber: 1,
  1014. requiredDeliveryDate: '',
  1015. remark: '',
  1016. technicalConsiderations: '',
  1017. isNeedToSendSamples: '',
  1018. sendSamplesAddress: '',
  1019. consignee: '',
  1020. consigneeContact: '',
  1021. actualityDeliveryDate: '',
  1022. proofingResultInformation: '',
  1023. actualitySendSamplesDate: '',
  1024. sendSamplesMethod: '',
  1025. deliverGoodsInformation: '',
  1026. deliverGoodsRemark: '',
  1027. actualityReplyDate: '',
  1028. confirmResults: '',
  1029. confirmBy: '',
  1030. confirmInformation: '',
  1031. proofingStatus: '草稿',
  1032. proofingResultStatus: 'B',
  1033. nextToDo: '',
  1034. createDate: '',
  1035. createBy: '',
  1036. updateDate: '',
  1037. updateBy: '',
  1038. nodeConclusion: '',
  1039. stepId: '',
  1040. rejectFlag: '',
  1041. rejectStepId: '',
  1042. isReject: '',
  1043. nodeId: ''
  1044. },
  1045. proofingDetailData: {
  1046. technicalConsiderations: '',
  1047. isNeedToSendSamples: '',
  1048. sendSamplesAddress: '',
  1049. consignee: '',
  1050. consigneeContact: ''
  1051. },
  1052. proofingResultData: {
  1053. proofingResultStatus: '',
  1054. actualityDeliveryDate: '',
  1055. isNeedToSendSamples: '',
  1056. proofingResultInformation: '',
  1057. actualitySendSamplesDate: '',
  1058. sendSamplesMethod: '',
  1059. deliverGoodsInformation: '',
  1060. deliverGoodsRemark: '',
  1061. confirmResults: '',
  1062. actualityReplyDate: '',
  1063. confirmBy: '',
  1064. confirmInformation: ''
  1065. },
  1066. enterResultData: {
  1067. site: this.$store.state.user.site,
  1068. proofingNo: '',
  1069. actualityDeliveryDate: '',
  1070. proofingResultInformation: '',
  1071. updateBy: this.$store.state.user.name,
  1072. proofingResultStatus: '',
  1073. fileContentList: []
  1074. },
  1075. submitResultData: {
  1076. site: this.$store.state.user.site,
  1077. proofingNo: '',
  1078. actualitySendSamplesDate: '',
  1079. sendSamplesMethod: '',
  1080. deliverGoodsInformation: '',
  1081. deliverGoodsRemark: '',
  1082. updateBy: this.$store.state.user.name,
  1083. proofingResultStatus: ''
  1084. },
  1085. customerResponseData: {
  1086. site: this.$store.state.user.site,
  1087. proofingNo: '',
  1088. actualityReplyDate: '',
  1089. confirmResults: '',
  1090. confirmBy: '',
  1091. confirmInformation: '',
  1092. updateBy: this.$store.state.user.name,
  1093. proofingResultStatus: ''
  1094. },
  1095. projectPartData: {
  1096. site: this.$store.state.user.site,
  1097. testPartNo: '',
  1098. finalPartNo: '',
  1099. customerPartNo: '',
  1100. partName: ''
  1101. },
  1102. projectInformationData: {
  1103. projectId: '',
  1104. projectName: '',
  1105. projectType: '',
  1106. projectSourceDesc: '',
  1107. priorityDesc: '',
  1108. status: '',
  1109. projectDesc: '',
  1110. projectManagerName: '',
  1111. projectOwnerName: '',
  1112. userRoleName: '',
  1113. remark: ''
  1114. },
  1115. customerInformationData: {
  1116. customerNo: '',
  1117. customerDesc: '',
  1118. importantCustomer: '',
  1119. customerCurrency: '',
  1120. turnoverOfYear: '',
  1121. potentialRevenueOfYear: '',
  1122. customerStatus: '',
  1123. customerIndustry: '',
  1124. companyName: '',
  1125. jobDescription: '',
  1126. customerDescription: '',
  1127. contactName: '',
  1128. contactPhoneNumber1: '',
  1129. position: '',
  1130. addressName: '',
  1131. addressType: '',
  1132. createDate: '',
  1133. createBy: '',
  1134. updateDate: '',
  1135. updateBy: ''
  1136. },
  1137. // ======== 数据列表 ========
  1138. dataList: [],
  1139. fileContentList: [],
  1140. projectPartList: [],
  1141. addressList: [],
  1142. contactList: [],
  1143. // ======== 列表表头 ========
  1144. columnList: [
  1145. {
  1146. userId: this.$store.state.user.name,
  1147. functionId: 103001,
  1148. serialNumber: '103001Table1BuDesc',
  1149. tableId: '103001Table1',
  1150. tableName: '打样信息表',
  1151. columnProp: 'buDesc',
  1152. headerAlign: 'center',
  1153. align: 'center',
  1154. columnLabel: 'BU',
  1155. columnHidden: false,
  1156. columnImage: false,
  1157. columnSortable: false,
  1158. sortLv: 0,
  1159. status: true,
  1160. fixed: '',
  1161. columnWidth: 80
  1162. },
  1163. {
  1164. userId: this.$store.state.user.name,
  1165. functionId: 103001,
  1166. serialNumber: '103001Table1ProofingNo',
  1167. tableId: '103001Table1',
  1168. tableName: '打样信息表',
  1169. columnProp: 'proofingNo',
  1170. headerAlign: 'center',
  1171. align: 'center',
  1172. columnLabel: '打样单号',
  1173. columnHidden: false,
  1174. columnImage: false,
  1175. columnSortable: false,
  1176. sortLv: 0,
  1177. status: true,
  1178. fixed: '',
  1179. columnWidth: 120
  1180. },
  1181. {
  1182. userId: this.$store.state.user.name,
  1183. functionId: 103001,
  1184. serialNumber: '103001Table1CustomerNo',
  1185. tableId: '103001Table1',
  1186. tableName: '打样信息表',
  1187. columnProp: 'customerNo',
  1188. headerAlign: 'center',
  1189. align: 'center',
  1190. columnLabel: '客户编码',
  1191. columnHidden: false,
  1192. columnImage: false,
  1193. columnSortable: false,
  1194. sortLv: 0,
  1195. status: true,
  1196. fixed: '',
  1197. columnWidth: 100
  1198. },
  1199. {
  1200. userId: this.$store.state.user.name,
  1201. functionId: 103001,
  1202. serialNumber: '103001Table1CustomerDesc',
  1203. tableId: '103001Table1',
  1204. tableName: '打样信息表',
  1205. columnProp: 'customerDesc',
  1206. headerAlign: 'center',
  1207. align: 'left',
  1208. columnLabel: '客户名称',
  1209. columnHidden: false,
  1210. columnImage: false,
  1211. columnSortable: false,
  1212. sortLv: 0,
  1213. status: true,
  1214. fixed: '',
  1215. columnWidth: 120
  1216. },
  1217. {
  1218. userId: this.$store.state.user.name,
  1219. functionId: 103001,
  1220. serialNumber: '103001Table1ProjectId',
  1221. tableId: '103001Table1',
  1222. tableName: '打样信息表',
  1223. columnProp: 'projectId',
  1224. headerAlign: 'center',
  1225. align: 'center',
  1226. columnLabel: '项目编码',
  1227. columnHidden: false,
  1228. columnImage: false,
  1229. columnSortable: false,
  1230. sortLv: 0,
  1231. status: true,
  1232. fixed: '',
  1233. columnWidth: 110
  1234. },
  1235. {
  1236. userId: this.$store.state.user.name,
  1237. functionId: 103001,
  1238. serialNumber: '103001Table1ProjectName',
  1239. tableId: '103001Table1',
  1240. tableName: '打样信息表',
  1241. columnProp: 'projectName',
  1242. headerAlign: 'center',
  1243. align: 'left',
  1244. columnLabel: '项目名称',
  1245. columnHidden: false,
  1246. columnImage: false,
  1247. columnSortable: false,
  1248. sortLv: 0,
  1249. status: true,
  1250. fixed: '',
  1251. columnWidth: 120
  1252. },
  1253. {
  1254. userId: this.$store.state.user.name,
  1255. functionId: 103001,
  1256. serialNumber: '103001Table1TestPartNo',
  1257. tableId: '103001Table1',
  1258. tableName: '打样信息表',
  1259. columnProp: 'testPartNo',
  1260. headerAlign: 'center',
  1261. align: 'left',
  1262. columnLabel: '物料编码',
  1263. columnHidden: false,
  1264. columnImage: false,
  1265. columnSortable: false,
  1266. sortLv: 0,
  1267. status: true,
  1268. fixed: '',
  1269. columnWidth: 150
  1270. },
  1271. {
  1272. userId: this.$store.state.user.name,
  1273. functionId: 103001,
  1274. serialNumber: '103001Table1PartName',
  1275. tableId: '103001Table1',
  1276. tableName: '打样信息表',
  1277. columnProp: 'partName',
  1278. headerAlign: 'center',
  1279. align: 'left',
  1280. columnLabel: '物料名称',
  1281. columnHidden: false,
  1282. columnImage: false,
  1283. columnSortable: false,
  1284. sortLv: 0,
  1285. status: true,
  1286. fixed: '',
  1287. columnWidth: 100
  1288. },
  1289. {
  1290. userId: this.$store.state.user.name,
  1291. functionId: 103001,
  1292. serialNumber: '103001Table1FinalPartNo',
  1293. tableId: '103001Table1',
  1294. tableName: '打样信息表',
  1295. columnProp: 'finalPartNo',
  1296. headerAlign: 'center',
  1297. align: 'left',
  1298. columnLabel: 'IFS物料编码',
  1299. columnHidden: false,
  1300. columnImage: false,
  1301. columnSortable: false,
  1302. sortLv: 0,
  1303. status: true,
  1304. fixed: '',
  1305. columnWidth: 100
  1306. },
  1307. {
  1308. userId: this.$store.state.user.name,
  1309. functionId: 103001,
  1310. serialNumber: '103001Table1CustomerPartNo',
  1311. tableId: '103001Table1',
  1312. tableName: '打样信息表',
  1313. columnProp: 'customerPartNo',
  1314. headerAlign: 'center',
  1315. align: 'left',
  1316. columnLabel: '客户物料编码',
  1317. columnHidden: false,
  1318. columnImage: false,
  1319. columnSortable: false,
  1320. sortLv: 0,
  1321. status: true,
  1322. fixed: '',
  1323. columnWidth: 100
  1324. },
  1325. {
  1326. userId: this.$store.state.user.name,
  1327. functionId: 103001,
  1328. serialNumber: '103001Table1TrackerName',
  1329. tableId: '103001Table1',
  1330. tableName: '打样信息表',
  1331. columnProp: 'trackerName',
  1332. headerAlign: 'center',
  1333. align: 'center',
  1334. columnLabel: 'CS',
  1335. columnHidden: false,
  1336. columnImage: false,
  1337. columnSortable: false,
  1338. sortLv: 0,
  1339. status: true,
  1340. fixed: '',
  1341. columnWidth: 80
  1342. },
  1343. {
  1344. userId: this.$store.state.user.name,
  1345. functionId: 103001,
  1346. serialNumber: '103001Table1EngineerName',
  1347. tableId: '103001Table1',
  1348. tableName: '打样信息表',
  1349. columnProp: 'engineerName',
  1350. headerAlign: 'center',
  1351. align: 'center',
  1352. columnLabel: 'NPI工程师',
  1353. columnHidden: false,
  1354. columnImage: false,
  1355. columnSortable: false,
  1356. sortLv: 0,
  1357. status: true,
  1358. fixed: '',
  1359. columnWidth: 80
  1360. },
  1361. {
  1362. userId: this.$store.state.user.name,
  1363. functionId: 103001,
  1364. serialNumber: '103001Table1EngineerName',
  1365. tableId: '103001Table1',
  1366. tableName: '打样信息表',
  1367. columnProp: 'approverName',
  1368. headerAlign: 'center',
  1369. align: 'center',
  1370. columnLabel: 'Approver',
  1371. columnHidden: false,
  1372. columnImage: false,
  1373. columnSortable: false,
  1374. sortLv: 0,
  1375. status: true,
  1376. fixed: '',
  1377. columnWidth: 80
  1378. },
  1379. {
  1380. userId: this.$store.state.user.name,
  1381. functionId: 103001,
  1382. serialNumber: '103001Table1PriorityLevel',
  1383. tableId: '103001Table1',
  1384. tableName: '打样信息表',
  1385. columnProp: 'priorityLevel',
  1386. headerAlign: 'center',
  1387. align: 'center',
  1388. columnLabel: '优先等级',
  1389. columnHidden: false,
  1390. columnImage: false,
  1391. columnSortable: false,
  1392. sortLv: 0,
  1393. status: true,
  1394. fixed: '',
  1395. columnWidth: 80
  1396. },
  1397. {
  1398. userId: this.$store.state.user.name,
  1399. functionId: 103001,
  1400. serialNumber: '103001Table1ProofingNumber',
  1401. tableId: '103001Table1',
  1402. tableName: '打样信息表',
  1403. columnProp: 'proofingNumber',
  1404. headerAlign: 'center',
  1405. align: 'right',
  1406. columnLabel: '打样数量',
  1407. columnHidden: false,
  1408. columnImage: false,
  1409. columnSortable: false,
  1410. sortLv: 0,
  1411. status: true,
  1412. fixed: '',
  1413. columnWidth: 80
  1414. },
  1415. {
  1416. userId: this.$store.state.user.name,
  1417. functionId: 103001,
  1418. serialNumber: '103001Table1RequiredDeliveryDate',
  1419. tableId: '103001Table1',
  1420. tableName: '打样信息表',
  1421. columnProp: 'requiredDeliveryDate',
  1422. headerAlign: 'center',
  1423. align: 'center',
  1424. columnLabel: '要求交付日期',
  1425. columnHidden: false,
  1426. columnImage: false,
  1427. columnSortable: false,
  1428. sortLv: 0,
  1429. status: true,
  1430. fixed: '',
  1431. columnWidth: 160
  1432. },
  1433. {
  1434. userId: this.$store.state.user.name,
  1435. functionId: 103001,
  1436. serialNumber: '103001Table1ProofingStatus',
  1437. tableId: '103001Table1',
  1438. tableName: '打样信息表',
  1439. columnProp: 'proofingStatus',
  1440. headerAlign: 'center',
  1441. align: 'left',
  1442. columnLabel: '状态',
  1443. columnHidden: false,
  1444. columnImage: false,
  1445. columnSortable: false,
  1446. sortLv: 0,
  1447. status: true,
  1448. fixed: '',
  1449. columnWidth: 80
  1450. },
  1451. {
  1452. userId: this.$store.state.user.name,
  1453. functionId: 103001,
  1454. serialNumber: '103001Table1NodeName',
  1455. tableId: '103001Table1',
  1456. tableName: '打样信息表',
  1457. columnProp: 'nodeName',
  1458. headerAlign: 'center',
  1459. align: 'left',
  1460. columnLabel: '当前节点',
  1461. columnHidden: false,
  1462. columnImage: false,
  1463. columnSortable: false,
  1464. sortLv: 0,
  1465. status: true,
  1466. fixed: '',
  1467. columnWidth: 150
  1468. },
  1469. {
  1470. userId: this.$store.state.user.name,
  1471. functionId: 103001,
  1472. serialNumber: '103001Table1CreateDate',
  1473. tableId: '103001Table1',
  1474. tableName: '打样信息表',
  1475. columnProp: 'createDate',
  1476. headerAlign: 'center',
  1477. align: 'center',
  1478. columnLabel: '创建时间',
  1479. columnHidden: false,
  1480. columnImage: false,
  1481. columnSortable: false,
  1482. sortLv: 0,
  1483. status: true,
  1484. fixed: '',
  1485. columnWidth: 160
  1486. },
  1487. {
  1488. userId: this.$store.state.user.name,
  1489. functionId: 103001,
  1490. serialNumber: '103001Table1CreateBy',
  1491. tableId: '103001Table1',
  1492. tableName: '打样信息表',
  1493. columnProp: 'createBy',
  1494. headerAlign: 'center',
  1495. align: 'center',
  1496. columnLabel: '创建人',
  1497. columnHidden: false,
  1498. columnImage: false,
  1499. columnSortable: false,
  1500. sortLv: 0,
  1501. status: true,
  1502. fixed: '',
  1503. columnWidth: 80
  1504. },
  1505. {
  1506. userId: this.$store.state.user.name,
  1507. functionId: 103001,
  1508. serialNumber: '103001Table1UpdateDate',
  1509. tableId: '103001Table1',
  1510. tableName: '打样信息表',
  1511. columnProp: 'updateDate',
  1512. headerAlign: 'center',
  1513. align: 'center',
  1514. columnLabel: '更新时间',
  1515. columnHidden: false,
  1516. columnImage: false,
  1517. columnSortable: false,
  1518. sortLv: 0,
  1519. status: true,
  1520. fixed: '',
  1521. columnWidth: 160
  1522. },
  1523. {
  1524. userId: this.$store.state.user.name,
  1525. functionId: 103001,
  1526. serialNumber: '103001Table1UpdateBy',
  1527. tableId: '103001Table1',
  1528. tableName: '打样信息表',
  1529. columnProp: 'updateBy',
  1530. headerAlign: 'center',
  1531. align: 'center',
  1532. columnLabel: '更新人',
  1533. columnHidden: false,
  1534. columnImage: false,
  1535. columnSortable: false,
  1536. sortLv: 0,
  1537. status: true,
  1538. fixed: '',
  1539. columnWidth: 80
  1540. }
  1541. ],
  1542. fileColumnList: [
  1543. {
  1544. userId: this.$store.state.user.name,
  1545. functionId: 103001,
  1546. serialNumber: '103001Table2FileName',
  1547. tableId: '103001Table2',
  1548. tableName: '文件信息表',
  1549. columnProp: 'fileName',
  1550. headerAlign: 'center',
  1551. align: 'center',
  1552. columnLabel: '文件名称',
  1553. columnHidden: false,
  1554. columnImage: false,
  1555. columnSortable: false,
  1556. sortLv: 0,
  1557. status: true,
  1558. fixed: '',
  1559. columnWidth: 140
  1560. },
  1561. {
  1562. userId: this.$store.state.user.name,
  1563. functionId: 103001,
  1564. serialNumber: '103001Table2FileRemark',
  1565. tableId: '103001Table2',
  1566. tableName: '文件信息表',
  1567. columnProp: 'fileRemark',
  1568. headerAlign: 'center',
  1569. align: 'center',
  1570. columnLabel: '备注',
  1571. columnHidden: false,
  1572. columnImage: false,
  1573. columnSortable: false,
  1574. sortLv: 0,
  1575. status: true,
  1576. fixed: '',
  1577. columnWidth: 240
  1578. },
  1579. // {
  1580. // userId: this.$store.state.user.name,
  1581. // functionId: 103001,
  1582. // serialNumber: '103001Table2OrderRef3',
  1583. // tableId: '103001Table2',
  1584. // tableName: '文件信息表',
  1585. // columnProp: 'orderRef3',
  1586. // headerAlign: 'center',
  1587. // align: 'center',
  1588. // columnLabel: '文件描述',
  1589. // columnHidden: false,
  1590. // columnImage: false,
  1591. // columnSortable: false,
  1592. // sortLv: 0,
  1593. // status: true,
  1594. // fixed: '',
  1595. // columnWidth: 120
  1596. // },
  1597. {
  1598. userId: this.$store.state.user.name,
  1599. functionId: 103001,
  1600. serialNumber: '103001Table2CreateDate',
  1601. tableId: '103001Table2',
  1602. tableName: '文件信息表',
  1603. columnProp: 'createDate',
  1604. headerAlign: 'center',
  1605. align: 'center',
  1606. columnLabel: '上传时间',
  1607. columnHidden: false,
  1608. columnImage: false,
  1609. columnSortable: false,
  1610. sortLv: 0,
  1611. status: true,
  1612. fixed: '',
  1613. columnWidth: 140
  1614. },
  1615. {
  1616. userId: this.$store.state.user.name,
  1617. functionId: 103001,
  1618. serialNumber: '103001Table2CreatedBy',
  1619. tableId: '103001Table2',
  1620. tableName: '文件信息表',
  1621. columnProp: 'createdBy',
  1622. headerAlign: 'center',
  1623. align: 'center',
  1624. columnLabel: '上传人',
  1625. columnHidden: false,
  1626. columnImage: false,
  1627. columnSortable: false,
  1628. sortLv: 0,
  1629. status: true,
  1630. fixed: '',
  1631. columnWidth: 140
  1632. }
  1633. ],
  1634. projectPartDetailList: [
  1635. {
  1636. userId: this.$store.state.user.name,
  1637. functionId: 102001,
  1638. serialNumber: '103001Table4TestPartNo',
  1639. tableId: '103001Table4',
  1640. tableName: '项目物料表',
  1641. columnProp: 'testPartNo',
  1642. headerAlign: 'center',
  1643. align: 'left',
  1644. columnLabel: '物料编码',
  1645. columnHidden: false,
  1646. columnImage: false,
  1647. columnSortable: false,
  1648. sortLv: 0,
  1649. status: true,
  1650. fixed: '',
  1651. columnWidth: 150
  1652. },
  1653. {
  1654. userId: this.$store.state.user.name,
  1655. functionId: 102001,
  1656. serialNumber: '103001Table4PartDesc',
  1657. tableId: '103001Table4',
  1658. tableName: '项目物料表',
  1659. columnProp: 'partDesc',
  1660. headerAlign: 'center',
  1661. align: 'left',
  1662. columnLabel: '物料名称',
  1663. columnHidden: false,
  1664. columnImage: false,
  1665. columnSortable: false,
  1666. sortLv: 0,
  1667. status: true,
  1668. fixed: '',
  1669. columnWidth: 120
  1670. },
  1671. {
  1672. userId: this.$store.state.user.name,
  1673. functionId: 102001,
  1674. serialNumber: '103001Table4FinalPartNo',
  1675. tableId: '103001Table4',
  1676. tableName: '项目物料表',
  1677. columnProp: 'finalPartNo',
  1678. headerAlign: 'center',
  1679. align: 'left',
  1680. columnLabel: 'IFS料号',
  1681. columnHidden: false,
  1682. columnImage: false,
  1683. columnSortable: false,
  1684. sortLv: 0,
  1685. status: true,
  1686. fixed: '',
  1687. columnWidth: 120
  1688. },
  1689. {
  1690. userId: this.$store.state.user.name,
  1691. functionId: 102001,
  1692. serialNumber: '103001Table4CustomerPartNo',
  1693. tableId: '103001Table4',
  1694. tableName: '项目物料表',
  1695. columnProp: 'customerPartNo',
  1696. headerAlign: 'center',
  1697. align: 'left',
  1698. columnLabel: '客户料号',
  1699. columnHidden: false,
  1700. columnImage: false,
  1701. columnSortable: false,
  1702. sortLv: 0,
  1703. status: true,
  1704. fixed: '',
  1705. columnWidth: 120
  1706. },
  1707. {
  1708. userId: this.$store.state.user.name,
  1709. functionId: 102001,
  1710. serialNumber: '103001Table4PartSpec',
  1711. tableId: '103001Table4',
  1712. tableName: '项目物料表',
  1713. columnProp: 'partSpec',
  1714. headerAlign: 'center',
  1715. align: 'center',
  1716. columnLabel: '产品规格',
  1717. columnHidden: false,
  1718. columnImage: false,
  1719. columnSortable: false,
  1720. sortLv: 0,
  1721. status: true,
  1722. fixed: '',
  1723. columnWidth: 120
  1724. }, {
  1725. userId: this.$store.state.user.name,
  1726. functionId: 102001,
  1727. serialNumber: '103001Table4PartTypeDesc',
  1728. tableId: '103001Table4',
  1729. tableName: '项目物料表',
  1730. columnProp: 'partTypeDesc',
  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: 120
  1741. },
  1742. {
  1743. userId: this.$store.state.user.name,
  1744. functionId: 102001,
  1745. serialNumber: '103001Table4Type',
  1746. tableId: '103001Table4',
  1747. tableName: '项目物料表',
  1748. columnProp: 'type',
  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: 120
  1759. },
  1760. {
  1761. userId: this.$store.state.user.name,
  1762. functionId: 102001,
  1763. serialNumber: '103001Table4UmId',
  1764. tableId: '103001Table4',
  1765. tableName: '项目物料表',
  1766. columnProp: 'umId',
  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: 100
  1777. },
  1778. ],
  1779. columnAddressList: [
  1780. {
  1781. userId: this.$store.state.user.name,
  1782. functionId: 103001,
  1783. serialNumber: '103001Table4AddressName',
  1784. tableId: '103001Table4',
  1785. tableName: '联系地址表',
  1786. columnProp: 'addressName',
  1787. headerAlign: 'center',
  1788. align: 'center',
  1789. columnLabel: '联系地址',
  1790. columnHidden: false,
  1791. columnImage: false,
  1792. status: true,
  1793. fixed: '',
  1794. },
  1795. {
  1796. userId: this.$store.state.user.name,
  1797. functionId: 103001,
  1798. serialNumber: '103001Table4ContactStatus',
  1799. tableId: '103001Table4',
  1800. tableName: '联系地址表',
  1801. columnProp: 'addressStatus',
  1802. headerAlign: 'center',
  1803. align: 'center',
  1804. columnLabel: '地址状态',
  1805. columnHidden: false,
  1806. columnImage: false,
  1807. status: true,
  1808. fixed: '',
  1809. },
  1810. ],
  1811. columnContactList: [
  1812. {
  1813. userId: this.$store.state.user.name,
  1814. functionId: 103001,
  1815. serialNumber: '103001Table5ContactName',
  1816. tableId: '103001Table5',
  1817. tableName: '客户联系人表',
  1818. columnProp: 'contactName',
  1819. headerAlign: 'center',
  1820. align: 'center',
  1821. columnLabel: '客户负责人',
  1822. columnHidden: false,
  1823. columnImage: false,
  1824. status: true,
  1825. fixed: '',
  1826. },
  1827. {
  1828. userId: this.$store.state.user.name,
  1829. functionId: 103001,
  1830. serialNumber: '103001Table5ContactPhoneNumber1',
  1831. tableId: '103001Table5',
  1832. tableName: '客户联系人表',
  1833. columnProp: 'contactPhoneNumber1',
  1834. headerAlign: 'center',
  1835. align: 'center',
  1836. columnLabel: '联系方式',
  1837. columnHidden: false,
  1838. columnImage: false,
  1839. status: true,
  1840. fixed: '',
  1841. },
  1842. {
  1843. userId: this.$store.state.user.name,
  1844. functionId: 103001,
  1845. serialNumber: '103001Table5PrimaryContact',
  1846. tableId: '103001Table5',
  1847. tableName: '客户联系人表',
  1848. columnProp: 'primaryContact',
  1849. headerAlign: 'center',
  1850. align: 'center',
  1851. columnLabel: '默认联系人',
  1852. columnHidden: false,
  1853. columnImage: false,
  1854. status: true,
  1855. fixed: '',
  1856. },
  1857. {
  1858. userId: this.$store.state.user.name,
  1859. functionId: 103001,
  1860. serialNumber: '103001Table5ContactStatus',
  1861. tableId: '103001Table5',
  1862. tableName: '客户联系人表',
  1863. columnProp: 'contactStatus',
  1864. headerAlign: 'center',
  1865. align: 'center',
  1866. columnLabel: '人员状态',
  1867. columnHidden: false,
  1868. columnImage: false,
  1869. status: true,
  1870. fixed: '',
  1871. },
  1872. ],
  1873. // ======== 必填规则 ========
  1874. rules: {
  1875. customerNo: [
  1876. {
  1877. required: true,
  1878. message: '客户编码不能为空',
  1879. trigger: ['change', 'blur']
  1880. }
  1881. ],
  1882. trackerName: [
  1883. {
  1884. required: true,
  1885. message: 'CS不能为空',
  1886. trigger: ['change', 'blur']
  1887. }
  1888. ],
  1889. proofingNumber: [
  1890. {
  1891. required: true,
  1892. message: '打印数量不能为空',
  1893. trigger: ['change', 'blur']
  1894. }
  1895. ],
  1896. projectId: [
  1897. {
  1898. required: true,
  1899. message: '项目编码不能为空',
  1900. trigger: ['change', 'blur']
  1901. }
  1902. ],
  1903. engineerName: [
  1904. {
  1905. required: true,
  1906. message: 'NPI工程师不能为空',
  1907. trigger: ['change', 'blur']
  1908. }
  1909. ],
  1910. priorityLevel: [
  1911. {
  1912. required: true,
  1913. message: '优先等级不能为空',
  1914. trigger: ['change', 'blur']
  1915. }
  1916. ],
  1917. requiredDeliveryDate: [
  1918. {
  1919. required: true,
  1920. message: '要求交付日期不能为空',
  1921. trigger: ['change', 'blur']
  1922. }
  1923. ]
  1924. },
  1925. enterResultRules: {
  1926. actualityDeliveryDate: [
  1927. {
  1928. required: true,
  1929. message: ' ',
  1930. trigger: 'change'
  1931. }
  1932. ],
  1933. proofingResultInformation: [
  1934. {
  1935. required: true,
  1936. message: ' ',
  1937. trigger: 'change'
  1938. }
  1939. ]
  1940. },
  1941. submitResultRules: {
  1942. actualitySendSamplesDate: [
  1943. {
  1944. required: true,
  1945. message: ' ',
  1946. trigger: 'change'
  1947. }
  1948. ],
  1949. sendSamplesMethod: [
  1950. {
  1951. required: true,
  1952. message: ' ',
  1953. trigger: 'change'
  1954. }
  1955. ]
  1956. },
  1957. customerResponseRules: {
  1958. actualityReplyDate: [
  1959. {
  1960. required: true,
  1961. message: ' ',
  1962. trigger: 'change'
  1963. }
  1964. ],
  1965. confirmResults: [
  1966. {
  1967. required: true,
  1968. message: ' ',
  1969. trigger: 'change'
  1970. }
  1971. ],
  1972. confirmBy: [
  1973. {
  1974. required: true,
  1975. message: ' ',
  1976. trigger: 'change'
  1977. }
  1978. ]
  1979. },
  1980. // ======== 复选数据集 ========
  1981. proofingSelections: [],
  1982. projectPartListSelections: [],
  1983. // ======== 选中的当前行数据 ========
  1984. proofingCurrentRow: {},
  1985. // ======== 模态框开关控制 ========
  1986. modalFlag: false,
  1987. modalDisableFlag: false,
  1988. enterResultModalFlag: false,
  1989. submitResultModalFlag: false,
  1990. customerResponseModalFlag: false,
  1991. // 选择项目弹框开关
  1992. chooseProjectListFlag: false,
  1993. //项目搜索条件
  1994. searchProjectData: {
  1995. site: this.$store.state.user.site,
  1996. projectId: undefined,
  1997. projectName: undefined,
  1998. customerId: undefined,
  1999. },
  2000. // 项目集合
  2001. projectList: [],
  2002. addressModelFlag: false,
  2003. contactModelFlag: false,
  2004. columnFieldList1: [],
  2005. columnFieldList2: [],
  2006. ossColumns: [
  2007. {
  2008. userId: this.$store.state.user.name,
  2009. functionId: 103001,
  2010. serialNumber: '103001Table2FileName',
  2011. tableId: '103001Table2',
  2012. tableName: '文件信息表',
  2013. columnProp: 'fileName',
  2014. headerAlign: 'center',
  2015. align: 'center',
  2016. columnLabel: '文件名称',
  2017. columnHidden: false,
  2018. columnImage: false,
  2019. columnSortable: false,
  2020. sortLv: 0,
  2021. status: true,
  2022. fixed: '',
  2023. columnWidth: 140
  2024. },
  2025. {
  2026. userId: this.$store.state.user.name,
  2027. functionId: 103001,
  2028. serialNumber: '103001Table2FileRemark',
  2029. tableId: '103001Table2',
  2030. tableName: '文件信息表',
  2031. columnProp: 'fileRemark',
  2032. headerAlign: 'center',
  2033. align: 'center',
  2034. columnLabel: '备注',
  2035. columnHidden: false,
  2036. columnImage: false,
  2037. columnSortable: false,
  2038. sortLv: 0,
  2039. status: true,
  2040. fixed: '',
  2041. columnWidth: 240
  2042. },
  2043. // {
  2044. // userId: this.$store.state.user.name,
  2045. // functionId: 103001,
  2046. // serialNumber: '103001Table2OrderRef3',
  2047. // tableId: '103001Table2',
  2048. // tableName: '文件信息表',
  2049. // columnProp: 'orderRef3',
  2050. // headerAlign: 'center',
  2051. // align: 'center',
  2052. // columnLabel: '文件描述',
  2053. // columnHidden: false,
  2054. // columnImage: false,
  2055. // columnSortable: false,
  2056. // sortLv: 0,
  2057. // status: true,
  2058. // fixed: '',
  2059. // columnWidth: 120
  2060. // },
  2061. {
  2062. userId: this.$store.state.user.name,
  2063. functionId: 103001,
  2064. serialNumber: '103001Table2CreateDate',
  2065. tableId: '103001Table2',
  2066. tableName: '文件信息表',
  2067. columnProp: 'createDate',
  2068. headerAlign: 'center',
  2069. align: 'center',
  2070. columnLabel: '上传时间',
  2071. columnHidden: false,
  2072. columnImage: false,
  2073. columnSortable: false,
  2074. sortLv: 0,
  2075. status: true,
  2076. fixed: '',
  2077. columnWidth: 140
  2078. },
  2079. {
  2080. userId: this.$store.state.user.name,
  2081. functionId: 103001,
  2082. serialNumber: '103001Table2CreatedBy',
  2083. tableId: '103001Table2',
  2084. tableName: '文件信息表',
  2085. columnProp: 'createBy',
  2086. headerAlign: 'center',
  2087. align: 'center',
  2088. columnLabel: '上传人',
  2089. columnHidden: false,
  2090. columnImage: false,
  2091. columnSortable: false,
  2092. sortLv: 0,
  2093. status: true,
  2094. fixed: '',
  2095. columnWidth: 140
  2096. }
  2097. ],
  2098. rejectVisible: false,
  2099. rejectOpinion: '',
  2100. detailVisible:false,
  2101. no:1,
  2102. size:20,
  2103. total:0,
  2104. queryLoading:false,
  2105. }
  2106. },
  2107. mounted() {
  2108. this.$nextTick(() => {
  2109. this.height = window.innerHeight / 2 - 100;
  2110. /*第二个表格高度的动态调整*/
  2111. this.secondHeight = window.innerHeight / 2 - 206;
  2112. })
  2113. },
  2114. created() {
  2115. this.handleRouteQuery();
  2116. },
  2117. activated() {
  2118. this.handleRouteQuery();
  2119. },
  2120. methods: {
  2121. handleRouteQuery() {
  2122. if (this.$route.params.type === 'tokenLogin') {
  2123. let params = {
  2124. site: this.$route.params.site,
  2125. proofingNo: this.$route.params.docNo,
  2126. limit: this.pageSize,
  2127. createBy: this.$store.state.user.name,
  2128. page: 1,
  2129. }
  2130. this.dataListLoading = true
  2131. proofingInformationSearch(params).then(({data}) => {
  2132. if (data && data.code === 0) {
  2133. this.dataList = data.page.list
  2134. this.totalPage = data.page.totalCount
  2135. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2136. // 判断是否全部存在数据
  2137. if (this.totalPage > 0) {
  2138. //设置选中行
  2139. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2140. //加载当前的页签的table
  2141. this.refreshCurrentTabTable()
  2142. this.proofingClickRow(this.dataList[0])
  2143. this.updateModal(this.dataList[0])
  2144. } else {
  2145. //设置选中行
  2146. this.$refs.proofingTable.setCurrentRow({})
  2147. // 加载当前的页签的table
  2148. this.refreshCurrentTabTable()
  2149. this.testClickRow({})
  2150. }
  2151. }
  2152. this.dataListLoading = false
  2153. })
  2154. } else if (this.$route.params.proofingNo) {
  2155. this.searchData.proofingNo = this.$route.params.proofingNo
  2156. this.getDataList();
  2157. setTimeout(() => {
  2158. this.searchData.proofingNo = ''
  2159. }, 200)
  2160. } else {
  2161. this.getDataList();
  2162. }
  2163. },
  2164. // ======== 分页相关方法 ========
  2165. /**
  2166. * 每页数
  2167. * @param val
  2168. */
  2169. sizeChangeHandle(val) {
  2170. this.pageSize = val
  2171. this.pageIndex = 1
  2172. this.getDataList()
  2173. },
  2174. /**
  2175. * 当前页
  2176. * @param val
  2177. */
  2178. currentChangeHandle(val) {
  2179. this.pageIndex = val
  2180. this.getDataList()
  2181. },
  2182. // ======== 复选框操作相关方法 ========
  2183. /**
  2184. * 选中一行
  2185. * @param row
  2186. */
  2187. projectPartClickRow(row) {
  2188. if (this.modalData.flag === '1') {
  2189. this.$refs.projectPartTable.toggleRowSelection(row);
  2190. this.confirmProjectPart();
  2191. }
  2192. },
  2193. /**
  2194. * 多选
  2195. * @param val
  2196. */
  2197. selectionProjectPart(val) {
  2198. this.projectPartListSelections = val
  2199. },
  2200. /**
  2201. * 获取唯一值一般都为 id
  2202. * @param row
  2203. * @returns {*}
  2204. */
  2205. getRowKeys(row) {
  2206. return row.testPartNo;
  2207. },
  2208. /**
  2209. * 未知
  2210. * @returns {boolean}
  2211. */
  2212. selectFlag() {
  2213. return true;
  2214. },
  2215. // ======== 页签切换相关方法 ========
  2216. /**
  2217. * 列表表格选择替换
  2218. * @param tab
  2219. * @param event
  2220. */
  2221. tabClick(tab, event) {
  2222. // 刷新列表数据
  2223. this.refreshCurrentTabTable()
  2224. },
  2225. /**
  2226. * 当前值发生变化的时候修改
  2227. * @param row
  2228. * @param oldRow
  2229. */
  2230. changeCurrentRow(row, oldRow) {
  2231. // 判断是否是获取焦点的事件
  2232. if (row) {
  2233. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2234. //刷新当前页表
  2235. this.refreshCurrentTabTable()
  2236. }
  2237. },
  2238. /**
  2239. * 刷新页签的table数据
  2240. */
  2241. refreshCurrentTabTable() {
  2242. if (this.activeTable === 'proofing_result') {
  2243. this.getProofingResult()
  2244. } else if (this.activeTable === 'project_information') {
  2245. this.getProjectInformation()
  2246. } else if (this.activeTable === 'customer_information') {
  2247. this.getCustomerInformation()
  2248. }
  2249. // else if (this.activeTable === 'proofing_file') {
  2250. // this.getProofingFile()
  2251. // }
  2252. },
  2253. // getProofingFile(){
  2254. //
  2255. // },
  2256. // ======== 列表数据刷新方法 ========
  2257. /**
  2258. * 获取数据列表
  2259. */
  2260. getDataList() {
  2261. if (localStorage.getItem('proofingData') !== undefined) {
  2262. let data = JSON.parse(localStorage.getItem('proofingData'));
  2263. if (data) {
  2264. this.searchData.proofingNo = data.proofingNo
  2265. }
  2266. localStorage.removeItem('proofingData');
  2267. }
  2268. this.searchData.limit = this.pageSize
  2269. this.searchData.page = this.pageIndex
  2270. let params = {
  2271. ...this.searchData,
  2272. createBy: this.$store.state.user.name,
  2273. }
  2274. proofingInformationSearch(params).then(({data}) => {
  2275. if (data.code === 0) {
  2276. this.dataList = data.page.list
  2277. this.pageIndex = data.page.currPage
  2278. this.pageSize = data.page.pageSize
  2279. this.totalPage = data.page.totalCount
  2280. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2281. // 判断是否全部存在数据
  2282. if (this.totalPage > 0) {
  2283. //设置选中行
  2284. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  2285. //加载当前的页签的table
  2286. this.refreshCurrentTabTable()
  2287. this.proofingClickRow(this.dataList[0])
  2288. } else {
  2289. //设置选中行
  2290. this.$refs.proofingTable.setCurrentRow({})
  2291. // 加载当前的页签的table
  2292. this.refreshCurrentTabTable()
  2293. this.testClickRow({})
  2294. }
  2295. }
  2296. this.dataListLoading = false
  2297. })
  2298. },
  2299. /**
  2300. * 获取打样结果列表
  2301. */
  2302. getProofingResult() {
  2303. let tempData = {
  2304. site: this.$store.state.user.site,
  2305. proofingNo: this.proofingCurrentRow.proofingNo
  2306. }
  2307. // 打样结果对象
  2308. proofingResultSearch(tempData).then(({data}) => {
  2309. if (data && data.code === 0) {
  2310. this.proofingResultData = data.rows[0]
  2311. } else {
  2312. this.proofingResultData = {}
  2313. }
  2314. })
  2315. // 附件列表
  2316. this.getFileContentData()
  2317. },
  2318. /**
  2319. * 获取项目信息
  2320. */
  2321. getProjectInformation() {
  2322. let tempData = {
  2323. site: this.$store.state.user.site,
  2324. projectId: this.proofingCurrentRow.projectId
  2325. }
  2326. // 报价结果对象
  2327. getProjectInformation(tempData).then(({data}) => {
  2328. if (data && data.code === 0) {
  2329. this.projectInformationData = data.rows[0]
  2330. } else {
  2331. this.projectInformationData = {}
  2332. }
  2333. })
  2334. },
  2335. /**
  2336. * 获取客户信息
  2337. */
  2338. getCustomerInformation() {
  2339. let tempData = {
  2340. site: this.$store.state.user.site,
  2341. customerNo: this.proofingCurrentRow.customerNo
  2342. }
  2343. // 报价结果对象
  2344. getCustomerInformation(tempData).then(({data}) => {
  2345. if (data && data.code === 0) {
  2346. this.customerInformationData = data.rows[0]
  2347. } else {
  2348. this.customerInformationData = {}
  2349. }
  2350. })
  2351. },
  2352. // ======== 新增/编辑模态框 ========
  2353. /**
  2354. * 报价信息新增模态框
  2355. */
  2356. addModal() {
  2357. this.searchDelegateAccessByUser();
  2358. this.modalDisableFlag = false
  2359. this.modalFlag = true
  2360. },
  2361. /**
  2362. * 报价信息编辑模态框
  2363. * @param row
  2364. */
  2365. async updateModal(row) {
  2366. await this.getNodeAuthority(row)
  2367. this.modalData = {
  2368. flag: '2',
  2369. title: '打样编辑-' + row.proofingNo,
  2370. site: row.site,
  2371. proofingNo: row.proofingNo,
  2372. customerNo: row.customerNo,
  2373. customerDesc: row.customerDesc,
  2374. projectId: row.projectId,
  2375. projectName: row.projectName,
  2376. tracker: row.tracker,
  2377. trackerName: row.trackerName,
  2378. testPartNo: row.testPartNo,
  2379. partName: row.partName,
  2380. engineer: row.engineer,
  2381. engineerName: row.engineerName,
  2382. approver: row.approver,
  2383. approverName: row.approverName,
  2384. priorityLevel: row.priorityLevel,
  2385. proofingNumber: row.proofingNumber,
  2386. requiredDeliveryDate: row.requiredDeliveryDate,
  2387. remark: row.remark,
  2388. technicalConsiderations: row.technicalConsiderations,
  2389. isNeedToSendSamples: row.isNeedToSendSamples,
  2390. sendSamplesAddress: row.sendSamplesAddress,
  2391. consignee: row.consignee,
  2392. consigneeContact: row.consigneeContact,
  2393. actualityDeliveryDate: row.actualityDeliveryDate,
  2394. proofingResultInformation: row.proofingResultInformation,
  2395. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2396. sendSamplesMethod: row.sendSamplesMethod,
  2397. deliverGoodsInformation: row.deliverGoodsInformation,
  2398. deliverGoodsRemark: row.deliverGoodsRemark,
  2399. actualityReplyDate: row.actualityReplyDate,
  2400. confirmResults: row.confirmResults,
  2401. confirmBy: row.confirmBy,
  2402. confirmInformation: row.confirmInformation,
  2403. proofingStatus: row.proofingStatus,
  2404. proofingResultStatus: row.proofingResultStatus,
  2405. nextToDo: row.nextToDo,
  2406. updateBy: this.$store.state.user.name,
  2407. nodeConclusion: '',
  2408. stepId: row.stepId,
  2409. rejectFlag: row.rejectFlag,
  2410. rejectStepId: row.rejectStepId,
  2411. isReject: row.isReject,
  2412. nodeId: row.nodeId
  2413. }
  2414. this.searchDelegateAccessByUser();
  2415. this.modalDisableFlag = true
  2416. this.modalFlag = true
  2417. },
  2418. async getDetailData(row) {
  2419. this.detailVisible = true
  2420. await this.getNodeAuthority(row)
  2421. this.modalData = {
  2422. flag: '2',
  2423. title: '打样编辑-' + row.proofingNo,
  2424. site: row.site,
  2425. proofingNo: row.proofingNo,
  2426. customerNo: row.customerNo,
  2427. customerDesc: row.customerDesc,
  2428. projectId: row.projectId,
  2429. projectName: row.projectName,
  2430. tracker: row.tracker,
  2431. trackerName: row.trackerName,
  2432. testPartNo: row.testPartNo,
  2433. partName: row.partName,
  2434. engineer: row.engineer,
  2435. engineerName: row.engineerName,
  2436. approver: row.approver,
  2437. approverName: row.approverName,
  2438. priorityLevel: row.priorityLevel,
  2439. proofingNumber: row.proofingNumber,
  2440. requiredDeliveryDate: row.requiredDeliveryDate,
  2441. remark: row.remark,
  2442. technicalConsiderations: row.technicalConsiderations,
  2443. isNeedToSendSamples: row.isNeedToSendSamples,
  2444. sendSamplesAddress: row.sendSamplesAddress,
  2445. consignee: row.consignee,
  2446. consigneeContact: row.consigneeContact,
  2447. actualityDeliveryDate: row.actualityDeliveryDate,
  2448. proofingResultInformation: row.proofingResultInformation,
  2449. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2450. sendSamplesMethod: row.sendSamplesMethod,
  2451. deliverGoodsInformation: row.deliverGoodsInformation,
  2452. deliverGoodsRemark: row.deliverGoodsRemark,
  2453. actualityReplyDate: row.actualityReplyDate,
  2454. confirmResults: row.confirmResults,
  2455. confirmBy: row.confirmBy,
  2456. confirmInformation: row.confirmInformation,
  2457. proofingStatus: row.proofingStatus,
  2458. proofingResultStatus: row.proofingResultStatus,
  2459. nextToDo: row.nextToDo,
  2460. updateBy: this.$store.state.user.name,
  2461. nodeConclusion: '',
  2462. stepId: row.stepId,
  2463. rejectFlag: row.rejectFlag,
  2464. rejectStepId: row.rejectStepId,
  2465. isReject: row.isReject,
  2466. nodeId: row.nodeId
  2467. }
  2468. this.searchDelegateAccessByUser();
  2469. this.modalDisableFlag = true
  2470. this.modalFlag = true
  2471. },
  2472. // ======== 新增/编辑/删除方法 ========
  2473. /**
  2474. * 获取项目物料列表
  2475. */
  2476. openModalDialog() {
  2477. if (this.modalData.proofingNo) {
  2478. this.searchDelegateAccess();
  2479. }
  2480. if (this.modalData.flag !== '1'){
  2481. this.projectPartData.testPartNo = this.modalData.testPartNo;
  2482. }else {
  2483. this.projectPartData.testPartNo = '';
  2484. }
  2485. this.getProjectPartList();
  2486. },
  2487. getProjectPartList() {
  2488. if (!this.modalData.projectId) {
  2489. this.projectPartList = [];
  2490. return
  2491. }
  2492. // 先清空缓存选中
  2493. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2494. // 拿到选中的产品编号
  2495. let projectPartList = this.modalData.testPartNo.split(';')
  2496. this.projectPartData.projectId = this.modalData.projectId;
  2497. // 查询所有项目物料
  2498. let params = {
  2499. ...this.projectPartData,
  2500. no:this.no,
  2501. size:this.size,
  2502. }
  2503. this.queryLoading = true
  2504. getProjectPartList(params).then(({data}) => {
  2505. if (data && data.code === 0) {
  2506. this.projectPartList = data.rows
  2507. this.total = data.total
  2508. this.projectPartList.forEach(val => {
  2509. // 回显选中的项目物料
  2510. if (projectPartList.includes(val.testPartNo)) {
  2511. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2512. }
  2513. })
  2514. // this.projectPartModelFlag = true
  2515. } else {
  2516. this.$message.warning(data.msg)
  2517. }
  2518. this.queryLoading = false
  2519. }).catch(error => {
  2520. this.queryLoading = false
  2521. this.$message.error(error)
  2522. })
  2523. },
  2524. /**
  2525. * 确认多选项目物料
  2526. */
  2527. confirmProjectPart() {
  2528. this.modalData.testPartNo = ''
  2529. this.modalData.partName = ''
  2530. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2531. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2532. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2533. }
  2534. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2535. this.modalData.partName = this.modalData.partName.substring(1)
  2536. this.projectPartModelFlag = false
  2537. },
  2538. /**
  2539. * 客户信息新增/编辑
  2540. */
  2541. saveData() {
  2542. this.$refs.modalForm.validate((valid, obj) => {
  2543. if (!valid) {
  2544. Object.keys(obj).forEach(val => {
  2545. this.$message.warning(obj[val][0].message)
  2546. })
  2547. } else {
  2548. if (this.projectPartListSelections.length <= 0) {
  2549. this.$message.warning('请选择项目料号')
  2550. return
  2551. }
  2552. this.confirmProjectPart();
  2553. // 将选中的 人员信息添加到请求
  2554. this.modalData.delegateAccessList = this.selectionDelegateAccess
  2555. if (this.modalData.flag === '1') {
  2556. this.saveProofing()
  2557. } else {
  2558. this.updateProofing()
  2559. }
  2560. }
  2561. })
  2562. },
  2563. updateProofing() {
  2564. proofingInformationEdit(this.modalData).then(({data}) => {
  2565. if (data && data.code === 0) {
  2566. this.getDataList()
  2567. this.modalFlag = false
  2568. this.$message({
  2569. message: '操作成功',
  2570. type: 'success',
  2571. duration: 1500,
  2572. onClose: () => {
  2573. }
  2574. })
  2575. } else {
  2576. this.$alert(data.msg, '错误', {
  2577. confirmButtonText: '确定'
  2578. })
  2579. }
  2580. })
  2581. },
  2582. saveProofing() {
  2583. proofingInformationSave(this.modalData).then(({data}) => {
  2584. if (data && data.code === 0) {
  2585. this.getDataList()
  2586. this.modalFlag = false
  2587. this.$message({
  2588. message: '操作成功',
  2589. type: 'success',
  2590. duration: 1500,
  2591. onClose: () => {
  2592. }
  2593. })
  2594. } else {
  2595. this.$alert(data.msg, '错误', {
  2596. confirmButtonText: '确定'
  2597. })
  2598. }
  2599. })
  2600. },
  2601. /**
  2602. * 验证必填项
  2603. */
  2604. validateDataValue() {
  2605. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2606. this.$message.warning('请选择客户编码!')
  2607. return
  2608. }
  2609. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2610. this.$message.warning('请选择客户名称!')
  2611. return
  2612. }
  2613. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2614. this.$message.warning('请选择CS编码!')
  2615. return
  2616. }
  2617. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2618. this.$message.warning('请选择CS名称!')
  2619. return
  2620. }
  2621. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2622. this.$message.warning('请选择项目编码!')
  2623. return
  2624. }
  2625. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2626. this.$message.warning('请选择项目名称!')
  2627. return
  2628. }
  2629. // if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2630. // this.$message.warning('请选择工程师编码!')
  2631. // return
  2632. // }
  2633. // if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2634. // this.$message.warning('请选择工程师名称!')
  2635. // return
  2636. // }
  2637. if (!this.modalData.proofingNumber && this.modalData.proofingNumber > 0) {
  2638. this.$message.warning('请输入正确的打样数量!')
  2639. return
  2640. }
  2641. // if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2642. // this.$message.warning('请选择优先等级!')
  2643. // return
  2644. // }
  2645. if (!this.modalData.requiredDeliveryDate) {
  2646. this.$message.warning('请输入要求交付日期!')
  2647. return
  2648. }
  2649. },
  2650. /**
  2651. * 打样信息删除
  2652. */
  2653. delModal() {
  2654. if (this.proofingSelections.length === 0) {
  2655. this.$message.warning('请勾选要删除的打样信息!')
  2656. return
  2657. }
  2658. for (let i = 0; i < this.proofingSelections.length; i++) {
  2659. let row = this.proofingSelections[i]
  2660. if (row.proofingStatus !== '草稿') {
  2661. this.$message.warning(row.proofingNo + "不是草稿状态,不能删除!")
  2662. return
  2663. }
  2664. }
  2665. this.$confirm(`是否删除这 ` + this.proofingSelections.length + ` 条打样信息?`, '提示', {
  2666. confirmButtonText: '确定',
  2667. cancelButtonText: '取消',
  2668. type: 'warning'
  2669. }).then(() => {
  2670. let tempData = {
  2671. informationList: this.proofingSelections
  2672. }
  2673. proofingInformationDelete(tempData).then(({data}) => {
  2674. if (data && data.code === 0) {
  2675. this.getDataList()
  2676. this.proofingSelections = []
  2677. this.$message({
  2678. message: '操作成功',
  2679. type: 'success',
  2680. duration: 1500,
  2681. onClose: () => {
  2682. }
  2683. })
  2684. } else {
  2685. this.$alert(data.msg, '错误', {
  2686. confirmButtonText: '确定'
  2687. })
  2688. }
  2689. })
  2690. }).catch(() => {
  2691. })
  2692. },
  2693. // ======== 列表操作方法 ========
  2694. /**
  2695. * 单机选中报价信息
  2696. * @param row
  2697. */
  2698. proofingClickRow(row) {
  2699. // this.$refs.proofingTable.toggleRowSelection(row)
  2700. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2701. this.proofingDetailData = JSON.parse(JSON.stringify(row))
  2702. this.getApprovalList()
  2703. },
  2704. /**
  2705. * 复选报价信息
  2706. * @param val
  2707. */
  2708. selectionProofing(val) {
  2709. this.proofingSelections = val
  2710. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  2711. },
  2712. // ======== 报价结果相关方法 ========
  2713. /**
  2714. * 封装录入方法
  2715. */
  2716. packProofingResultModal() {
  2717. // 重置对象
  2718. this.enterResultData = {
  2719. site: this.$store.state.user.site,
  2720. proofingNo: '',
  2721. actualityDeliveryDate: new Date(),
  2722. proofingResultInformation: '',
  2723. proofingResultStatus: 'E',
  2724. fileContentList: [],
  2725. updateBy: this.$store.state.user.name
  2726. }
  2727. // 获得选中的打样号
  2728. // if (this.proofingSelections.length > 0) {
  2729. // this.proofingSelections.forEach(val => {
  2730. // this.enterResultData.proofingNo += ';' + val.proofingNo
  2731. // })
  2732. // this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  2733. // } else {
  2734. // this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2735. // }
  2736. this.enterResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2737. // // 获得这些打样号的全部附件
  2738. // this.getFileContentList()
  2739. this.enterResultModalFlag = true
  2740. },
  2741. /**
  2742. * 录入打样结果
  2743. */
  2744. proofingResultModal() {
  2745. // // 如果有选中打样单
  2746. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2747. // let tempData = {
  2748. // currentStatus: 'C',
  2749. // informationList: this.proofingSelections,
  2750. // }
  2751. // // 检查打样单状态
  2752. // checkProofingStatus(tempData).then(({data}) => {
  2753. // if (data && data.code === 0) {
  2754. // if (data.flag === 1) { // 状态一致
  2755. // this.packProofingResultModal()
  2756. // } else { // 状态不同
  2757. // this.$message.warning('选中的打样单进度有误,请确认!')
  2758. // }
  2759. // } else {
  2760. // this.$alert(data.msg, '错误', {
  2761. // confirmButtonText: '确定'
  2762. // })
  2763. // }
  2764. // })
  2765. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2766. // this.packProofingResultModal()
  2767. // }
  2768. this.packProofingResultModal()
  2769. },
  2770. /**
  2771. * 保存打样结果
  2772. */
  2773. saveProofingResult() {
  2774. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2775. this.$message.warning('请选择实际交付日期!')
  2776. return
  2777. }
  2778. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  2779. this.$message.warning('请填写打样结果信息!')
  2780. return
  2781. }
  2782. // if (this.proofingSelections.length > 1) {
  2783. // this.$confirm(`是否录入多条打样结果?`, '提示', {
  2784. // confirmButtonText: '确定',
  2785. // cancelButtonText: '取消',
  2786. // type: 'warning'
  2787. // }).then(() => {
  2788. // saveProofingResult(this.enterResultData).then(({data}) => {
  2789. // if (data && data.code === 0) {
  2790. // this.getDataList()
  2791. // this.enterResultModalFlag = false
  2792. // this.$message({
  2793. // message: '操作成功',
  2794. // type: 'success',
  2795. // duration: 1500,
  2796. // onClose: () => {}
  2797. // })
  2798. // } else {
  2799. // this.$alert(data.msg, '错误', {
  2800. // confirmButtonText: '确定'
  2801. // })
  2802. // }
  2803. // })
  2804. // }).catch(() => {
  2805. // })
  2806. // } else {
  2807. saveProofingResult(this.enterResultData).then(({data}) => {
  2808. if (data && data.code === 0) {
  2809. this.getDataList()
  2810. this.enterResultModalFlag = false
  2811. this.$message({
  2812. message: '操作成功',
  2813. type: 'success',
  2814. duration: 1500,
  2815. onClose: () => {
  2816. }
  2817. })
  2818. } else {
  2819. this.$alert(data.msg, '错误', {
  2820. confirmButtonText: '确定'
  2821. })
  2822. }
  2823. })
  2824. // }
  2825. },
  2826. /**
  2827. * 封装送样方法
  2828. */
  2829. packSubmitProofingModal() {
  2830. this.submitResultData = {
  2831. site: this.$store.state.user.site,
  2832. proofingNo: '',
  2833. actualitySendSamplesDate: new Date(),
  2834. sendSamplesMethod: '',
  2835. deliverGoodsInformation: '',
  2836. deliverGoodsRemark: '',
  2837. proofingResultStatus: 'S',
  2838. updateBy: this.$store.state.user.name,
  2839. }
  2840. // 获得选中的打样号
  2841. // if (this.proofingSelections.length > 0) {
  2842. // this.proofingSelections.forEach(val => {
  2843. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2844. // })
  2845. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2846. // } else {
  2847. // this.submitResultData.quotationNo = this.proofingCurrentRow.quotationNo
  2848. // }
  2849. this.submitResultData.proofingNo = this.proofingCurrentRow.proofingNo
  2850. this.submitResultModalFlag = true
  2851. },
  2852. /**
  2853. * 提交送样信息
  2854. */
  2855. submitProofingModal() {
  2856. // // 如果有选中打样单
  2857. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2858. // let tempData = {
  2859. // currentStatus: 'E',
  2860. // informationList: this.proofingSelections,
  2861. // }
  2862. // // 检查打样单状态
  2863. // checkProofingStatus(tempData).then(({data}) => {
  2864. // if (data && data.code === 0) {
  2865. // if (data.flag === 1) { // 状态一致
  2866. // this.packSubmitProofingModal()
  2867. // } else { // 状态不同
  2868. // this.$message.warning('选中的打样单进度有误,请确认!')
  2869. // }
  2870. // } else {
  2871. // this.$alert(data.msg, '错误', {
  2872. // confirmButtonText: '确定'
  2873. // })
  2874. // }
  2875. // })
  2876. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2877. // this.packSubmitProofingModal()
  2878. // }
  2879. this.packSubmitProofingModal()
  2880. },
  2881. /**
  2882. * 保存送样结果
  2883. */
  2884. saveSubmitResult() {
  2885. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2886. this.$message.warning('请选择实际送样日期!')
  2887. return
  2888. }
  2889. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2890. this.$message.warning('请选择送样方式!')
  2891. return
  2892. }
  2893. // if (this.proofingSelections.length > 1) {
  2894. // this.$confirm(`是否提交多条送样信息?`, '提示', {
  2895. // confirmButtonText: '确定',
  2896. // cancelButtonText: '取消',
  2897. // type: 'warning'
  2898. // }).then(() => {
  2899. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2900. // if (data && data.code === 0) {
  2901. // this.getDataList()
  2902. // this.submitResultModalFlag = false
  2903. // this.$message({
  2904. // message: '操作成功',
  2905. // type: 'success',
  2906. // duration: 1500,
  2907. // onClose: () => {}
  2908. // })
  2909. // } else {
  2910. // this.$alert(data.msg, '错误', {
  2911. // confirmButtonText: '确定'
  2912. // })
  2913. // }
  2914. // })
  2915. // }).catch(() => {
  2916. // })
  2917. // } else {
  2918. saveSubmitResult(this.submitResultData).then(({data}) => {
  2919. if (data && data.code === 0) {
  2920. this.getDataList()
  2921. this.submitResultModalFlag = false
  2922. this.$message({
  2923. message: '操作成功',
  2924. type: 'success',
  2925. duration: 1500,
  2926. onClose: () => {
  2927. }
  2928. })
  2929. } else {
  2930. this.$alert(data.msg, '错误', {
  2931. confirmButtonText: '确定'
  2932. })
  2933. }
  2934. })
  2935. // }
  2936. },
  2937. /**
  2938. * 封装回复方法
  2939. */
  2940. packCustomerResponseModal() {
  2941. this.customerResponseData = {
  2942. site: this.$store.state.user.site,
  2943. proofingNo: '',
  2944. actualityReplyDate: new Date(),
  2945. confirmResults: '接受',
  2946. confirmBy: '',
  2947. confirmInformation: '',
  2948. proofingResultStatus: 'R',
  2949. updateBy: this.$store.state.user.name
  2950. }
  2951. // 获得选中的打样号
  2952. // if (this.proofingSelections.length > 0) {
  2953. // this.proofingSelections.forEach(val => {
  2954. // this.customerResponseData.proofingNo += ';' + val.proofingNo
  2955. // })
  2956. // this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  2957. // } else {
  2958. // this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2959. // }
  2960. this.customerResponseData.proofingNo = this.proofingCurrentRow.proofingNo
  2961. this.customerResponseModalFlag = true
  2962. },
  2963. /**
  2964. * 客户回复
  2965. */
  2966. customerResponseModal() {
  2967. // // 如果有选中打样单
  2968. // if (this.proofingSelections != null && this.proofingSelections.length > 0) {
  2969. // let tempData = {
  2970. // currentStatus: 'S',
  2971. // informationList: this.proofingSelections,
  2972. // }
  2973. // // 检查打样单状态
  2974. // checkProofingStatus(tempData).then(({data}) => {
  2975. // if (data && data.code === 0) {
  2976. // if (data.flag === 1) { // 状态一致
  2977. // this.packCustomerResponseModal()
  2978. // } else { // 状态不同
  2979. // this.$message.warning('选中的打样单进度有误,请确认!')
  2980. // }
  2981. // } else {
  2982. // this.$alert(data.msg, '错误', {
  2983. // confirmButtonText: '确定'
  2984. // })
  2985. // }
  2986. // })
  2987. // } else { // 没有选中打样单,则根据当前点击行打样单操作
  2988. // this.packCustomerResponseModal()
  2989. // }
  2990. this.packCustomerResponseModal()
  2991. },
  2992. /**
  2993. * 保存客户回复
  2994. */
  2995. saveCustomerResponse() {
  2996. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2997. this.$message.warning('请选择实际回复日期!')
  2998. return
  2999. }
  3000. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3001. this.$message.warning('请选择客户确认结果!')
  3002. return
  3003. }
  3004. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3005. this.$message.warning('请填写客户确认人!')
  3006. return
  3007. }
  3008. // if (this.proofingSelections.length > 1) {
  3009. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3010. // confirmButtonText: '确定',
  3011. // cancelButtonText: '取消',
  3012. // type: 'warning'
  3013. // }).then(() => {
  3014. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3015. // if (data && data.code === 0) {
  3016. // this.getDataList()
  3017. // this.customerResponseModalFlag = false
  3018. // this.$message({
  3019. // message: '操作成功',
  3020. // type: 'success',
  3021. // duration: 1500,
  3022. // onClose: () => {}
  3023. // })
  3024. // } else {
  3025. // this.$alert(data.msg, '错误', {
  3026. // confirmButtonText: '确定'
  3027. // })
  3028. // }
  3029. // })
  3030. // }).catch(() => {
  3031. // })
  3032. // } else {
  3033. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3034. if (data && data.code === 0) {
  3035. this.getDataList()
  3036. this.customerResponseModalFlag = false
  3037. this.$message({
  3038. message: '操作成功',
  3039. type: 'success',
  3040. duration: 1500,
  3041. onClose: () => {
  3042. }
  3043. })
  3044. } else {
  3045. this.$alert(data.msg, '错误', {
  3046. confirmButtonText: '确定'
  3047. })
  3048. }
  3049. })
  3050. // }
  3051. },
  3052. // ======== 报价单附件的相关方法 ========
  3053. /**
  3054. * 获取报价单附件列表
  3055. */
  3056. getFileContentData() {
  3057. let currentData = {
  3058. orderRef1: this.$store.state.user.site,
  3059. orderRef2: this.proofingCurrentRow.proofingNo
  3060. }
  3061. getFileContentList(currentData).then(({data}) => {
  3062. if (data && data.code === 0) {
  3063. this.fileContentList = data.rows
  3064. } else {
  3065. this.fileContentList = []
  3066. }
  3067. })
  3068. },
  3069. // /**
  3070. // * 获得这些报价号的全部附件
  3071. // */
  3072. // getFileContentList () {
  3073. // let currentData = {
  3074. // orderRef1: this.$store.state.user.site,
  3075. // orderRef2: this.enterResultData.proofingNo
  3076. // }
  3077. // getFileContentList(currentData).then(({data}) => {
  3078. // if (data && data.code === 0) {
  3079. // this.enterResultData.fileContentList = data.rows
  3080. // } else {
  3081. // this.enterResultData.fileContentList = []
  3082. // }
  3083. // })
  3084. // },
  3085. /**
  3086. * 上传文件
  3087. */
  3088. uploadFile() {
  3089. let currentData = {
  3090. titleCon: '打样附件上传',
  3091. site: this.$store.state.user.site,
  3092. createBy: this.$store.state.user.name,
  3093. proofingNo: this.enterResultData.proofingNo,
  3094. fileRemark: '',
  3095. folder: 'proofingFile',
  3096. // options: []
  3097. }
  3098. // let num = 0
  3099. // let arr = this.enterResultData.proofingNo.split(';')
  3100. // arr.forEach(val => {
  3101. // currentData.options.push({key: num++, value: val})
  3102. // })
  3103. //打开组件 去做新增业务
  3104. this.$nextTick(() => {
  3105. this.$refs.proofingUploadFile.init(currentData)
  3106. })
  3107. },
  3108. /**
  3109. * 文件删除
  3110. * @param row
  3111. */
  3112. deleteFile(row) {
  3113. this.$confirm('确定要删除此文件?', '提示', {
  3114. confirmButtonText: '确定',
  3115. cancelButtonText: '取消',
  3116. type: 'warning'
  3117. }).then(() => {
  3118. deleteProofingFile(row).then(({data}) => {
  3119. if (data && data.code === 0) {
  3120. this.getFileContentList()
  3121. this.$message({
  3122. message: '操作成功',
  3123. type: 'success',
  3124. duration: 1500,
  3125. onClose: () => {
  3126. }
  3127. })
  3128. } else {
  3129. this.$alert(data.msg, '错误', {
  3130. confirmButtonText: '确定'
  3131. })
  3132. }
  3133. })
  3134. }).catch(() => {
  3135. })
  3136. },
  3137. /**
  3138. * 文件下载
  3139. * @param row
  3140. */
  3141. downloadFile(row) {
  3142. downLoadQuotationFile(row).then(({data}) => {
  3143. // 不限制文件下载类型
  3144. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3145. // 下载文件名称
  3146. const fileName = row.fileName
  3147. // a标签下载
  3148. const linkNode = document.createElement('a')
  3149. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3150. linkNode.style.display = 'none'
  3151. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3152. document.body.appendChild(linkNode)
  3153. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3154. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3155. document.body.removeChild(linkNode)
  3156. })
  3157. },
  3158. /**
  3159. * 获取该客户的客户地址
  3160. */
  3161. getCustomerAddressList() {
  3162. let tempData = {
  3163. site: this.$store.state.user.site,
  3164. customerNo: this.modalData.customerNo,
  3165. addressType: 'A'
  3166. }
  3167. customerAddressSearch(tempData).then(({data}) => {
  3168. if (data && data.code === 0) {
  3169. this.addressList = data.rows
  3170. this.addressModelFlag = true
  3171. } else {
  3172. this.addressList = []
  3173. }
  3174. })
  3175. },
  3176. // 双击选择负责人
  3177. getAddressData(row) {
  3178. this.modalData.sendSamplesAddress = row.addressName
  3179. this.addressModelFlag = false
  3180. },
  3181. /**
  3182. * 获取该客户的客户负责人
  3183. */
  3184. getCustomerContactList() {
  3185. let tempData = {
  3186. site: this.$store.state.user.site,
  3187. customerNo: this.modalData.customerNo
  3188. }
  3189. customerContactSearch(tempData).then(({data}) => {
  3190. if (data && data.code === 0) {
  3191. this.contactList = data.rows
  3192. this.contactModelFlag = true
  3193. } else {
  3194. this.contactList = []
  3195. }
  3196. })
  3197. },
  3198. // 双击选择负责人
  3199. getContactData(row) {
  3200. this.modalData.consignee = row.contactName
  3201. this.modalData.consigneeContact = row.contactPhoneNumber1
  3202. this.contactModelFlag = false
  3203. },
  3204. // ======== chooseList相关方法 ========
  3205. /**
  3206. * 获取基础数据列表S
  3207. * @param val
  3208. * @param type
  3209. */
  3210. getBaseList(val, type) {
  3211. this.tagNo = val
  3212. this.tagNo1 = type
  3213. this.$nextTick(() => {
  3214. let strVal = ''
  3215. let conSql = ''
  3216. if (val === 102) {
  3217. if (type === 1) {
  3218. strVal = this.modalData.customerNo
  3219. }
  3220. }
  3221. // if (val === 103) {
  3222. // if(type === 1) {
  3223. // strVal = this.modalData.tracker
  3224. // }
  3225. // if(type === 2) {
  3226. // strVal = this.modalData.engineer
  3227. // }
  3228. // }
  3229. if (val === 104) {
  3230. if (type === 1) {
  3231. strVal = this.modalData.projectId
  3232. }
  3233. }
  3234. if (val === 2051) {
  3235. strVal = this.modalData.trackerName
  3236. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3237. }
  3238. if (val === 2052) {
  3239. strVal = this.modalData.engineerName
  3240. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3241. }
  3242. if (val === 2053) {
  3243. strVal = this.modalData.approverName
  3244. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3245. }
  3246. this.$refs.baseList.init(val, strVal, conSql)
  3247. })
  3248. },
  3249. /**
  3250. * 列表方法的回调
  3251. * @param val
  3252. */
  3253. getBaseData(val) {
  3254. if (this.tagNo === 102) {
  3255. if (this.tagNo1 === 1) {
  3256. if (val.Customer_no === this.modalData.customerNo) {
  3257. return
  3258. }
  3259. this.modalData.customerNo = val.Customer_no
  3260. this.modalData.customerDesc = val.Customer_desc
  3261. this.modalData.projectId = undefined
  3262. this.modalData.projectName = undefined
  3263. this.projectPartList = []
  3264. }
  3265. }
  3266. // if (this.tagNo === 103) {
  3267. // if(this.tagNo1 === 1) {
  3268. // this.modalData.tracker = val.username
  3269. // this.modalData.trackerName = val.user_display
  3270. // }
  3271. // if(this.tagNo1 === 2) {
  3272. // this.modalData.engineer = val.username
  3273. // this.modalData.engineerName = val.user_display
  3274. // }
  3275. // }
  3276. if (this.tagNo === 104) {
  3277. if (this.tagNo1 === 1) {
  3278. this.modalData.projectId = val.project_id
  3279. this.modalData.projectName = val.project_name
  3280. this.getProjectPartList();
  3281. }
  3282. }
  3283. if (this.tagNo === 2051) {
  3284. this.modalData.tracker = val.username
  3285. this.modalData.trackerName = val.user_display
  3286. }
  3287. if (this.tagNo === 2052) {
  3288. this.modalData.engineer = val.username
  3289. this.modalData.engineerName = val.user_display
  3290. }
  3291. if (this.tagNo === 2053) {
  3292. this.modalData.approver = val.username
  3293. this.modalData.approverName = val.user_display
  3294. }
  3295. },
  3296. // ======== 导出相关方法 ========
  3297. /**
  3298. * 导出excel
  3299. */
  3300. async createExportData() {
  3301. this.searchData.limit = -1
  3302. this.searchData.page = 1
  3303. await proofingInformationSearch(this.searchData).then(({data}) => {
  3304. this.resultList = data.page.list
  3305. })
  3306. return this.resultList
  3307. },
  3308. startDownload() {
  3309. },
  3310. finishDownload() {
  3311. },
  3312. fields() {
  3313. let json = '{'
  3314. this.columnList.forEach((item, index) => {
  3315. if (index === this.columnList.length - 1) {
  3316. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3317. } else {
  3318. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3319. }
  3320. })
  3321. json += '}'
  3322. let s = eval('(' + json + ')')
  3323. return s
  3324. },
  3325. closeModalDiaLog() {
  3326. this.$refs.modalForm.resetFields();
  3327. this.modalData = {
  3328. flag: '1',
  3329. title: '打样新增',
  3330. site: this.$store.state.user.site,
  3331. proofingNo: '',
  3332. customerNo: '',
  3333. customerDesc: '',
  3334. projectId: '',
  3335. projectName: '',
  3336. tracker: '',
  3337. trackerName: '',
  3338. approver: '',
  3339. approverName: '',
  3340. testPartNo: '',
  3341. partName: '',
  3342. engineer: '',
  3343. engineerName: '',
  3344. priorityLevel: '',
  3345. proofingNumber: 1,
  3346. requiredDeliveryDate: '',
  3347. remark: '',
  3348. technicalConsiderations: '',
  3349. isNeedToSendSamples: '',
  3350. sendSamplesAddress: '',
  3351. consignee: '',
  3352. consigneeContact: '',
  3353. actualityDeliveryDate: '',
  3354. proofingResultInformation: '',
  3355. actualitySendSamplesDate: '',
  3356. sendSamplesMethod: '',
  3357. deliverGoodsInformation: '',
  3358. deliverGoodsRemark: '',
  3359. actualityReplyDate: '',
  3360. confirmResults: '',
  3361. confirmBy: '',
  3362. confirmInformation: '',
  3363. proofingStatus: '草稿',
  3364. proofingResultStatus: 'B',
  3365. nextToDo: '',
  3366. createBy: this.$store.state.user.name,
  3367. nodeId: ''
  3368. };
  3369. this.selectionDelegateAccess = [];
  3370. this.projectPartList = [];
  3371. this.activeName = 'part'
  3372. Object.keys(this.proofingDelegateAccess).forEach(key => {
  3373. this.proofingDelegateAccess[key] = '';
  3374. })
  3375. },
  3376. checkSelectable(row, index) {
  3377. if (this.modalData.flag === '1') {
  3378. return true
  3379. } else {
  3380. return false
  3381. }
  3382. },
  3383. projectClickRow(row) {
  3384. this.modalData.projectId = row.projectId
  3385. this.modalData.projectName = row.projectName
  3386. this.getProjectPartList()
  3387. this.chooseProjectListFlag = false
  3388. },
  3389. // 查询searchProjectInfoList
  3390. searchProjectInfoList() {
  3391. this.projectList = [];
  3392. this.searchProjectData.customerId = this.modalData.customerNo
  3393. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3394. if (data && data.code === 0) {
  3395. this.projectList = data.rows
  3396. } else {
  3397. this.projectList = []
  3398. }
  3399. }).catch((error) => {
  3400. this.$message.error('查询项目信息失败')
  3401. })
  3402. },
  3403. closeProjectInfoDialog() {
  3404. this.$refs.closeProjectInfoForm.resetFields();
  3405. this.searchProjectData = {
  3406. site: this.$store.state.user.site,
  3407. projectId: undefined,
  3408. projectName: undefined,
  3409. customerId: undefined,
  3410. }
  3411. },
  3412. rowStyle({row}) {
  3413. if (this.proofingCurrentRow.proofingNo === row.proofingNo) {
  3414. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3415. }
  3416. },
  3417. updateModalStatus(row, status) {
  3418. this.$confirm(`是否确认下达?`, '提示', {
  3419. confirmButtonText: '确定',
  3420. cancelButtonText: '取消',
  3421. type: 'warning'
  3422. }).then(() => {
  3423. let params = JSON.parse(JSON.stringify(row))
  3424. params.proofingResultStatus = status;
  3425. params.proofingStatus = '下达';
  3426. params.userName = this.$store.state.user.name
  3427. params.menuId = this.$route.meta.menuId
  3428. proofingInformationEditStatus(params).then(({data}) => {
  3429. if (data && data.code === 0) {
  3430. this.getDataList()
  3431. this.modalFlag = false
  3432. this.$message.success('打样单已下达')
  3433. } else {
  3434. this.$alert(data.msg, '错误', {
  3435. confirmButtonText: '确定'
  3436. })
  3437. }
  3438. })
  3439. })
  3440. },
  3441. searchDelegateAccessByUser() {
  3442. // 角色 ROO7 的用户
  3443. let params = {
  3444. ...this.proofingDelegateAccess,
  3445. site: this.$store.state.user.site,
  3446. }
  3447. searchDelegateAccessByUser(params).then(({data}) => {
  3448. if (data && data.code === 0) {
  3449. this.baseDelegateAccessList = data.rows;
  3450. } else {
  3451. this.$message.warning(data.msg)
  3452. }
  3453. }).catch((error) => {
  3454. this.$message.error(error)
  3455. })
  3456. },
  3457. handleSelectionChange(val) {
  3458. // 获得选中的 用户
  3459. this.selectionDelegateAccess2 = val;
  3460. },
  3461. handleTableClick(row, column, event, val) {
  3462. // 表格行点击选择
  3463. this.$refs[val].toggleRowSelection(row);
  3464. },
  3465. openDelegateAccess() {
  3466. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3467. if (rows && rows.length > 0) {
  3468. this.$nextTick(() => {
  3469. rows.forEach(item => {
  3470. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3471. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3472. })
  3473. })
  3474. }
  3475. },
  3476. closeDelegateAccess() {
  3477. this.selectionDelegateAccess2 = [];
  3478. },
  3479. confirmDelegateAccess() {
  3480. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3481. this.delegateAccessVisible = false;
  3482. },
  3483. searchDelegateAccess() {
  3484. let params = {
  3485. site: this.modalData.site,
  3486. proofingNo: this.modalData.proofingNo,
  3487. }
  3488. searchDelegateAccess(params).then(({data}) => {
  3489. if (data && data.code === 0) {
  3490. this.selectionDelegateAccess = data.rows.map(item => {
  3491. return {
  3492. delegateAccess: item.delegateAccess,
  3493. delegateAccessName: item.delegateAccessName,
  3494. }
  3495. })
  3496. } else {
  3497. this.$message.warning(data.msg)
  3498. }
  3499. }).catch((error) => {
  3500. this.$message.error(error)
  3501. })
  3502. },
  3503. // 同意提交
  3504. agreeSubmit() {
  3505. this.$confirm(`是否确认提交?`, '提示', {
  3506. confirmButtonText: '确定',
  3507. cancelButtonText: '取消',
  3508. type: 'warning'
  3509. }).then(() => {
  3510. this.modalData.nodeConclusion = 'Y'
  3511. this.submitData()
  3512. })
  3513. },
  3514. // 驳回提交
  3515. rejectSubmit() {
  3516. this.$confirm(`是否确认驳回?`, '提示', {
  3517. confirmButtonText: '确定',
  3518. cancelButtonText: '取消',
  3519. type: 'warning'
  3520. }).then(() => {
  3521. this.modalData.rejectOpinion = this.rejectOpinion
  3522. this.modalData.nodeConclusion = 'N'
  3523. this.submitData()
  3524. })
  3525. },
  3526. // 提交
  3527. submitData() {
  3528. if (this.columnFieldList1) {
  3529. for (let i = 0; i < this.columnFieldList1.length; i++) {
  3530. let row = this.columnFieldList1[i]
  3531. if (!this.modalData[row.fieldId] && row.required === 'Y') {
  3532. this.$message.error(row.fieldName + '不能为空')
  3533. return
  3534. }
  3535. }
  3536. }
  3537. if (this.columnFieldList2) {
  3538. if (!this.delegateAccessName) {
  3539. this.$message.error('Delegate Access不能为空')
  3540. return;
  3541. }
  3542. }
  3543. let tempData = {
  3544. ...this.modalData,
  3545. userName: this.$store.state.user.name,
  3546. menuId: this.$route.meta.menuId,
  3547. }
  3548. submitChange(tempData).then(({data}) => {
  3549. if (data && data.code === 0) {
  3550. this.getDataList()
  3551. this.$message({message: '操作成功', type: 'success'})
  3552. this.rejectVisible = false
  3553. this.submitModalFlag = false
  3554. this.modalFlag = false
  3555. } else {
  3556. this.$alert(data.msg, '错误', {
  3557. confirmButtonText: '确定'
  3558. })
  3559. }
  3560. })
  3561. },
  3562. // 获取流程的配置权限
  3563. async getNodeAuthority(row) {
  3564. let tempData = {
  3565. site: row.site,
  3566. stepId: row.stepId,
  3567. menuId: this.$route.meta.menuId
  3568. }
  3569. await getNodeAuthority(tempData).then(({data}) => {
  3570. if (data && data.code === 0) {
  3571. this.columnFieldList1 = data.rows.plm_proofing_information
  3572. this.columnFieldList2 = data.rows.plm_proofing_delegate_access
  3573. }
  3574. })
  3575. },
  3576. handleQueryCustomer() {
  3577. let params = {
  3578. site: this.$store.state.user.site,
  3579. customerNo: this.modalData.customerNo
  3580. }
  3581. queryCustomer(params).then(({data}) => {
  3582. if (data && data.code === 0) {
  3583. if (data.rows && data.rows.length === 1) {
  3584. this.modalData.customerDesc = data.rows[0].customerDesc
  3585. } else {
  3586. this.modalData.customerDesc = ''
  3587. }
  3588. } else {
  3589. this.$message.warning(data.msg)
  3590. }
  3591. }).catch((error) => {
  3592. this.$message.error(error)
  3593. })
  3594. },
  3595. handleQueryProjectByCustomer() {
  3596. let params = {
  3597. site: this.$store.state.user.site,
  3598. customerId: this.modalData.customerNo,
  3599. projectId: this.modalData.projectId
  3600. }
  3601. queryProjectByCustomer(params).then(({data}) => {
  3602. if (data && data.code === 0) {
  3603. if (data.rows && data.rows.length === 1) {
  3604. this.modalData.projectName = data.rows[0].projectName
  3605. } else {
  3606. this.modalData.projectName = ''
  3607. }
  3608. } else {
  3609. this.$message.warning(data.msg)
  3610. }
  3611. }).catch((error) => {
  3612. this.$message.error(error)
  3613. })
  3614. },
  3615. // 查询审批信息
  3616. getApprovalList() {
  3617. let tempData = {
  3618. site: this.$store.state.user.site,
  3619. menuId: this.$route.meta.menuId,
  3620. documentNo: this.proofingCurrentRow.proofingNo,
  3621. }
  3622. getApprovalList(tempData).then(({data}) => {
  3623. if (data && data.code === 0) {
  3624. this.approvalList = data.rows
  3625. } else {
  3626. this.approvalList = []
  3627. }
  3628. })
  3629. },
  3630. handleRouter(row){
  3631. this.modalFlag = false
  3632. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  3633. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  3634. } else {
  3635. this.$router.push({name:`part-partInformation`,params:{partNo:row.testPartNo},})
  3636. }
  3637. },
  3638. clearModalData(filed){
  3639. this.modalData[filed] = ''
  3640. },
  3641. handleSizeChange(val){
  3642. this.size = val
  3643. this.getProjectPartList();
  3644. },
  3645. handleCurrentChange(val){
  3646. this.no = val
  3647. this.getProjectPartList();
  3648. }
  3649. }
  3650. }
  3651. </script>
  3652. <style scoped lang="scss">
  3653. /deep/ .customer-tab .el-tabs__content {
  3654. padding: 0px !important;
  3655. height: 300px;
  3656. }
  3657. .right /deep/ .el-input__inner {
  3658. text-align: right;
  3659. }
  3660. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3661. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3662. -webkit-appearance: none;
  3663. }
  3664. /deep/ .inlineNumber input[type="number"] {
  3665. -moz-appearance: textfield;
  3666. padding-right: 5px !important;
  3667. }
  3668. </style>