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.

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