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.

3617 lines
128 KiB

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