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.

3975 lines
135 KiB

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