feat: 增加扫码冲突日志和待拆零赋码页面
							parent
							
								
									fb888c3b08
								
							
						
					
					
						commit
						d84f03293c
					
				| @ -0,0 +1,10 @@ | |||||||
|  | import axios from '@/utils/request' | ||||||
|  | 
 | ||||||
|  | export function getList(query) { | ||||||
|  |   return axios({ | ||||||
|  |     url: "/udiwms/ioCollectErrorLog/filter", | ||||||
|  |     method: "get", | ||||||
|  |     params: query | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| @ -0,0 +1,142 @@ | |||||||
|  | <template> | ||||||
|  |   <el-card> | ||||||
|  |     <el-form :inline="true" :model="query" class="query-form" size="mini" | ||||||
|  |              style="margin-bottom: 10px" | ||||||
|  |     > | ||||||
|  |       <el-form-item class="query-form-item" label="错误类型:" prop="type"> | ||||||
|  |         <el-select | ||||||
|  |           v-model="query.type" | ||||||
|  |           placeholder="请选择错误类型" | ||||||
|  |           clearable | ||||||
|  |           style="width: 210px" | ||||||
|  |         > | ||||||
|  |           <el-option | ||||||
|  |             label="1: 未上传医保替换码" | ||||||
|  |             :value="1" | ||||||
|  |           /> | ||||||
|  |           <el-option | ||||||
|  |             label="2: 已上传替换码" | ||||||
|  |             :value="2" | ||||||
|  |           /> | ||||||
|  |         </el-select> | ||||||
|  | 
 | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|  |       <el-form-item> | ||||||
|  |         <el-button-group> | ||||||
|  |           <el-button | ||||||
|  |             type="primary" | ||||||
|  |             icon="el-icon-refresh" | ||||||
|  |             @click="onReset" | ||||||
|  |           >重置 | ||||||
|  |           </el-button> | ||||||
|  |           <el-button type="primary" @click="getList" | ||||||
|  |                      icon="el-icon-search" | ||||||
|  |           >查询 | ||||||
|  |           </el-button | ||||||
|  |           > | ||||||
|  |         </el-button-group> | ||||||
|  |       </el-form-item> | ||||||
|  |     </el-form> | ||||||
|  |     <el-table :data="list" style="width: 100%;" :row-style="{height: '32px' }" | ||||||
|  |               highlight-current-row | ||||||
|  |     > | ||||||
|  |       <el-table-column type="index" label="序号"></el-table-column> | ||||||
|  |       <el-table-column label="单据号 " prop="orderId" width="160"></el-table-column> | ||||||
|  |       <el-table-column label="自动赋码 " prop="autoCode" width="220"></el-table-column> | ||||||
|  |       <el-table-column label="手动赋码 " prop="manuCode" width="220"></el-table-column> | ||||||
|  |       <el-table-column label="错误类型" prop="type" width="140"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span>{{ errorTypes[scope.row.type] }}</span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="更新时间" prop="updateTime" width="180"></el-table-column> | ||||||
|  |       <el-table-column label="更新人" prop="updateUser" width="80"></el-table-column> | ||||||
|  |       <el-table-column label="备注" prop="remark" width="380"></el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="操作" fixed="right" width="140"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </el-table> | ||||||
|  |     <pagination | ||||||
|  |       :total="total" | ||||||
|  |       :limit.sync="query.limit" | ||||||
|  |       :page.sync="query.page" | ||||||
|  |       @pagination="getList()" | ||||||
|  |     > | ||||||
|  |     </pagination> | ||||||
|  | 
 | ||||||
|  |   </el-card> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { getList } from '@/api/collect/collectErrorlog' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   components: {}, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       query: { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |         orderId: null, | ||||||
|  |         type: null, | ||||||
|  |         workplaceStatus: 1, | ||||||
|  |         deptCode: '' | ||||||
|  |       }, | ||||||
|  |       errorTypes:{ | ||||||
|  |         1: "未上传医保替换码", | ||||||
|  |         2: "已上传替换码" | ||||||
|  |       }, | ||||||
|  |       showSearch: true, | ||||||
|  |       Dictionary: false, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       total: null, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   computed: {}, | ||||||
|  |   methods: { | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch | ||||||
|  |     }, | ||||||
|  |     onReset() { | ||||||
|  |       this.$router.push({ | ||||||
|  |         path: '' | ||||||
|  |       }) | ||||||
|  |       this.query = { | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |         workplaceStatus: null | ||||||
|  |       } | ||||||
|  |       this.getList() | ||||||
|  |     }, | ||||||
|  |     getList() { | ||||||
|  |       getList(this.query).then(res => { | ||||||
|  |         if (res.code != 20000) { | ||||||
|  |           return this.$message.error(res.message) | ||||||
|  |         } | ||||||
|  |         this.list = res.data.list || [] | ||||||
|  |         this.total = res.data.total || 0 | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getList() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | .type-tips { | ||||||
|  |   margin-top: 8px; | ||||||
|  |   display: flex; | ||||||
|  |   align-items: center; | ||||||
|  |   padding: 6px 10px; | ||||||
|  |   background: #f5f7fa; | ||||||
|  |   border-radius: 4px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | </style> | ||||||
| @ -0,0 +1,621 @@ | |||||||
|  | <template> | ||||||
|  |   <div> | ||||||
|  |     <el-card> | ||||||
|  |       <el-form v-if="queryList && queryList.length > 0 " :model="filterQuery" class="query-form" | ||||||
|  |                @submit.native.prevent | ||||||
|  |                size="mini" label-width="100px" | ||||||
|  |       > | ||||||
|  |         <el-row style=" display:flex;  flex-wrap: wrap; "> | ||||||
|  |           <template v-for="(item, index) in queryList"> | ||||||
|  |             <div v-if="showSearch || item.isImport"> | ||||||
|  |               <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" | ||||||
|  |                             class="query-form-item" | ||||||
|  |                             :label="item.columnDesc+`:`" :key="item.id" | ||||||
|  |               > | ||||||
|  |                 <el-input | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc == '模糊查询' ? '单据号/单据类型/收货方/发货方' : item.columnDesc" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   @keyup.enter.native="executeFuc($event,'5',item.clickFuc)" | ||||||
|  |                   clearable | ||||||
|  |                 ></el-input> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" | ||||||
|  |                             class="query-form-item" | ||||||
|  |                             :label="item.columnDesc+`:`" | ||||||
|  |               > | ||||||
|  |                 <el-select v-model="filterQuery[item.columnName]" | ||||||
|  |                            :placeholder="item.columnDesc" | ||||||
|  |                            :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                            clearable | ||||||
|  |                 > | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="dict in item.lableRuleObj" | ||||||
|  |                     :key="dict.value" | ||||||
|  |                     :label="dict.label" | ||||||
|  |                     :value="dict.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" | ||||||
|  |                             class="query-form-item" | ||||||
|  |                             :label="item.columnDesc+`:`" | ||||||
|  |               > | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                   @change="executeFuc($event,'5',item.checkRules)" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   filterable | ||||||
|  |                   remote | ||||||
|  |                   :remote-method="(query) => executeFuc(query,'5',item.clickFuc)" | ||||||
|  |                   clearable | ||||||
|  |                 > | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in options[item.clickFuc]" | ||||||
|  |                     :key="item.code" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.code" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" | ||||||
|  |                             class="query-form-item" | ||||||
|  |                             :label="item.columnDesc+`:`" | ||||||
|  |               > | ||||||
|  |                 <el-date-picker | ||||||
|  |                   :picker-options="pickerOptions" | ||||||
|  |                   v-model="actDateRange" | ||||||
|  |                   type="daterange" | ||||||
|  |                   format="yyyy 年 MM 月 dd 日" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   range-separator="至" | ||||||
|  |                   start-placeholder="开始日期" | ||||||
|  |                   end-placeholder="结束日期" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |               <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" | ||||||
|  |                             class="query-form-item" | ||||||
|  |                             :label="item.columnDesc+`:`" | ||||||
|  |               > | ||||||
|  |                 <el-date-picker | ||||||
|  |                   v-model="filterQuery[item.columnName]" | ||||||
|  |                   :style="`width:${item.width+'px'}`" | ||||||
|  |                   value-format="yyyy-MM-dd" | ||||||
|  |                   :disabled="executeEval(null,item.disabledFuc,false)" | ||||||
|  |                   type="date" | ||||||
|  |                   :placeholder="item.columnDesc" | ||||||
|  |                 ></el-date-picker> | ||||||
|  |               </el-form-item> | ||||||
|  |             </div> | ||||||
|  |           </template> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |       <!--      <div class="left-search" v-if="!showSearch">--> | ||||||
|  |       <!--        <!– 关键字搜索 按需配置 –>--> | ||||||
|  |       <!--        <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px">--> | ||||||
|  |       <!--          <el-row style=" display:flex;  flex-wrap: wrap; ">--> | ||||||
|  |       <!--            <template v-for="(item, index) in queryList">--> | ||||||
|  |       <!--              <el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"--> | ||||||
|  |       <!--                            class="query-form-item"--> | ||||||
|  |       <!--                            :label="item.columnDesc+`:`" :key="item.id">--> | ||||||
|  |       <!--                <el-input--> | ||||||
|  |       <!--                  v-model="filterQuery[item.columnName]"--> | ||||||
|  |       <!--                  :placeholder="item.columnDesc"--> | ||||||
|  |       <!--                  :disabled="executeEval(null,item.disabledFuc,false)"--> | ||||||
|  |       <!--                  @keyup.enter.native="executeFuc($event,'5',item.clickFuc)"--> | ||||||
|  |       <!--                  clearable--> | ||||||
|  |       <!--                ></el-input>--> | ||||||
|  |       <!--              </el-form-item>--> | ||||||
|  |       <!--            </template>--> | ||||||
|  |       <!--          </el-row>--> | ||||||
|  |       <!--        </el-form>--> | ||||||
|  |       <!--      </div>--> | ||||||
|  |       <div class="top-right-btn"> | ||||||
|  |         <el-button-group> | ||||||
|  |           <el-button icon="el-icon-view" type="primary" @click="hideSearch">高级查询</el-button> | ||||||
|  |           <el-button | ||||||
|  |             type="primary" | ||||||
|  |             icon="el-icon-refresh" | ||||||
|  |             @click="onReset" | ||||||
|  |           >重置 | ||||||
|  |           </el-button> | ||||||
|  |           <el-button type="primary" icon="el-icon-search" @click="onSubmit(this)" | ||||||
|  |           >查询 | ||||||
|  |           </el-button | ||||||
|  |           > | ||||||
|  |         </el-button-group> | ||||||
|  |       </div> | ||||||
|  |       <el-divider style="margin: 15px"></el-divider> | ||||||
|  |       <el-table v-loading="loading" :data="list" style="width: 100%;" border highlight-current-row | ||||||
|  |                 @row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)" ref="multipleTable" | ||||||
|  |                 :default-sort="defaultSort" | ||||||
|  |                 :row-style="{ height: '32px' }" | ||||||
|  |                 @sort-change="handleSortChange" | ||||||
|  |       > | ||||||
|  |         <template v-for="(item, index) in tableHeader"> | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'id' && executeEval(row,item.expression,true)" | ||||||
|  |             type="index" :label="item.columnDesc" | ||||||
|  |           ></el-table-column> | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'selection'" | ||||||
|  |             type="selection" | ||||||
|  |             :width="item.width" | ||||||
|  |             :selectable="(row,number) => executeFuc(row,'3',item.clickFuc)" | ||||||
|  |           ></el-table-column> | ||||||
|  | 
 | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)" | ||||||
|  |             :prop="item.columnName" | ||||||
|  |             :label="item.columnDesc" | ||||||
|  |             :sortable="item.sort" | ||||||
|  |             :width="item.width" | ||||||
|  |             :show-overflow-tooltip="item.tooltip" | ||||||
|  |             :key="item.columnName" | ||||||
|  |           > | ||||||
|  |             <template slot-scope="scope"> | ||||||
|  |               <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)" | ||||||
|  |             :prop="item.columnName" | ||||||
|  |             :label="item.columnDesc" | ||||||
|  |             :sortable="item.sort" | ||||||
|  |             :width="item.width" | ||||||
|  |             :show-overflow-tooltip="item.tooltip" | ||||||
|  |             :key="item.columnName" | ||||||
|  |           > | ||||||
|  |             <template slot-scope="scope"> | ||||||
|  |             <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ | ||||||
|  |                 item.lableRuleObj[scope.row[item.columnName]] | ||||||
|  |               }}</span> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)" | ||||||
|  |             :prop="item.columnName" | ||||||
|  |             :label="item.columnDesc" | ||||||
|  |             :sortable="item.sort" | ||||||
|  |             :width="item.width" | ||||||
|  |             :show-overflow-tooltip="item.tooltip" | ||||||
|  |             :key="item.columnName" | ||||||
|  |           > | ||||||
|  |             <template slot-scope="scope"> | ||||||
|  |               <el-tag | ||||||
|  |                 :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])" | ||||||
|  |               > | ||||||
|  |               <span>{{ | ||||||
|  |                   item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName] | ||||||
|  |                 }}</span> | ||||||
|  |               </el-tag> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  | <!--          <el-table-column--> | ||||||
|  | <!--            v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"--> | ||||||
|  | <!--            :prop="item.columnName"--> | ||||||
|  | <!--            :label="item.columnDesc"--> | ||||||
|  | <!--            :width="item.width"--> | ||||||
|  | <!--            :key="item.columnName"--> | ||||||
|  | <!--            fixed="right"--> | ||||||
|  | <!--          >--> | ||||||
|  | <!--            <template slot-scope="scope">--> | ||||||
|  | <!--              <el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"--> | ||||||
|  | <!--                         :type="buttonItem.type"--> | ||||||
|  | <!--                         :size="buttonItem.size"--> | ||||||
|  | <!--                         :style="buttonItem.style"--> | ||||||
|  | <!--                         :key="buttonItem"--> | ||||||
|  | <!--                         v-if="executeEval(scope.row,buttonItem.hasPermi,true)"--> | ||||||
|  | <!--                         :disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"--> | ||||||
|  | <!--                         @click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"--> | ||||||
|  | <!--              >{{ buttonItem.name }}--> | ||||||
|  | <!--              </el-button>--> | ||||||
|  | <!--            </template>--> | ||||||
|  | <!--          </el-table-column>--> | ||||||
|  |           <el-table-column | ||||||
|  |             v-if="item.columnType == 'text' && executeEval(row,item.expression,true)" | ||||||
|  |             :prop="item.columnName" | ||||||
|  |             :label="item.columnDesc" | ||||||
|  |             :sortable="item.sort" | ||||||
|  |             :width="item.width" | ||||||
|  |             :show-overflow-tooltip="item.tooltip" | ||||||
|  |             :key="item.columnName" | ||||||
|  |           > | ||||||
|  |             <template slot-scope="scope"> | ||||||
|  |             <span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ | ||||||
|  |                 scope.row[item.columnName] | ||||||
|  |               }}</span> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </template> | ||||||
|  |       </el-table> | ||||||
|  | 
 | ||||||
