| | |
| | | <div class="inner" ref="wraper"> |
| | | <a-spin class="" :spinning="spinning" tip="拼命加载中..."> |
| | | <a-card> |
| | | <advance-table ref="table" class="doc-center-table" :data-source="dataSource" :columns="columns" |
| | | :loading="loading" title="" row-key="id" @search="onSearch" @refresh="onRefresh" @reset="onReset" |
| | | :format-conditions="true" :scroll="{ x: 400, y }" :pagination="{ |
| | | <advance-table |
| | | ref="table" |
| | | class="doc-center-table" |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="id" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :scroll="{ x: 400, y }" |
| | | :pagination="{ |
| | | current: pageCurr, |
| | | pageSize: pageSize, |
| | | total: total, |
| | |
| | | `第 ${range[0]}-${range[1]} 条,总计 ${total} 条`, |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }"> |
| | | }" |
| | | > |
| | | <template slot="dataIndex" slot-scope="{ index }"> |
| | | {{ index + 1 }} |
| | | </template> |
| | | <template slot="title"> |
| | | <a-space class="operator"> |
| | | <span class="title">产品中心</span> |
| | | <a-button v-if="canUploadBom" type="primary" @click="uploadBom">新增</a-button> |
| | | <a-button v-if="canUploadBom" type="primary" @click="uploadBom" |
| | | >新增</a-button |
| | | > |
| | | <a-button type="primary" @click="prodDiff">产品比较</a-button> |
| | | </a-space> |
| | | </template> |
| | |
| | | <a-divider type="vertical"></a-divider> |
| | | <a-popover title="" trigger="hover"> |
| | | <a-space class="btn-grp" direction="vertical" slot="content"> |
| | | <a-button :disabled="record.version == -1" type="primary" @click="edit(record)">编辑</a-button> |
| | | <a-button v-if="canDownloadBom" :disabled="record.version == -1" type="primary" |
| | | @click="checkLock(record)">下载</a-button> |
| | | <a-button type="primary" v-if="canUploadBom" :disabled="record.version == -1" |
| | | @click="showCustom(record)">定制</a-button> |
| | | <a-button type="primary" v-if="canFeedback" :disabled="record.version == -1" |
| | | @click="showFeedback(record)">反馈</a-button> |
| | | <a-button type="primary" v-if="record.ecrList.length > 0" @click="showEcrlist(record)">ecr记录</a-button> |
| | | <a-button |
| | | :disabled="record.version == -1" |
| | | type="primary" |
| | | @click="edit(record)" |
| | | >编辑</a-button |
| | | > |
| | | <a-button |
| | | v-if="canDownloadBom" |
| | | :disabled="record.version == -1" |
| | | type="primary" |
| | | @click="checkLock(record)" |
| | | >下载</a-button |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | v-if="canUploadBom" |
| | | :disabled="record.version == -1" |
| | | @click="showCustom(record)" |
| | | >定制</a-button |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | v-if="canFeedback" |
| | | :disabled="record.version == -1" |
| | | @click="showFeedback(record)" |
| | | >反馈</a-button |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | v-if="record.ecrList.length > 0" |
| | | @click="showEcrlist(record)" |
| | | >ecr记录</a-button |
| | | > |
| | | </a-space> |
| | | <a>更多</a> |
| | | </a-popover> |
| | |
| | | </a-spin> |
| | | </div> |
| | | <!-- 上传软件 --> |
| | | <a-modal :visible="uploadShow" :footer="null" :width="500" title="上传软件" :destroyOnClose="true" :maskClosable="false" |
| | | @cancel="uploadCancel"> |
| | | <a-modal |
| | | :visible="uploadShow" |
| | | :footer="null" |
| | | :width="500" |
| | | title="上传软件" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="uploadCancel" |
| | | > |
| | | <div class=""> |
| | | <a-row class="title"> |
| | | <a-col :span="6" class="text-right"> |
| | |
| | | </a-row> |
| | | <a-row class="upload"> |
| | | <a-col :span="15" :offset="7"> |
| | | <a-upload :before-upload="beforeUpload" @change="uploadChange" accept=".zip"> |
| | | <a-upload |
| | | :before-upload="beforeUpload" |
| | | @change="uploadChange" |
| | | accept=".zip" |
| | | > |
| | | <a-button type="primary">上传软件</a-button> |
| | | </a-upload> |
| | | </a-col> |
| | | </a-row> |
| | | <a-form-model ref="formRef" name="advanced_search" class="ant-advanced-search-form" :model="info" :rules="rules"> |
| | | <a-form-model |
| | | ref="formRef" |
| | | name="advanced_search" |
| | | class="ant-advanced-search-form" |
| | | :model="info" |
| | | :rules="rules" |
| | | > |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="审核人" :labelCol="{ span: 6 }" :wrapperCol="{ span: 15, offset: 1 }" |
| | | prop="nextUser"> |
| | | <a-select show-search v-model="info.nextUser" placeholder="请选择审核人"> |
| | | <a-select-option v-for="(item, key) in userList" :key="'key' + key" :value="item.id" :title="item.name"> |
| | | <a-form-model-item |
| | | label="审核人" |
| | | :labelCol="{ span: 6 }" |
| | | :wrapperCol="{ span: 15, offset: 1 }" |
| | | prop="nextUser" |
| | | > |
| | | <a-select |
| | | show-search |
| | | v-model="info.nextUser" |
| | | placeholder="请选择审核人" |
| | | > |
| | | <a-select-option |
| | | v-for="(item, key) in userList" |
| | | :key="'key' + key" |
| | | :value="item.id" |
| | | :title="item.name" |
| | | > |
| | | {{ item.name }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="工单描述" :labelCol="{ span: 6 }" :wrapperCol="{ span: 15, offset: 1 }" |
| | | prop="description"> |
| | | <a-textarea placeholder="请输入工单描述" v-model="info.description" :rows="4" /> |
| | | <a-form-model-item |
| | | label="工单描述" |
| | | :labelCol="{ span: 6 }" |
| | | :wrapperCol="{ span: 15, offset: 1 }" |
| | | prop="description" |
| | | > |
| | | <a-textarea |
| | | placeholder="请输入工单描述" |
| | | v-model="info.description" |
| | | :rows="4" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </div> |
| | | </a-modal> |
| | | <!-- 编辑产品 --> |
| | | <a-modal :visible="editShow" :footer="null" :width="1200" title="修改产品替换件信息" :destroyOnClose="true" |
| | | :maskClosable="false" @cancel="cancel"> |
| | | <a-modal |
| | | :visible="editShow" |
| | | :footer="null" |
| | | :width="1200" |
| | | title="修改产品替换件信息" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="cancel" |
| | | > |
| | | <change-parts :parent-data="editObj" @close="cancel"></change-parts> |
| | | </a-modal> |
| | | <!-- 上传bom --> |
| | | <a-modal :visible="bomUploadShow" :width="760" title="上传产品BOM" :destroyOnClose="true" :maskClosable="false" |
| | | @cancel="bomUploadCancel" @ok="bomUploadOk"> |
| | | <a-modal |
| | | :visible="bomUploadShow" |
| | | :width="760" |
| | | title="上传产品BOM" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="bomUploadCancel" |
| | | @ok="bomUploadOk" |
| | | > |
| | | <a-row class="upload" type="flex"> |
| | | <a-col flex="7em"></a-col> |
| | | <a-col flex="1"> |
| | | <a-upload :before-upload="beforeUpload" @change="uploadChange" accept=".zip"> |
| | | <a-upload |
| | | :before-upload="beforeUpload" |
| | | @change="uploadChange" |
| | | accept=".zip" |
| | | > |
| | | <a-button type="primary">上传BOM</a-button> |
| | | </a-upload> |
| | | </a-col> |
| | |
| | | <a-row type="flex"> |
| | | <a-col class="label" flex="7em"><span>基于产品</span></a-col> |
| | | <a-col flex="1"> |
| | | <a-select class="from" show-search allowClear :filterOption="prodFilter" v-model="fromProd" |
| | | placeholder="请选择是从哪款产品升级来的"> |
| | | <a-select-option v-for="(item, key) in prodList" :key="'prod_' + key" :value="item.id" :title="item.name"> |
| | | <a-select |
| | | class="from" |
| | | show-search |
| | | allowClear |
| | | :filterOption="prodFilter" |
| | | v-model="fromProd" |
| | | placeholder="请选择是从哪款产品升级来的" |
| | | > |
| | | <a-select-option |
| | | v-for="(item, key) in prodList" |
| | | :key="'prod_' + key" |
| | | :value="item.id" |
| | | :title="item.name" |
| | | > |
| | | {{ item.parentName }} ({{ item.parentCode }}) |
| | | {{ item.customCode }} |
| | | </a-select-option> |
| | |
| | | </a-row> |
| | | </a-modal> |
| | | <!-- 解析Bom --> |
| | | <a-modal :visible="prodUploadShow" :footer="null" :width="960" title="上传产品BOM" :destroyOnClose="true" |
| | | :maskClosable="false" @cancel="prodUploadCancel"> |
| | | <a-modal |
| | | :visible="prodUploadShow" |
| | | :footer="null" |
| | | :width="960" |
| | | title="上传产品BOM" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="prodUploadCancel" |
| | | > |
| | | <a-tabs type="card" tabPosition="left"> |
| | | <a-tab-pane key="1" tab="清单"> |
| | | <draw-upload class="bom-list" :list="resList" :y="320" :no-footer="true"></draw-upload> |
| | | <draw-upload |
| | | class="bom-list" |
| | | :list="resList" |
| | | :y="320" |
| | | :no-footer="true" |
| | | ></draw-upload> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="2" tab="差异"> |
| | | <diff-list :list="diffData"></diff-list> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" :tab="abLabel"> |
| | | <a-table ref="aTable" size="small" :scroll="{ y: 700 }" bordered :columns="abTbl.columns" |
| | | :data-source="abTbl.dataSource" :pagination="false" rowKey="subCode"></a-table> |
| | | <a-table |
| | | ref="aTable" |
| | | size="small" |
| | | :scroll="{ y: 700 }" |
| | | bordered |
| | | :columns="abTbl.columns" |
| | | :data-source="abTbl.dataSource" |
| | | :pagination="false" |
| | | rowKey="subCode" |
| | | ></a-table> |
| | | <div style="text-align: right; padding: 8px"> |
| | | <a-button @click="abTbl.ignore = true" :type="abState ? 'danger' : 'primary'" |
| | | :icon="abState ? 'question' : 'check'">{{ abState ? "未确认" : "已确认" }}</a-button> |
| | | <a-button |
| | | @click="abTbl.ignore = true" |
| | | :type="abState ? 'danger' : 'primary'" |
| | | :icon="abState ? 'question' : 'check'" |
| | | >{{ abState ? "未确认" : "已确认" }}</a-button |
| | | > |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="4" :tab="errorLabel"> |
| | | <a-table ref="aTable" size="small" :scroll="{ y: 700 }" bordered :columns="errorTbl.columns" |
| | | :data-source="errorTbl.dataSource" :pagination="false" rowKey="subCode"></a-table> |
| | | <a-table |
| | | ref="aTable" |
| | | size="small" |
| | | :scroll="{ y: 700 }" |
| | | bordered |
| | | :columns="errorTbl.columns" |
| | | :data-source="errorTbl.dataSource" |
| | | :pagination="false" |
| | | rowKey="subCode" |
| | | ></a-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <prod-upload class="mt8" @ok="submit" @cancel="prodUploadCancel"></prod-upload> |
| | | <prod-upload |
| | | class="mt8" |
| | | @ok="submit" |
| | | @cancel="prodUploadCancel" |
| | | ></prod-upload> |
| | | </a-modal> |
| | | <!-- 定制 --> |
| | | <a-modal :visible="customShow" :footer="null" :width="800" title="产品定制" :destroyOnClose="true" :maskClosable="false" |
| | | @cancel="customCancel"> |
| | | <prod-upload class="mt8" :prod-info="customProd" @ok="custom" @cancel="customCancel"></prod-upload> |
| | | <a-modal |
| | | :visible="customShow" |
| | | :footer="null" |
| | | :width="800" |
| | | title="产品定制" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="customCancel" |
| | | > |
| | | <prod-upload |
| | | class="mt8" |
| | | :prod-info="customProd" |
| | | @ok="custom" |
| | | @cancel="customCancel" |
| | | ></prod-upload> |
| | | </a-modal> |
| | | <!-- 日志 --> |
| | | <a-modal :visible="logVisible" :footer="null" :width="800" title="操作日志" :destroyOnClose="true" @cancel="logCancel"> |
| | | <a-modal |
| | | :visible="logVisible" |
| | | :footer="null" |
| | | :width="800" |
| | | title="操作日志" |
| | | :destroyOnClose="true" |
| | | @cancel="logCancel" |
| | | > |
| | | <div class="log-content"> |
| | | <a-timeline v-if="logList.length"> |
| | | <a-timeline-item v-for="(item, idx) in logList" :key="'log_' + idx" |
| | | :color="item.lockFlag == 1 ? 'red' : 'green'"> |
| | | <a-timeline-item |
| | | v-for="(item, idx) in logList" |
| | | :key="'log_' + idx" |
| | | :color="item.lockFlag == 1 ? 'red' : 'green'" |
| | | > |
| | | <div> |
| | | <span class="user">{{ item.owner }}</span> 在 |
| | | <span class="time">{{ item.createTime }}</span> |
| | |
| | | </div> |
| | | </a-modal> |
| | | <!-- 锁定清单 --> |
| | | <a-modal :visible="lockListVisible" :width="800" title="下载提示 (有锁定文件)" :destroyOnClose="true" @cancel="lockListCancel" |
| | | @ok="lockListOk"> |
| | | <a-modal |
| | | :visible="lockListVisible" |
| | | :width="800" |
| | | title="下载提示 (有锁定文件)" |
| | | :destroyOnClose="true" |
| | | @cancel="lockListCancel" |
| | | @ok="lockListOk" |
| | | > |
| | | <!-- bom清单中存在锁定图纸的物料 --> |
| | | <template v-if="bomLockList.length"> |
| | | <div class="table-title">bom清单中存在锁定图纸的物料</div> |
| | | <a-table size="small" :scroll="{ y: 150 }" bordered :columns="bomLockColumns" :data-source="bomLockList" |
| | | :pagination="false" :expandRowByClick="true" :row-key="(record, index) => index"></a-table> |
| | | <a-table |
| | | size="small" |
| | | :scroll="{ y: 150 }" |
| | | bordered |
| | | :columns="bomLockColumns" |
| | | :data-source="bomLockList" |
| | | :pagination="false" |
| | | :expandRowByClick="true" |
| | | :row-key="(record, index) => index" |
| | | ></a-table> |
| | | </template> |
| | | <!-- 其他附件中存在锁定文件 --> |
| | | <template v-if="otherLockList.length"> |
| | | <div class="table-title">其他附件中存在锁定文件</div> |
| | | <a-table size="small" :scroll="{ y: 150 }" bordered :columns="otherLockColumns" :data-source="otherLockList" |
| | | :pagination="false" :expandRowByClick="true" :row-key="(record, index) => index"></a-table> |
| | | <a-table |
| | | size="small" |
| | | :scroll="{ y: 150 }" |
| | | bordered |
| | | :columns="otherLockColumns" |
| | | :data-source="otherLockList" |
| | | :pagination="false" |
| | | :expandRowByClick="true" |
| | | :row-key="(record, index) => index" |
| | | ></a-table> |
| | | </template> |
| | | </a-modal> |
| | | <a-modal :visible="feedbackShow" :width="800" title="问题反馈" :destroyOnClose="true" :footer="false" |
| | | @cancel="feedbackCancel"> |
| | | <feedback-form :prod-data="customProd" @cancel="feedbackCancel" @ok="feedbackOk"></feedback-form> |
| | | <a-modal |
| | | :visible="feedbackShow" |
| | | :width="800" |
| | | title="问题反馈" |
| | | :destroyOnClose="true" |
| | | :footer="false" |
| | | @cancel="feedbackCancel" |
| | | > |
| | | <feedback-form |
| | | :prod-data="customProd" |
| | | @cancel="feedbackCancel" |
| | | @ok="feedbackOk" |
| | | ></feedback-form> |
| | | </a-modal> |
| | | <!-- ecr列表 --> |
| | | <a-modal :visible="ecrListVisible" :width="800" title="ecr记录" :destroyOnClose="true" @cancel="ecrListCancel"> |
| | | <a-modal |
| | | :visible="ecrListVisible" |
| | | :width="800" |
| | | title="ecr记录" |
| | | :destroyOnClose="true" |
| | | @cancel="ecrListCancel" |
| | | > |
| | | <div class="footer" slot="footer"> |
| | | <a-button type="primary" @click="ecrListCancel">关闭</a-button> |
| | | </div> |
| | | <div class="ecr-content"> |
| | | <a-table ref="aTable" size="small" :scroll="{ y: 700 }" bordered :columns="ecrColumns" :data-source="ecrList" |
| | | :pagination="false" rowKey="id"> |
| | | <a-table |
| | | ref="aTable" |
| | | size="small" |
| | | :scroll="{ y: 700 }" |
| | | bordered |
| | | :columns="ecrColumns" |
| | | :data-source="ecrList" |
| | | :pagination="false" |
| | | rowKey="id" |
| | | > |
| | | <template slot="changeDesc" slot-scope="text, record"> |
| | | <a-tooltip placement="topLeft"> |
| | | <template slot="title"> |
| | |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </a-modal> |
| | | <a-modal |
| | | :visible="errorVisible" |
| | | :footer="null" |
| | | :width="1200" |
| | | title="名称或型号命名不规范" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="errorVisible = false" |
| | | > |
| | | <a-table |
| | | ref="aTable" |
| | | size="small" |
| | | :scroll="{ y: 500 }" |
| | | bordered |
| | | :columns="errorTbl2.columns" |
| | | :data-source="errorTbl2.dataSource" |
| | | :pagination="false" |
| | | rowKey="num" |
| | | ></a-table> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | |
| | | dataIndex: "changeDescription", |
| | | align: "center", |
| | | ellipsis: true, |
| | | scopedSlots: { customRender: 'changeDesc' } |
| | | scopedSlots: { customRender: "changeDesc" }, |
| | | }, |
| | | ]; |
| | | return { |
| | | errorVisible: false, |
| | | ecrColumns, |
| | | feedbackShow: false, |
| | | lockListVisible: false, |
| | |
| | | columns: errorColumns, |
| | | dataSource: [], |
| | | }, |
| | | errorTbl2: { |
| | | columns: [ |
| | | { |
| | | title: "子件编码", |
| | | dataIndex: "subCode", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "子件型号", |
| | | dataIndex: "subModel", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "子件名称", |
| | | dataIndex: "subName", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "问题描述", |
| | | dataIndex: "irregularDesc", |
| | | align: "center", |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | }, |
| | | bomLockColumns: [ |
| | | { |
| | | title: "子件名称", |
| | |
| | | let data = []; |
| | | let total = 0; |
| | | if (res.code && res.data) { |
| | | data = res.data2.list.map(v => { |
| | | if ('' != v.customCode) { |
| | | data = res.data2.list.map((v) => { |
| | | if ("" != v.customCode) { |
| | | v.ecrList = []; |
| | | } |
| | | return v; |
| | |
| | | this.prodUploadShow = true; |
| | | this.$message.success("解析成功"); |
| | | } else { |
| | | this.$message.error(msg); |
| | | if (msg == "名称或型号命名不规范") { |
| | | this.errorTbl2.dataSource = data2; |
| | | this.errorVisible = true; |
| | | } else { |
| | | this.$message.error(msg); |
| | | } |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | |
| | | }, |
| | | ecrListCancel() { |
| | | this.ecrListVisible = false; |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | |
| | | .modal-footer { |
| | | text-align: right; |
| | | |
| | | button+button { |
| | | button + button { |
| | | margin-left: 8px; |
| | | } |
| | | } |