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.

3746 lines
127 KiB

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