|  |       <pagination | ||||||
|  |         v-show="total>0" | ||||||
|  |         :total="total" | ||||||
|  |         :limit.sync="filterQuery.limit" | ||||||
|  |         :page.sync="filterQuery.page" | ||||||
|  |         @pagination="handleCurrentChange" | ||||||
|  |       ></pagination> | ||||||
|  |     </el-card> | ||||||
|  |     <el-tabs type="border-card" style="margin: 15px"> | ||||||
|  | 
 | ||||||
|  |       <el-tab-pane label="扫码明细" v-if="RowType != 1"> | ||||||
|  |         <PanelOrderManuTagCode | ||||||
|  |           v-if="panelALive" | ||||||
|  |           :fifoSplit="3" | ||||||
|  |           :prescribeData="curRow" | ||||||
|  |         ></PanelOrderManuTagCode> | ||||||
|  |       </el-tab-pane> | ||||||
|  |       <el-tab-pane label="拆零明细" v-if="RowType != 1"> | ||||||
|  |         <prescribeCodePanel | ||||||
|  |           v-if="panelALive" | ||||||
|  |           :prescribeData="curRow" | ||||||
|  |           :fifoSplit="1" | ||||||
|  |         ></prescribeCodePanel> | ||||||
|  |       </el-tab-pane> | ||||||
|  |       <el-tab-pane label="整取明细" v-if="RowType != 1"> | ||||||
|  |         <prescribeCodePanel | ||||||
|  |           v-if="panelALive" | ||||||
|  |           :prescribeData="curRow" | ||||||
|  |           :fifoSplit="2" | ||||||
|  |         ></prescribeCodePanel> | ||||||
|  |       </el-tab-pane> | ||||||
|  |       <el-tab-pane label="整单详情"> | ||||||
|  |         <CollectFinishOrderBackupDetail | ||||||
|  |           v-if="panelALive" | ||||||
|  |           :prescribeData="curRow" | ||||||
|  |         ></CollectFinishOrderBackupDetail> | ||||||
|  |       </el-tab-pane> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     </el-tabs> | ||||||
|  | 
 | ||||||
