123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707 |
- <style lang="scss" scoped>
- .orderDetail{
- ul,li{
- margin: 0;
- padding: 0;
- }
-
- width: 100%;
- .topBody{
- width: 100%;
- background: #FFFFFF;
- margin-bottom: 12px;
- padding: 20px;
- box-sizing: border-box;
- .breadcrumb{
- height: 22px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #000000;
- line-height: 22px;
- }
- .bottom{
- display: flex;
- position: relative;
- justify-content: space-between;
- // padding: 20px;
- .orderIcon{
- width: 28px;
- height: 28px;
- margin-right: 15px;
- img{
- width: 100%;
- }
- }
- .tip{
- .greet{
- width: 300px;
- height: 28px;
- font-size: 20px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- line-height: 28px;
- margin-bottom: 5px;
- }
- .descPosition{
-
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.45);
- overflow: hidden;
- margin-bottom: 0;
- li{
- height: 22px;
- line-height: 22px;
- margin-top:3px ;
- }
- span{
- width: 250px;
- display: inline-block;
- }
- }
- }
- .optBody{
- width: 200px;
- flex-shrink:0;
- // justify-content: flex-end;
- text-align: right;
- .btnBody{
- margin-bottom: 10px;
- }
- .orderInfo{
- display: flex;
- justify-content: space-between;
- text-align: right;
- p{
- margin-bottom: 0;
- }
-
- .markName{
- height: 22px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.45);
- line-height: 22px;
- }
- .big{
- height: 28px;
- font-size: 20px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.85);
- line-height: 28px;
- }
- }
- }
- }
- }
- .section{
- background: white;
- padding:20px ;
- .breadcrumb{
- height: 22px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #000000;
- line-height: 22px;
- }
- .sectionBody{
-
- p{
- margin-bottom: 0;
- }
- .section-item{
- background: white;
- margin-bottom: 20px;
- }
- .tabBox{
- padding: 15px 20px 0;
- display: flex;
- flex-wrap: wrap;
- position: relative;
- .search-item{
- margin-bottom: 12px;
- width: 30%;
- }
- .opt-item{
- position: absolute;
- right: 20px;
- top: 16px;
- }
- }
- .sectionHead{
- padding: 15px 20px;
- // height: 24px;
- font-size: 16px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: rgba(0, 0, 0, 0.85);
- line-height: 24px;
- border-bottom: 1px solid #E9E9E9;;
- .allOrder{
- float: right;
- }
- }
- .section-box{
- margin-top: 30px;
- padding: 20px 20px;
- border: 1px solid #E9E9E9;
- .description{
- margin-top: 10px;
- .time{
- height: 32px;
- line-height: 32px;
- }
- }
- ul{
- display: flex;
- flex-wrap: wrap;
- // justify-content: space-around;
- }
- li{
-
- width: 30%;
- height: 22px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(0, 0, 0, 0.85);
- line-height: 22px;
- text-align: left;
- margin-bottom: 15px;
- }
- .top{
- margin-bottom: 25px;
- }
- .bottom{
- h4{
-
- font-size: 15px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 600;
- color: rgba(0, 0, 0, 0.85);
- margin-bottom: 25px;
- }
- }
- .shenhe{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #52C41A;
- border-radius: 50%;
- position: relative;
- top: -2px;
- }
- .wancheng{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #1890FF;
- border-radius: 50%;
- // margin-right: 3px;
- position: relative;
- top: -2px;
- }
- .bohui{
- width: 6px;
- height: 6px;
- display: inline-block;
- background: #F5222D;
- border-radius: 50%;
- position: relative;
- top: -2px;
- }
- }
-
- }
- }
- }
- .videoBox{
- width: 320px;
- height: 180px;
- }
- .imgBox{
- width: 100%;
- height: 180px;
- }
- .marterialInfo{
-
- p{margin-bottom: 0;}
- ul,li{
- margin: 0;
- padding: 0;
- }
- .info-item{
- margin-bottom: 20px;
- display: flex;
- // justify-content: center;
- align-items: center;
- span{
- display: inline-block;
- width: 70px;
- text-align: left;
- }
- .ant-tag{
- width: auto;
- min-width: 50px;
- text-align: center;
- }
- }
- .info{
- ul{
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- }
- li{
- width: 33.3%;
- margin-bottom: 20px;
- }
- margin-bottom: 0;
- }
- .bottom-btn{
- width: 100%;
- text-align: center;
- position: absolute;
- bottom: 20px;
- left: 0;
- }
- }
- </style>
- <style lang="less">
- .orderDetail{
- .ant-timeline-item-head{
- background: rgb(240,242,245);
- }
- .muen{
- cursor: pointer;
- }
- .muen:hover{
- color: #1890ff;
- }
- }
-
-
- </style>
- <template>
- <div class="orderDetail ">
-
- <div class="section">
- <p class="breadcrumb">
- <a-breadcrumb style="display:block;width:100%">
- <a-breadcrumb-item ><span class="muen" @click="goPlantForm()">工作台</span></a-breadcrumb-item>
- <a-breadcrumb-item>订单列表</a-breadcrumb-item>
- </a-breadcrumb>
- </p>
- <div class="sectionBody">
- <div class="tabBody">
- <a-tabs v-model="activeKey" @change='tabChange'>
- <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title" >
- <!-- {{ pane.content }}{{pane.role+'-'+roleCode}} -->
- </a-tab-pane>
- </a-tabs>
- </div>
- <!-- 素材列表 -->
- <div class="section-item">
- <div class="tabBox">
-
- <div class="search-item">
- <span>订单名称:</span>
- <a-input placeholder="请输入订单名称" allow-clear v-model="orderTitle" style="width:200px" />
- </div>
- <div class="search-item">
- <span>订单编号:</span>
- <a-input placeholder="请输入订单编号" allow-clear v-model="id" style="width:200px" />
- </div>
-
- <div class="search-item">
- <span>发起的人:</span>
- <a-input placeholder="请输入订单发起人" allow-clear v-model="createByName" style="width:200px" />
- </div>
- <div class="opt-item">
- <a-button type='primary' @click="search" style="margin-right:20px">查询</a-button>
- <a-button type='default' @click="reset">查询</a-button>
- </div>
- </div>
-
-
- <div class="section-box">
- <a-table
- size="middle"
- :columns="columns"
- :dataSource="data"
- :pagination="ipagination"
- :loading="loading"
- @change="sort"
- style="word-break: break-all;"
- >
- <div slot="orderStatus" slot-scope="text" >
- <span class="wancheng" v-if="text==3"> </span>
- <span class="bohui" v-else-if="text==2||text==-1"> </span>
- <span class="shenhe" v-else> </span>
- {{text | handleOrderStatus}}
- </div>
- <span slot="options" slot-scope="text,record">
- <a href="javascript:;" @click="viewDetails(record)">详情</a>
- </span>
- <span slot="updateTime" slot-scope="text">
- {{text||'-'}}
- </span>
- </a-table>
- </div>
-
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import moment from 'moment';
- import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
- import qs from 'qs'
- let listColumns=[
- {
- title: '订单名称',
- dataIndex: 'orderTitle',
- align: 'center',
- key: 'orderTitle',
- scopedSlots: { customRender: 'orderTitle' }
- },
- {
- title: '订单编号',
- dataIndex: 'id',
- align: 'center',
- key: 'tag',
- scopedSlots: { customRender: 'id' }
- },
- {
- title: '订单发起人',
- dataIndex: 'createByName',
- align: 'center',
- key: 'createByName',
- scopedSlots: { customRender: 'createByName' }
- },
- {
- title: '订单状态',
- dataIndex: 'orderStatus',
- align: 'center',
- key: 'orderStatus',
- scopedSlots: { customRender: 'orderStatus' }
- },
- {
- title: '更新时间',
- dataIndex: 'updateTime',
- align: 'center',
- key: 'updateTime',
- scopedSlots: { customRender: 'updateTime' }
- },
- {
- title: '操作',
- dataIndex: 'options',
- align: 'center',
- key: 'options',
- width:250,
- scopedSlots: { customRender: 'options' }
- },
- ]
- export default {
- name:'order-list',
- data() {
- const operatorPanes = [
- { title: '我发起的', content: '', key: 1 , },
- { title: '已完成的', content: '', key: 2 ,},
- { title: '被驳回的', content: '', key: 3 , },
- ];
- const designLeaderPanes=[
- { title: '全部订单', content: '', key: 4 , },
- { title: '待确定的', content: '', key: 1 , },
- { title: '已完成的', content: '', key: 3 ,},
-
- ]
- return {
- orderTitle:'',
- createByName:'',
- id:'',
- loadingElse:false,
- videoRejectVisiable:false,
- scriptRejectVisiable:false,
- operatorPanes,
- designLeaderPanes,
- userInfo:{},
- roleCode:'',
- panes:[],
- activeKey: '4',
- orderInfo:{ },
- columns:[...listColumns],
- data:[],
- loading:false,
- ipagination: {
- current: 1,
- pageSize: 10,
- // pageSizeOptions: ['10', '20', '30'],
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 共" + total + "条"
- },
- showQuickJumper: true,
- showSizeChanger:true,
- pageSizeOptions: ['10', '30', '50'],
- total: 0,
- onChange: (current, pageSize) => {
- // 切换分页时的回调,
- // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
- this.ipagination.current = current;
- this.ipagination.pageSize= pageSize;
- }
- },
- // 订单进度
- orderName:'',
- orderId:'',
- orderStatus:'',
- orderParticipants:"",
- orderSponsor:'',
- visible: false,
- placement: 'right',
- currentMaterial:{},
- sizeType:[],
- size: "4",
- }
- },
- methods: {
- goPlantForm(){
- if(this.$parent.role=='operator'){
- this.$parent.currentTabComponent='operatorPlatform'
- }else if(this.$parent.role=='designLeader'){
- this.$parent.currentTabComponent='designleaderPlatform'
- }else if(this.$parent.role=='design'){
- this.$parent.currentTabComponent='designPlatform'
- }
- },
- tabChange(key){
- console.log(key)
- this.tableHttp(key)
- },
- handleChange(value) {
- console.log(`selected ${value}`);
- },
-
- filterOption(input, option) {
- return (
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- );
- },
- // 查看详情
- viewDetails(record){
- console.log(record)
- // this.$router.push(`/workBench/orderDetail?orderId=${record.id}`)
- this.$parent.currentTabComponent='orderDetail';
- this.$parent.orderId=record.id
- },
-
-
- // 撤回订单
- withdrawOrder(){
- },
- // 更多操作
- handleMenuClick(e) {
- console.log('click', e);
- },
- // 催一下
- hurryUp(record){
- console.log(record)
- },
- // 验收
- checkAccept(record){
- console.log(record)
- },
- onClose() {
- this.visible = false;
- },
- // 上传素材
- uploadMaterial(){
- },
- sort(pagination, filters, sorter, { currentDataSource }){
-
- this.ipagination.current=pagination.current;
- this.ipagination.pageSize=pagination.pageSize;
- this.tableHttp(this.activeKey)
- },
-
- search(){
- this.tableHttp(this.activeKey)
- },
- reset(){
- this.orderTitle='';
- this.id='';
- this.createByName='';
-
- },
- tableHttp(type){
- let params=this.handlerParams(type)
- this.loading=true;
- if(this.id){
- params.id=this.id
- }
- if(this.orderTitle){
- params.orderTitle=this.orderTitle
- }
- if(this.createByName){
- params.createByName=this.createByName
- }
-
-
- params={
- ...params,
- pageNo:this.ipagination.current,
- pageSize:this.ipagination.pageSize
- }
- getAction('/platform/order/listByCreatorOrDesignLeader',params).then(res=>{
- console.log(res);
- this.loading=false;
- if(res.success){
- this.data=res.result.list;
- this.ipagination.total=res.result.total;
- }
- })
- },
- handlerParams(status){
- if(this.$parent.role=='operator'){
- if(status==1){
- return {
-
- createBy:this.userInfo.id
- }
- }else if(status==2){
- return {
- orderStatus:3,
- createBy:this.userInfo.id
- }
- }else if(status==3){
- return {
- orderStatus:2,
- createBy:this.userInfo.id
- }
- }
- }else if(this.$parent.role=='designLeader'){
- if(status==1){
- return {
- orderStatus:0,
- design:this.userInfo.id
- }
- }else if(status==2){
- return {
- orderStatus:1,
- design:this.userInfo.id
- }
- }else if(status==3){
- return {
- orderStatus:3,
- design:this.userInfo.id
- }
- }else if(status==4){
- return {
- design:this.userInfo.id
- }
- }
- }
-
- },
- handlerParamsRole(role){
- if(this.$parent.role=='operator'){
- this.panes=this.operatorPanes
- }else if(this.$parent.role=='designLeader'){
- this.panes=this.designLeaderPanes
- }
- }
- },
- mounted(){
-
- let userInfo=localStorage.getItem('pro__Login_Userinfo');
- if(userInfo){
- this.userInfo=JSON.parse(userInfo).value
- }
- this.roleCode=localStorage.getItem('roleCode')
- console.log(this.$parent.orderStatus)
- if(this.$parent.role=='operator'){
- this.panes=this.operatorPanes
- }else if(this.$parent.role=='designLeader'){
- this.panes=this.designLeaderPanes
- }
- this.activeKey=this.$parent.orderStatus
- this.tableHttp(this.$parent.orderStatus)
- },
- filters:{
- handleOrderStatus(val){
- let text
- switch (val) {
- case 0:
- text='待接单'
- break;
- case 1:
- text='制作中'
- break;
- case 2:
- text='已驳回'
- break;
- case 3:
- text='已完成'
- break;
- case -1:
- text='已撤回'
- break;
-
- default:
- text='出错'
- break;
- }
- return text
- }
- },
- activated() {
- if(this.$parent.role=='operator'){
- this.panes=this.operatorPanes
- }else if(this.$parent.role=='designLeader'){
- this.panes=this.designLeaderPanes
- }
- this.activeKey=this.$parent.orderStatus
- this.tableHttp(this.$parent.orderStatus)
- },
- }
- </script>
|