|  |     <el-dialog | ||||||
|  |       :title="scanTitleMap[scanTitle]" | ||||||
|  |       :visible.sync="codeCheckVisible" | ||||||
|  |       :close-on-click-modal="false" | ||||||
|  |       :close-on-press-escape="false" | ||||||
|  |       v-if="codeCheckVisible" | ||||||
|  |       width="80%" | ||||||
|  |       append-to-body | ||||||
|  |       @close="closeCodeCheckDialog" | ||||||
|  |     > | ||||||
|  |       <DialogCheckCode | ||||||
|  |         :orderData="curRow" | ||||||
|  |         :closeCodeCheckDialog="closeCodeCheckDialog" | ||||||
|  |         :type="scanTitle" | ||||||
|  |       > | ||||||
|  | 
 | ||||||
|  |       </DialogCheckCode> | ||||||
|  |     </el-dialog> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import addOrder from '@/views/inout/DialogCreateOrder' | ||||||
|  | import errOrder from '@/views/inout/IoCreateErrorOrder' | ||||||
|  | import {executeFuc, getHead} from '@/utils/customConfig' | ||||||
|  | import {convertDate} from '@/utils/date' | ||||||
|  | import prescribeCodePanel from './PanelOrderTagCode' | ||||||
|  | import PanelOrderManuTagCode from './PanelOrderManuTagCode' | ||||||
|  | import prescribeOriginPanel from '@/views/collect/PannelOrderBiz' | ||||||
|  | import CollectFinishOrderDetail from '@/views/collect/CollectFinishOrderDetail' | ||||||
|  | import CollectFinishOrderBackupDetail from "./CollectFinishOrderBackupDetail" | ||||||
|  | import DialogCheckCode from "./DialogCheckCode" | ||||||
|  | 
 | ||||||
|  | import {orderFinish, orderPage} from '@/api/collect/collectOrder' | ||||||
|  | import {filterWorkOptimize} from '@/api/basic/workPlace/sysWorkplaceManage' | ||||||
|  | import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: 'prescribePanel', | ||||||
|  |   props: { | ||||||
|  |     RowType: { | ||||||
|  |       type: Object, | ||||||
|  |       default: 1, | ||||||
|  |       required: false | ||||||
|  |     }, | ||||||
|  |     workPlaceCode: { | ||||||
|  |       type: Number, | ||||||
|  |       default: null, | ||||||
|  |       required: true | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       busQuery: { | ||||||
|  |         busKey: '', | ||||||
|  |         workplaceCode: null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 100 | ||||||
|  |       }, | ||||||
|  |       //界面配置相关 | ||||||
|  |       //患者处方 | ||||||
|  |       tableHeader: [], | ||||||
|  |       queryList: [], | ||||||
|  |       tableObj: [], | ||||||
|  |       fromList: [], | ||||||
|  |       //处方明细 | ||||||
|  |       tableHeader1: [], | ||||||
|  |       queryList1: [], | ||||||
|  |       tableObj1: [], | ||||||
|  |       fromList1: [], | ||||||
|  | 
 | ||||||
|  |       convertDateFun: convertDate, | ||||||
|  |       pickerOptions: { | ||||||
|  |         shortcuts: [ | ||||||
|  |           { | ||||||
|  |             text: "最近一周", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近一个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             text: "最近三个月", | ||||||
|  |             onClick(picker) { | ||||||
|  |               const end = new Date(); | ||||||
|  |               const start = new Date(); | ||||||
|  |               start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||||||
|  |               picker.$emit("pick", [start, end]); | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |       }, | ||||||
|  |       actDateRange: [], | ||||||
|  |       //界面配置-------------end | ||||||
|  | 
 | ||||||
|  |       showSearch: false, | ||||||
|  |       filterQuery: { | ||||||
|  |         busType: null, | ||||||
|  |         tagStatus: 6, | ||||||
|  |         billNo: null, | ||||||
|  |         workPlaceCode: null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10 | ||||||
|  |       }, | ||||||
|  |       defaultSort: {prop: 'createTime', order: 'desc'}, | ||||||
|  |       loading: false, | ||||||
|  |       list: [], | ||||||
|  |       total: 0, | ||||||
|  | 
 | ||||||
|  |       preLoading: false, | ||||||
|  |       preDetailList: [], | ||||||
|  |       preTotal: 0, | ||||||
|  |       preQuery: { | ||||||
|  |         prescribeCode: null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10 | ||||||
|  |       }, | ||||||
|  | 
 | ||||||
|  |       curRow: null, | ||||||
|  |       panelALive: false, | ||||||
|  |       options: { | ||||||
|  |         findWorkPlace: [], | ||||||
|  |         getBusType: [], | ||||||
|  |       }, | ||||||
|  |       showType: 1, | ||||||
|  |       isLinkDisabled: false, | ||||||
|  |       codeCheckVisible: false, | ||||||
|  | 
 | ||||||
|  |       //码校验数据 | ||||||
|  | 
 | ||||||
|  |       scanTitle: 1, | ||||||
|  |       scanTitleMap: { | ||||||
|  |         1 : '扫码校验', | ||||||
|  |         2 : '校验详情' | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|  |   components: { | ||||||
|  |     addOrder, | ||||||
|  |     errOrder, | ||||||
|  |     prescribeCodePanel, | ||||||
|  |     prescribeOriginPanel, | ||||||
|  |     PanelOrderManuTagCode, | ||||||
|  |     CollectFinishOrderDetail, | ||||||
|  |     CollectFinishOrderBackupDetail, | ||||||
|  |     DialogCheckCode | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     changePlace(_this, query) { | ||||||
|  |       _this.getWorkBindBusTypes(_this, query) | ||||||
|  |     }, | ||||||
|  |     getWorkBindBusTypes(_this, query) { | ||||||
|  |       _this.busQuery.workplaceCode = query | ||||||
|  |       getWorkBindBusTypes(this.busQuery).then(res => { | ||||||
|  |         if (res.code == 20000) { | ||||||
|  |           let busTypes = res.data.list || []; | ||||||
|  |           // _this.options.getWorkPlace = res.data.list || []; | ||||||
|  |           let getWorkPlace = busTypes.map(busType => { | ||||||
|  |             return { | ||||||
|  |               code: busType.documentTypeCode, | ||||||
|  |               label: busType.busName | ||||||
|  |             }; | ||||||
|  |           }); | ||||||
|  |           _this.options.getBusType = getWorkPlace | ||||||
|  |           if (_this.options.getBusType.length == 1) { | ||||||
|  |             _this.filterQuery.busType = _this.options.getBusType[0].code | ||||||
|  |           } else { | ||||||
|  |             _this.filterQuery.busType = null | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |         return | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     //界面配置相关------------ | ||||||
|  |     executeFuc(row, type, clickFuc, value) { | ||||||
|  |       return executeFuc(this, row, type, clickFuc, value) | ||||||
|  |     }, | ||||||
|  |     executeEval(row, expression, defaultRet) { | ||||||
|  |       if (expression) { | ||||||
|  |         return eval(expression) | ||||||
|  |       } | ||||||
|  |       return defaultRet | ||||||
|  |     }, | ||||||
|  |     handleSortChange(column, prop, order) { | ||||||
|  |       if (column.order === 'descending') { | ||||||
|  |         this.query.sort = 'desc' | ||||||
|  |       } else { | ||||||
|  |         this.query.sort = 'asc' | ||||||
|  |       } | ||||||
|  |       this.query.orderBy = column.prop | ||||||
|  |       this.getList() | ||||||
|  |     }, | ||||||
|  |     ///界面配置相关------------end | ||||||
|  | 
 | ||||||
|  |     hideSearch() { | ||||||
|  |       this.showSearch = !this.showSearch | ||||||
|  |       this.$nextTick(() => { | ||||||
|  |         console.log('组件已刷新'); | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     onReset() { | ||||||
|  |       this.filterQuery = { | ||||||
|  |         busType: null, | ||||||
|  |         tagStatus: 6, | ||||||
|  |         billNo: null, | ||||||
|  |         workPlaceCode: null, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10 | ||||||
|  |       } | ||||||
|  |       this.actDateRange = [] | ||||||
|  |       this.getList() | ||||||
|  |       this.panelALive = false | ||||||
|  |     }, | ||||||
|  |     onSubmit(_this) { | ||||||
|  |       if (_this == null) | ||||||
|  |         _this = this | ||||||
|  |       _this.filterQuery.page = 1 | ||||||
|  |       _this.getList() | ||||||
|  |       _this.panelALive =false | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true | ||||||
|  |       if (this.actDateRange !== null) { | ||||||
|  |         this.filterQuery.startTime = this.actDateRange[0]; | ||||||
|  |         this.filterQuery.endTime = this.actDateRange[1]; | ||||||
|  |       } else { | ||||||
|  |         this.filterQuery.startTime = null; | ||||||
|  |         this.filterQuery.endTime = null; | ||||||
|  |       } | ||||||
|  |       orderFinish(this.filterQuery).then(res => { | ||||||
|  |         this.loading = false | ||||||
|  |         this.list = res.data.list || [] | ||||||
|  |         this.total = res.data.total || 0 | ||||||
|  |       }).catch(() => { | ||||||
|  |         this.loading = false | ||||||
|  |         this.list = [] | ||||||
|  |         this.total = 0 | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     handleCurrentChange(val) { | ||||||
|  |       this.filterQuery.page = val.page | ||||||
|  |       this.getList() | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     prescribeClick(_this, row) { | ||||||
|  |       _this.curRow = row | ||||||
|  |       _this.refreshCodesPanel(_this) | ||||||
|  |     }, | ||||||
|  |     refreshCodesPanel(_this) { | ||||||
|  |       _this.panelALive = false | ||||||
|  |       _this.$nextTick(() => { | ||||||
|  |         _this.panelALive = true | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     findWorkPlace(_this, val) { | ||||||
|  |       let query = { | ||||||
|  |         // chargeUser: _this.$store.getters.adminId, | ||||||
|  |         userIdFlag: true, | ||||||
|  |         key: val, | ||||||
|  |         page: 1, | ||||||
|  |         limit: 10, | ||||||
|  |         workPlaceClass:1 | ||||||
|  |       } | ||||||
|  |       filterWorkOptimize(query) | ||||||
|  |         .then((response) => { | ||||||
|  |           _this.loading = false | ||||||
|  |           _this.options.findWorkPlace = response.data || [] | ||||||
|  |           if (_this.options.findWorkPlace.length == 1) { | ||||||
|  |             _this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code | ||||||
|  |             _this.getWorkBindBusTypes(_this, _this.filterQuery.workPlaceCode) | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |         .catch(() => { | ||||||
|  |           _this.loading = false | ||||||
|  |           _this.options.findWorkPlace = [] | ||||||
|  |         }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     //码校验 | ||||||
|  |     codeCheckClick(_this,row){ | ||||||
|  |       _this.scanTitle = 1 | ||||||
|  |       _this.curRow = row | ||||||
|  |       _this.codeCheckVisible = true | ||||||
|  |     }, | ||||||
|  |     //校验详情 | ||||||
|  |     codeCheckDetail(_this,row){ | ||||||
|  |       _this.scanTitle = 2 | ||||||
|  |       _this.curRow = row | ||||||
|  |       _this.codeCheckVisible = true | ||||||
|  |     }, | ||||||
|  |     closeCodeCheckDialog(){ | ||||||
|  |       this.codeCheckVisible = false | ||||||
|  |       this.getList() | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     if (this.$route.query.workplaceId != null) { | ||||||
|  |       this.isLinkDisabled = true | ||||||
|  |       this.filterQuery.workPlaceCode = this.$route.query.workplaceId | ||||||
|  |       this.showType = 2 | ||||||
|  |     } | ||||||
|  |     this.findWorkPlace(this, '') | ||||||
|  |     this.getWorkBindBusTypes(this, "") | ||||||
|  |     getHead('prescribePanel', '1').then((re) => { | ||||||
|  |       // 处理返回的数据 | ||||||
|  |       this.tableObj = re.data | ||||||
|  |       this.tableHeader = re.data.tableList | ||||||
|  |       this.queryList = re.data.queryList | ||||||
|  |       this.fromList = re.data.fromList | ||||||
|  |       this.getList() | ||||||
|  | 
 | ||||||
|  |     }) | ||||||
|  | 
 | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped> | ||||||
|  | .query-form { | ||||||
|  |   display: flex; | ||||||
|  |   flex-wrap: wrap; | ||||||
|  |   width: 100%; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .query-form-item { | ||||||
|  |   margin-right: 5px; | ||||||
|  |   margin-bottom: 6px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
					Loading…
					
					
				
		Reference in New Issue