Jelajahi Sumber

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

huxy 2 tahun lalu
induk
melakukan
3d8325a27f

+ 7 - 1
src/api/document/fabricLossesSummary.js

@@ -5,5 +5,11 @@ import { getAction, postAction, deleteAction } from '@/api/manage'
 // 分页列表查询
 const checkList = params => getAction('/orderData/syCostLossReview/queryFabricLossPage', params)
 
+// 取消提交
+const cancelSubmit = params => postAction('/orderData/syCostLossReview/cancelSubmission', params)
 
-export { checkList}
+//审批历史
+const historyApproval  = params => getAction('/orderData/syCostLossReview/querySyApprovalHistory', params)
+
+
+export { checkList,cancelSubmit,historyApproval}

+ 4 - 2
src/api/reportForms/fabric-loss-table.js

@@ -1,9 +1,11 @@
 /** 报表 -- 面料损耗表 **/
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction,deleteAction } from '@/api/manage'
 
 // 分页查询 染损列表
 const getFabricLossDatas = params => getAction('report/FabricLoss/getFabricLossDatas', params)
 //新增
 const saveFabricLossData = params => postAction('report/FabricLoss/save', params)
+const fileDetail= params => postAction('report/FabricLoss/addFile', params)
+const deleteFileDetail= params => deleteAction('report/FabricLoss/deleteFile', params)
 
-export { getFabricLossDatas,saveFabricLossData }
+export { getFabricLossDatas,saveFabricLossData,fileDetail,deleteFileDetail }

+ 43 - 2
src/views/book/addBookDrawer.vue

@@ -194,11 +194,11 @@
                 </a-form-model-item>
               </a-col>
 
-               <a-col :md="6" :sm="8">
+               <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="金额" prop="money">
                   <a-input placeholder="请输入金额" v-model="addBook.money"></a-input>
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="运输方式" prop="typeOfShipping">
@@ -280,6 +280,13 @@
                 </a-popconfirm>
               </span>
             </a-table>
+            <div class="amount">
+               <span class="all">总数量:{{ allMount.toFixed(2) }}</span>
+               <span class="all">总箱数:{{ allBox.toFixed(2) }}</span>
+               <span class="all">总毛重:{{ allGross.toFixed(2) }}</span>
+               <span class="all">总净重:{{ allNet.toFixed(2) }}</span>
+               <span class="all">总金额:{{ allMoney.toFixed(2) }}</span>
+             </div>
           </a-form-model>
 
           <!-- 人民币、美金 -->
@@ -684,6 +691,11 @@ export default {
       confirmLoading: false,
       visible: false,
       dateFormat: 'YYYY-MM-DD',
+      allMount:0,
+      allGross:0,
+      allNet:0,
+      allMoney:0,
+      allBox:0,
       itemIds:[],//参照面料选中的ID集合
       validatorRules: {
           shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
@@ -1258,6 +1270,24 @@ export default {
 
   // 出现滚动条,合计栏跟随 table 滚动
   watch: {
+    addBookData:{
+      deep: true,
+      handler(val) {
+        this.allGross = 0
+      this.allMoney = 0
+      this.allMount = 0
+      this.allNet = 0
+      this.allBox = 0
+        val.map(item=>{
+          this.allGross+=Number(item.grossWeight)
+          this.allMoney+=Number(item.totalPrice)
+          this.allMount+=Number(item.number)
+          this.allNet+=Number(item.netWeight)
+          this.allBox += Number(item.boxNumber)
+        })
+      }
+      
+      }
     // dataSource(val) {
     //   console.log(val)
     //   // 同步表与footer滚动
@@ -1323,4 +1353,15 @@ export default {
       padding-top: 8px !important;
     padding-bottom: 8px !important;
 }
+// /deep/.ant-form{
+//   position: relative;
+// }
+.amount{
+  // position:absolute;
+  // bottom: -21%;
+  width: 50%;
+}
+.all{
+  margin-right: 4%;
+}
 </style>

+ 19 - 0
src/views/book/book-list.vue

@@ -141,6 +141,7 @@
               <!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
               <a-menu-item><a @click="edit(record,'2')">详情</a></a-menu-item>
               <a-menu-item><a @click="edit(record,'1')">编辑</a></a-menu-item>
+               <a-menu-item v-if="record.readyFabric=='辅料'"><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item ><a @click="pushU8(record)">推送u8</a></a-menu-item> -->
               <!-- <a-menu-item><a @click="print(record)">打印</a></a-menu-item> -->
               <a-menu-item>
@@ -152,6 +153,7 @@
              <a-menu slot="overlay" v-if="record.theDocumentsState == '1'">
               <!-- <a-menu-item><a @click="canaleSubmit(record)">取消提交</a></a-menu-item> -->
               <a-menu-item><a @click="edit(record,'2')">详情</a></a-menu-item>
+              <a-menu-item v-if="record.readyFabric=='辅料'"><a @click="copyForm(record)">复制</a></a-menu-item>
               <a-menu-item ><a @click="pushU8(record)" >推送u8</a></a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -322,7 +324,9 @@ export default {
     getBookList(){
       this.$nextTick(() => {
         // this.queryParam.pageSize = 50
+        this.loading = true
         bookList(this.queryParam).then(res => {
+          this.loading = false
           if (res.success) {
            this.bookListData = res.result.records
            this.selectedRowKeys = []
@@ -528,6 +532,21 @@ export default {
         })
       })
     },
+
+    //辅料 - 复制
+    copyForm(record){
+      bookListId({id:record.id,type:this.queryParam.type}).then(res => {
+          if (res.success) {
+            var data =res.result
+            this.$refs.addBookDrawer.visible = true
+              this.$refs.addBookDrawer.defaultMethod = 'edit'
+              if(data.latestDateOfShipment!==''&&data.latestDateOfShipment){
+                 data.latestDateOfShipment = (moment(data.latestDateOfShipment)).format('YYYY-MM-DD')
+              }
+              this.$refs.addBookDrawer.addBook = data
+          }
+        })
+    },
     // 操作 打印
     print(record) {},
     // 操作 删除

+ 41 - 2
src/views/book/detailsBookDrawer.vue

@@ -163,13 +163,20 @@
               :columns="addBookColumns"
               :data-source="addBookData"
               :loading="loading"
-              :pagination="ipagination"
+              :pagination="false"
               :scroll="{ x: 1500,y: 350 }"
               @change="handleTableChange"
             >
             </a-table>
+            <div class="amount">
+               <span class="all">总数量:{{ allMount.toFixed(2) }}</span>
+               <span class="all">总箱数:{{ allBox.toFixed(2) }}</span>
+               <span class="all">总毛重:{{ allGross.toFixed(2) }}</span>
+               <span class="all">总净重:{{ allNet.toFixed(2) }}</span>
+               <span class="all">总金额:{{ allMoney.toFixed(2) }}</span>
+             </div>
           </a-form-model>
-
+          
           <!-- 人民币、美金 -->
           <a-row style="margin:60px 0;">
             <div class="purchase-order-table" style="width:48%;marginRight:4%;float:left;">
@@ -453,6 +460,11 @@ export default {
       confirmLoading: false,
       visible: false,
       dateFormat: 'YYYY-MM-DD',
+      allMount:0,
+      allGross:0,
+      allNet:0,
+      allMoney:0,
+      allBox:0,
       validatorRules: {
           shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
           consignee:[{required: true, message: '收货人不能为空!'}],
@@ -461,6 +473,22 @@ export default {
     }
   },
   created() {},
+  watch: {
+    addBookData(val) {
+      this.allGross = 0
+      this.allMoney = 0
+      this.allMount = 0
+      this.allNet = 0
+      this.allBox = 0
+        val.map(item=>{
+          this.allGross+=Number(item.grossWeight)
+          this.allMoney+=Number(item.totalPrice)
+          this.allMount+=Number(item.number)
+          this.allNet+=Number(item.netWeight)
+          this.allBox += Number(item.boxNumber)
+        })
+      }
+    },
    filters: {
                 //文字数超出时,超出部分使用...
                 ellipsis(value) {
@@ -553,4 +581,15 @@ export default {
   border: none;
   padding: 0;
 }
+// /deep/.ant-form{
+//   position: relative;
+// }
+.amount{
+  // position:absolute;
+  // bottom: 2%;
+  width: 50%;
+}
+.all{
+  margin-right: 4%;
+}
 </style>

+ 51 - 5
src/views/cost-allocation-total/fabricLossesSummary.vue

@@ -100,10 +100,18 @@
         @change="handleTableChange"
       >
       <span slot="action" slot-scope="text, record">
-          <a @click="handleApply(record)" v-if="apply == 1 && (record.status=='保存' ||record.status=='完成'|| record.status=='' || record.status==undefined)">发起申请</a>
-          <a-divider type="vertical"  v-if="apply == 1 && (record.status=='保存' ||record.status=='完成'|| record.status=='' || record.status==undefined)"/>
+          <!-- <a @click="handleApply(record)" v-if="apply == 1 && (record.status=='保存' ||record.status=='完成'|| record.status=='' || record.status==undefined)">发起申请</a>
+          <a-divider type="vertical"  v-if="apply == 1 && (record.status=='保存' ||record.status=='完成'|| record.status=='' || record.status==undefined)"/> -->
           <a @click="openAppendixList(record)" v-if="record.attachs!==''&&record.attachs">附件</a>
-
+          <a-divider v-if="record.attachs!==''&&record.attachs"/>
+          <a-dropdown>
+          <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
+            <a-menu slot="overlay" >
+              <a-menu-item><a @click="cancelSumit(record)">取消提交</a></a-menu-item>
+              <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
+              <a-menu-item><a @click="approvalHistory(record)">审批历史</a></a-menu-item>
+            </a-menu>
+            </a-dropdown>                  
         </span>
       </a-table>
     </a-card>
@@ -111,6 +119,8 @@
     <!-- 详情 大抽屉 -->
     <!-- <costDetail-drawer ref="costDetailDrawer" :fatherList="getCostList" @ok="modalFormOk"></costDetail-drawer> -->
     <attachment   ref="attachment"></attachment>
+    <history-modal ref="historyModal"></history-modal>
+    <detail-fabric-loss-table ref="detailFabricLossTable"  @close="getCostList"></detail-fabric-loss-table>
   </div>
 </template>
 
@@ -121,13 +131,15 @@ import moment from 'moment'
 
 import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
 import attachment from '@views/cost-allocation-total/modal/attachment.vue'
+import historyModal from '@views/cost-allocation-total/modal/historyModal.vue'
+import detailFabricLossTable from '@views/cost-allocation-total/modal/detailFabricLossTable.vue'
 
-import { checkList } from '@api/document/fabricLossesSummary.js'
+import { checkList,historyApproval,cancelSubmit } from '@api/document/fabricLossesSummary.js'
 
 export default {
   name: 'fabricLossesSummary',
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, costDetailDrawer,attachment },
+  components: { JEllipsis, moment, costDetailDrawer,attachment,historyModal,detailFabricLossTable },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
@@ -254,6 +266,40 @@ export default {
         })
       })
     },
+    cancelSumit(record){
+      var syApprovalHistory={
+        stuta:'取消提交',
+        planNo:record.ccode,
+        processingOpinion:'',
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:''
+      }
+      cancelSubmit({planNum:record.ccode,status:record.status,currentState:'取消提交',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.getCostList()
+            this.$message.success('取消提交成功')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    approvalHistory(record){
+      this.$refs.historyModal.histiryModVis = true
+      this.$refs.historyModal.getHistoryList(record.ccode)
+      // historyApproval({code:record.ccode}).then(res => {
+      //     if (res.success) {
+           
+      //     }else{
+      //       this.$message.error(res.message);
+      //     }
+      //   })
+    },
+    details(record){
+      this.$refs.detailFabricLossTable.detailModVis = true
+      this.$refs.detailFabricLossTable.status = record.status
+      this.$refs.detailFabricLossTable.onSearch(record.ccode,'0')
+    },
     searchQuery() {
       this.getCostList()
     },

+ 27 - 2
src/views/cost-allocation-total/inancialReconciliation.vue

@@ -38,6 +38,7 @@
                     <a-select-option value="提交">提交</a-select-option>
                     <a-select-option value="返单">返单</a-select-option>
                     <a-select-option value="完成">完成</a-select-option>
+                    <a-select-option value="初审通过">初审通过</a-select-option>
                   </a-select>
                 <!-- <a-input placeholder="请输入面损表单据状态" v-model="queryParam.fstatus"></a-input> -->
               </a-form-item>
@@ -75,6 +76,25 @@
                 <a-input placeholder="请输入" v-model="queryParam.remarks"></a-input>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="审核结束日期">
+                <a-range-picker
+                  :placeholder="['开始时间', '结束时间']"
+                  format="YYYY-MM-DD"
+                  style="width: 100%"
+                  v-model="ffirstApproveDate"
+                  @change="changeFfirstApproveDate"
+                />
+                <!-- <a-date-picker
+                    placeholder="请选择审核结束日期"
+                    style="width:100%;"
+                    :format="dateFormat"
+                    v-model="queryParam.ffirstApproveDate"
+                    @change="changeFfirstApproveDate"
+                  /> -->
+              </a-form-item>
+            </a-col>
+            
             </template>
 
             <a-col :md="6" :sm="8">
@@ -151,6 +171,7 @@ export default {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
       dverifyDate:[],
+      ffirstApproveDate:[],
       costAllocationColumns: [
         { title: '计划单号', width: 120, dataIndex: 'planNo', fixed: 'left', className: 'replacecolor' },
         { title: '日期', width: 120, dataIndex: 'dverifyDate', className: 'replacecolor' },
@@ -339,8 +360,8 @@ export default {
       this.getCostList()
     },
     changeCreateTime(){
-       this.queryParam.dverifyDateE=this.dverifyDate[1].format('YYYY-MM-DD')
-       this.queryParam.dverifyDateB=this.dverifyDate[0].format('YYYY-MM-DD')
+       this.queryParam.dverifyDateE=( this.dverifyDate.length==2)?this.dverifyDate[1].format('YYYY-MM-DD'):''
+       this.queryParam.dverifyDateB=(  this.dverifyDate.length==2)?this.dverifyDate[0].format('YYYY-MM-DD'):''
     },
     searchReset() {
       this.queryParam.pageNo = ''
@@ -348,6 +369,10 @@ export default {
       this.defaultData()
       this.getCostList()
     },
+    changeFfirstApproveDate(){
+       this.queryParam.ffirstApproveDateE=( this.ffirstApproveDate.length==2)?this.ffirstApproveDate[1].format('YYYY-MM-DD'):''
+       this.queryParam.ffirstApproveDateB=(  this.ffirstApproveDate.length==2)?this.ffirstApproveDate[0].format('YYYY-MM-DD'):''
+    },
     rowClick(record)  {
       return {
         on: {

+ 293 - 0
src/views/cost-allocation-total/modal/SelectUserModal.vue

@@ -0,0 +1,293 @@
+<template>
+  <div>
+    <a-modal
+      centered
+      :title="title"
+      :width="1000"
+      :visible="visible"
+      @ok="handleOk"
+      @cancel="handleCancel"
+      cancelText="关闭">
+
+      <!-- 查询区域 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :span="8">
+              <a-form-item label="用户名称">
+                <a-input placeholder="请输入用户名称" v-model="queryParam.realname"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-item label="用户账号">
+                <a-input placeholder="请输入用户账号" v-model="queryParam.username"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :span="8">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              </span>
+            </a-col>
+
+          </a-row>
+        </a-form>
+      </div>
+      <!-- table区域-begin -->
+      <div>
+        <a-table
+          size="small"
+          bordered
+          rowKey="id"
+          :columns="columns1"
+          :dataSource="dataSource1"
+          :pagination="ipagination"
+          :loading="loading"
+          :scroll="{ y: 240 }"
+          :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
+          @change="handleTableChange">
+
+        </a-table>
+      </div>
+      <!-- table区域-end -->
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+  import { filterObj } from '@/utils/util'
+  import { getAction } from '@/api/manage'
+
+  export default {
+    name: 'SelectUserModal',
+    data() {
+      return {
+        title: '添加已有用户',
+        names: [],
+        visible: false,
+        placement: 'right',
+        description: '',
+        // 查询条件
+        queryParam: {},
+        // 表头
+        columns1: [
+          {
+            title: '#',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 50,
+            align: 'center',
+            customRender: function (t, r, index) {
+              return parseInt(index) + 1
+            }
+          },
+          {
+            title: '用户账号',
+            align: 'center',
+            sorter: true,
+            width: 100,
+            dataIndex: 'username'
+          },
+          {
+            title: '用户名称',
+            align: 'center',
+            width: 100,
+            dataIndex: 'realname'
+          },
+          {
+            title: '性别',
+            align: 'center',
+            width: 100,
+            dataIndex: 'sex_dictText'
+          },
+          {
+            title: '电话',
+            align: 'center',
+            width: 100,
+            dataIndex: 'phone'
+          },
+          {
+            title: '部门',
+            align: 'center',
+            width: 150,
+            dataIndex: 'orgCode'
+          }
+        ],
+        columns2: [
+          {
+            title: '用户账号',
+            align: 'center',
+            dataIndex: 'username'
+
+          },
+          {
+            title: '用户名称',
+            align: 'center',
+            dataIndex: 'realname'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: 'center',
+            width: 100,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        // 数据集
+        dataSource1: [],
+        dataSource2: [],
+        // 分页参数
+        ipagination: {
+          current: 1,
+          pageSize: 10,
+          pageSizeOptions: ['10', '20', '30'],
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
+        },
+        isorter: {
+          column: 'createTime',
+          order: 'desc'
+        },
+        loading: false,
+        selectedRowKeys: [],
+        selectedRows: [],
+        url: {
+          list: '/sys/user/list'
+        }
+      }
+    },
+    created() {
+      this.loadData()
+    },
+    methods: {
+      searchQuery() {
+        this.loadData(1)
+      },
+      searchReset() {
+        this.queryParam = {}
+        this.loadData(1)
+      },
+      handleCancel() {
+        this.visible = false
+        this.selectedRowKeys=[]
+      },
+      handleOk() {
+        this.dataSource2 = this.selectionRows
+        var name = []
+        this.selectionRows.map(item=>name.push(item.realname))
+        this.$emit('selectFinished', name.toString())
+        this.visible = false
+        this.selectedRowKeys = []
+        this.selectionRows = []
+      },
+      add() {
+        this.visible = true
+      },
+      loadData(arg) {
+        // 加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1
+        }
+        var params = this.getQueryParams()// 查询条件
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            this.dataSource1 = res.result.records
+            this.ipagination.total = res.result.total
+          }
+        })
+      },
+      getQueryParams() {
+        var param = Object.assign({}, this.queryParam, this.isorter)
+        param.field = this.getQueryField()
+        param.pageNo = this.ipagination.current
+        param.pageSize = this.ipagination.pageSize
+        return filterObj(param)
+      },
+      getQueryField() {
+        // todo 字段权限控制
+      },
+      onSelectAll(selected, selectedRows, changeRows) {
+        if (selected === true) {
+          for (var a = 0; a < changeRows.length; a++) {
+            this.dataSource2.push(changeRows[a])
+          }
+        } else {
+          for (var b = 0; b < changeRows.length; b++) {
+            this.dataSource2.splice(this.dataSource2.indexOf(changeRows[b]), 1)
+          }
+        }
+        // console.log(selected, selectedRows, changeRows);
+      },
+      onSelect(record, selected) {
+        if (selected === true) {
+          this.dataSource2.push(record)
+        } else {
+          var index = this.dataSource2.indexOf(record)
+          // console.log();
+          if (index >= 0) {
+            this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
+          }
+        }
+      },
+      onSelectChange(selectedRowKeys, selectedRows) {
+        this.selectedRowKeys = selectedRowKeys
+        this.selectionRows = selectedRows
+      },
+      onClearSelected() {
+        this.selectedRowKeys = []
+        this.selectionRows = []
+      },
+      handleDelete: function (record) {
+        this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
+      },
+      handleTableChange(pagination, filters, sorter) {
+        // 分页、排序、筛选变化时触发
+        console.log(sorter)
+        // todo 筛选
+        if (Object.keys(sorter).length > 0) {
+          this.isorter.column = sorter.field
+          this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+        }
+        this.ipagination = pagination
+        this.loadData()
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+  .ant-card-body .table-operator {
+    margin-bottom: 18px;
+  }
+
+  .ant-table-tbody .ant-table-row td {
+    padding-top: 15px;
+    padding-bottom: 15px;
+  }
+
+  .anty-row-operator button {
+    margin: 0 5px
+  }
+
+  .ant-btn-danger {
+    background-color: #ffffff
+  }
+
+  .ant-modal-cust-warp {
+    height: 100%
+  }
+
+  .ant-modal-cust-warp .ant-modal-body {
+    height: calc(100% - 110px) !important;
+    overflow-y: auto
+  }
+
+  .ant-modal-cust-warp .ant-modal-content {
+    height: 90% !important;
+    overflow-y: hidden
+  }
+</style>

+ 1065 - 0
src/views/cost-allocation-total/modal/detailFabricLossTable.vue

@@ -0,0 +1,1065 @@
+<template>
+  <a-modal
+    title="详情"
+    v-model="detailModVis"
+    :confirmLoading="confirmLoading"
+    width="86%"
+    style="top:330px;left:100px;"
+    @cancel="handlecLose"
+  >
+  <template slot="footer">
+        <a-button @click="Submit" :disabled="!(status=='保存'||status=='返单')">
+          提交
+        </a-button>
+        <a-button @click="assign" :disabled="!(status=='提交')">
+         指派
+        </a-button>
+        <a-button @click="Approved" :disabled="!(status=='已指派')">
+         审批通过
+        </a-button>
+        <a-button @click="reject" :disabled="!(status=='已指派')">
+         驳回
+        </a-button>
+        <a-button @click="revokeApproval" :disabled="!(status=='完成')">
+         撤销审批
+        </a-button>
+        <a-button  @click="handlecLose">
+          取消
+        </a-button>
+      </template>
+  <!-- 面料损耗表 -->
+  <div id="fabricLossTable" >
+    <div >
+    <!-- 主要信息 点击搜索后 全部回显-->
+    <a-card title="主要信息" >
+      <a-row :gutter="24" >
+        <div class="table-page-search-wrapper" >
+          <a-form-model layout="inline" ref="form" :model="fabricLoss" :rules="validatorRules" class="kk">
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="计划单号">
+                {{ planNO }}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="款号" has-feedback>
+                {{fabricLoss.cdefine22}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="计划员">
+                {{fabricLoss.planner}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="成衣合同号">
+                {{fabricLoss.contractNo}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="排单数量">
+                {{fabricLoss.number}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="业务员">
+                {{fabricLoss.cpersonName}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="总成本">
+                {{fabricLoss.actualMoney}}
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="实际出库数量">
+              </a-form-model-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="制单人">
+                {{fabricLoss.makingPeople}}
+              </a-form-model-item>
+            </a-col>
+
+
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="查询日期">
+                {{fabricLoss.dateTime}}
+              </a-form-model-item>
+            </a-col>
+
+            <!-- <a-col :md="6" :sm="8" class="noprint">
+              <a-button type="primary" @click="openEnclosure">附件</a-button>
+            </a-col> -->
+            <!-- <a-col :md="6" :sm="8" class="noprint">
+              <a-upload  productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false"   :action="importExcelUrl"  @change="handleImportExcel"  :data="{code:this.planNO,name:this.fileName}"  :beforeUpload="uploadFlie" :remove="removeFile">
+                <a-button type="primary" >附件上传</a-button>
+              </a-upload> -->
+              <!-- <j-upload   v-model="fabricLoss.attachs"  ></j-upload> -->
+              <!-- <a-upload  name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76"    :multiple="true"    :default-file-list="fileList">
+                <a-button type="primary" >附件上传</a-button>
+              </a-upload> -->
+              <!-- <a-button type="primary" @click="openEnclosure">附件</a-button> -->
+            <!-- </a-col> -->
+          </a-form-model>
+        </div>
+      </a-row>
+      <!-- <a-row :gutter="24" > -->
+        <!-- <a-col :md="24" :sm="8" class="noprint">
+              <a-upload  name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76"    :multiple="true"    :default-file-list="fileList">
+                <a-button type="primary" >附件上传</a-button>
+              </a-upload>
+            </a-col> -->
+      <!-- </a-row> -->
+    </a-card>
+    </div>
+    <div >
+    <!-- 子表 -->
+    <a-card style="margin:10px 0;">
+      <!-- 采购订单 -->
+      <div  :class="[purchase-order-table,(fabricLoss.fabricPoOrderList.length==0?'noprint': '')]">
+        <h6 class="table-title">采购订单</h6>
+
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="purchaseOrderColumns"
+          :data-source="fabricLoss.fabricPoOrderList"
+          bordered
+          :pagination="false"
+          :rowClassName="setRowClassName"
+        >
+        
+        </a-table>
+      </div>
+
+      <!-- 委外订单国内 -->
+      <div  style="margin:40px 0" id="mm" :class="[outsource-orders-table,fabricLoss.fabricOMOrderList1.length==0?'noprint': '']">
+        <h6 class="table-title">委外订单国内</h6>
+        <a-table 
+           id="print1"
+           ref="form"
+          :row-key="record => record.id"
+          :columns="outsourceOrderColumns" 
+          :data-source="fabricLoss.fabricOMOrderList1" 
+          bordered 
+          :pagination="false" 
+           :scroll="{ x: 1500 }"
+          :loading="loading">
+          <!-- 附件 -->
+          <span slot="enclosure" slot-scope="text, record"> 
+             <a-button type="primary" @click="openItemOnclosure(record)" :disabled="record.buttonStatus">附件</a-button>
+          </span>
+        </a-table>
+      </div>
+
+      <!-- 委外订单国外 -->
+      <div id="cb" :class="[outsourceOrder-abroad-table,fabricLoss.fabricOMOrderList2.length==0?'noprint': '']">
+        <h6 class="table-title">委外订单国外</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="outsourceOrderColumns"
+          :data-source="fabricLoss.fabricOMOrderList2"
+           :scroll="{ x: 1500 }"
+          bordered
+          :pagination="false"
+        >
+         <!-- 附件 -->
+         <span slot="enclosure" slot-scope="text, record"> 
+             <a-button type="primary" @click="openItemOnclosure(record)" :disabled="record.buttonStatus">附件</a-button>
+          </span>
+        </a-table>
+      </div>
+
+      <!-- 成本发票 -->
+      <div  style="margin:40px 0" :class="[cost-invoice-table,fabricLoss.fabricCostInvoiceList.length==0?'noprint': '']">
+        <h6 class="table-title">成本发票</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="costInvoiceColumns"
+          :data-source="fabricLoss.fabricCostInvoiceList"
+          bordered
+          :pagination="false"
+        >
+        </a-table>
+      </div>
+
+      <!-- 开票成本-面料 -->
+      <div :class="[costInvoice-fabric-table,fabricLoss.fabricCostClothList.length==0?'noprint': '']">
+        <h6 class="table-title">开票成本-面料</h6>
+        <!-- ref="" -->
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="costInvoiceFabricColumns"
+          :data-source="fabricLoss.fabricCostClothList"
+          bordered
+          :pagination="false"
+        >
+        </a-table>
+      </div>
+
+      <!-- 开票成本-成衣 :footer="clothesFooterShow"-->
+      <div  :class="[costInvoice-clothes-table,fabricLoss.fabricCostClothesList.length==0?'noprint': '']" style="margin:40px 0">
+        <h6 class="table-title">开票成本-成衣</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="costInvoiceClothesColumns"
+          :data-source="fabricLoss.fabricCostClothesList"
+          bordered
+          :pagination="false"
+        >
+          <!-- 发票数量 -->
+          <span slot="clInvoiceQuantity" slot-scope="text">
+            <a>{{ text }}</a>
+          </span>
+        </a-table>
+      </div>
+
+      <!-- 开票成本-辅料 -->
+      <div :class="[costInvoice-ingredient-table,fabricLoss.fabricCostAssistList.length==0?'noprint': '']">
+        <h6 class="table-title">开票成本-辅料</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="costInvoiceIngredientColumns"
+          :data-source="fabricLoss.fabricCostAssistList"
+          bordered
+          :pagination="false"
+        >
+        </a-table>
+      </div>
+
+      <!-- 费用支出 -->
+      <div class="costPay-table noprint" style="margin:40px 0">
+        <h6 class="table-title">费用支出</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="costPayColumns"
+          :data-source="fabricLoss.fabricExpensesList"
+          bordered
+          :pagination="false"
+          :footer="costPayFooterShow"
+        >
+        </a-table>
+      </div>
+
+      <!-- 事故单 -->
+      <div  :class="[accidentBill-table,fabricLoss.fabricAccidentList.length==0?'noprint': '']">
+        <h6 class="table-title">事故单</h6>
+        <a-table
+          :row-key="record => record.id"
+          :loading="loading"
+          :columns="accidentListColumns"
+          :data-source="fabricLoss.fabricAccidentList"
+          bordered
+          :pagination="false"
+        >
+        </a-table>
+      </div>
+
+      
+
+      <!-- 备注信息 1 根据角色判断 显示备注 1 或备注 2-->
+      <div class="note-one" style="marginTop:40px;">
+        <h6 class="table-title">备注</h6>
+        <div class="noteDetail">
+          <a-form-model ref="form" :model="fabricLoss" :rues="validatorRules">
+            <a-form-model-item prop="noteOne">
+              <a-input type="textarea" v-model="fabricLoss.noteOne" style="minHeight:160px;" v-show='showSelect==0'/>
+              <a-input type="textarea" v-text="fabricLoss.noteOne" style="minHeight:160px;" v-show='showSelect==1'/>
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+      </div>
+      <!-- 采购订单 -->
+     
+
+      <!-- 备注信息 2 根据角色判断 显示备注 1 或备注 2-->
+      <!-- <div class="note-one" style="marginTop:40px;">
+        <h6 class="table-title">备注信息 2</h6>
+        <div class="noteDetail">
+          <a-form-model ref="form" :model="fabricLoss" :rues="validatorRules">
+            <a-form-model-item prop="noteOne">
+              <a-input
+                type="textarea"
+                v-model="fabricLoss.noteTwo"
+                placeholder="请输入备注"
+                style="minHeight:100px;"
+              />
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+      </div> -->
+
+      <!-- 页面底部保存 -->
+      <a-row :gutter="24" style="marginTop:40px;float:right" class="noprint" v-if="!isView">
+        <!-- <a-col :md="12" :sm="12" style="display:flex">
+          <a-button type="primary" @click="daYin" style="margin-right:6px" :disabled ="PrintButton">
+            打印
+          </a-button> 
+          <a-popconfirm title="已完成,是否要继续保存?" ok-text="是" cancel-text="否" @confirm="save()" v-if="fabricLoss.status=='完成'">
+            <a-button type="primary" :loading="loadingBtn" :disabled="!(fabricLoss.status==''||fabricLoss.status=='保存'|| fabricLoss.status=='完成'|| fabricLoss.status=='返单')">
+            保存
+          </a-button>     
+        </a-popconfirm>  
+        <a-button type="primary" @click="save" :loading="loadingBtn" :disabled="!(fabricLoss.status==''||fabricLoss.status=='保存'|| fabricLoss.status=='完成'|| fabricLoss.status=='返单')"  v-if="fabricLoss.status!=='完成'">
+            保存
+        </a-button>
+        </a-col> -->
+      </a-row>
+    </a-card>
+  </div>
+   <!-- 附件 -->
+   <attachment-display ref="attachmentDisplay"></attachment-display>
+   <!-- 提交信息 -->
+   <submit-information ref="submitInformation" @close="closeInformation"></submit-information>
+   <!-- 选择指派人员 -->
+   <select-user-modal ref="SelectUserModal" @selectFinished="selectFinished"></select-user-modal>
+  </div>
+  </a-modal>
+</template>
+
+<script>
+// import PurchaseAmountModal from '@views/reportForms/fabric-loss-table/purchaseAmountModal.vue'
+// import materialsOutQuantityModal from '@views/reportForms/fabric-loss-table/materialsOutQuantityModal.vue'
+// import purchaseInQuantityModal from '@views/reportForms/fabric-loss-table/purchaseInQuantityModal.vue'
+// import invoiceNumModal from '@views/reportForms/fabric-loss-table/invoiceNumModal.vue'
+// import invoiceQuantityModal from '@views/reportForms/fabric-loss-table/invoiceQuantityModal.vue'
+// import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue'
+// import surplusYarnModal from '@views/reportForms/fabric-loss-table/surplusYarnModal.vue'
+// import purchaseLeftModal from '@views/reportForms/fabric-loss-table/purchaseLeftModal.vue'
+// import imoneyCell from '@views/reportForms/fabric-loss-table/imoneyCell.vue'
+// import iquantityMoreLessModal from '@views/reportForms/fabric-loss-table/iquantityMoreLessModal.vue'
+// import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
+import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
+import submitInformation from '@views/cost-allocation-total/modal/submitInformation.vue'
+import SelectUserModal from '@views/cost-allocation-total/modal/SelectUserModal.vue'
+import { getFabricLossDatas,saveFabricLossData,fileDetail,deleteFileDetail } from '@api/reportForms/fabric-loss-table'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import JUpload from '@/components/jeecg/JUpload'
+import moment from 'moment'
+import { runInThisContext } from 'vm'
+import {cancelSubmit } from '@api/document/fabricLossesSummary.js'
+
+export default {
+  name: 'FabricLossTable', // 面料损耗表
+  mixins: [JeecgListMixin],
+  components: {
+    // 面料损耗表 所有弹框
+    // PurchaseAmountModal,
+    // otherYarnsInModal,
+    // materialsOutQuantityModal,
+    // purchaseInQuantityModal,
+    // invoiceNumModal,
+    // invoiceQuantityModal,
+    // iquantityMoreLessModal,
+    // accidentListModal,
+    // surplusYarnModal,
+    // purchaseLeftModal,
+    JEllipsis,
+    moment,
+    JUpload,
+    AttachmentDisplay,
+    submitInformation,
+    SelectUserModal,
+    accessory2:[],
+  },
+  data() {
+    return {
+      PrintButton:true,//打印按钮
+      showSelect:0,//计划号是否是输入框
+      fabricLoss: {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]}, // 主表信息
+      loading: false, // 表格加载
+      loadingBtn:false, //保存按钮加载
+
+      fileList: [
+      ],
+      fileName:'',
+      edit:'0',
+      planNO:'',//计划单号
+      isView:false,//是否查看状态
+      // 采购订单 表头
+      purchaseOrderColumns: [
+        { title: '货物名称', width: '21%', dataIndex: 'cinvName', className: 'replacecolor specel-width'},
+        /*
+        { title: '批号', width: 80, dataIndex: 'cbatch', className: 'replacecolor',
+          customRender:function(text,record,index){
+            if (text == null || text == undefined){
+              return "";
+            }
+            if (text.indexOf(",")>-1){
+              const arr = text.split(',');
+              return (<div>
+              {
+                arr.map(t=>{
+                  return (<li>{t}</li>)
+                })
+              }
+              </div>)
+            }else{
+              return text;
+            }
+          }
+        },*/
+        { title: '订单号', width:'8%' , dataIndex: 'cpoid', className: 'replacecolor',
+          customRender:function(text,record,index){
+            if (text == null || text == undefined){
+              return "";
+            }
+            if (text.indexOf(",")>-1){
+              const arr = text.split(',');
+              return (<div>
+              {
+                arr.map(t=>{
+                  return (<li>{t}</li>)
+                })
+              }
+              </div>)
+            }else{
+              return text;
+            }
+          }
+        },
+        { title: '计划数量', dataIndex: 'iquantity', width:'6%', className: 'replacecolor' },
+        {
+          title: '采购数量',
+          dataIndex: 'iquantityIn',
+          width: '6%',
+          className: 'replacecolor',
+        },
+
+        { title: '采购供应商', dataIndex: 'cvenAbbName', width: '7%', className: 'replacecolor' },
+        { title: '分配数量', dataIndex: 'iquantityOut', width: '5%', className: 'replacecolor' },
+        { title: '委外供应商', dataIndex: 'omcVenAbbName', width: '10%', className: 'replacecolor', },
+        {
+          title: '余纱',
+          dataIndex: 'iquantityLeft',
+          width:'5%',
+          className: 'replacecolor',
+        },
+        { title: '采购损耗', dataIndex: 'iquantityLeftRate', width: '6%', className: 'replacecolor' }
+      ],
+
+      // 委外订单国内 表头
+      outsourceOrderColumns: [
+        { title: '制造工艺', width: '10%', dataIndex: 'cvcname', className: 'replacecolor' },
+        { title: '工厂', width: 80, dataIndex: 'cvenAbbName', className: 'replacecolor specleWidth' },
+        {
+          title: '材料出库数量',
+          dataIndex: 'iquantityOut',
+          width: '5%',
+          className: 'replacecolor',
+        },
+        { title: '计划数量', dataIndex: 'iquantity', width: '6%', className: 'replacecolor' },
+
+        {
+          title: '单位',
+          children: [
+            {
+              title: '根',
+              dataIndex: 'iquantityPCS',
+              width: '5%',
+              className: 'replacecolor'
+            },
+            {
+              title: '米',
+              dataIndex: 'iquantityM',
+              width: '5%',
+              className: 'replacecolor'
+            }
+          ]
+        },
+
+        {
+          title: '采购入库数量',
+          dataIndex: 'iquantityIn',
+          width: '7%',
+          className: 'replacecolor',
+          customCell: this.purchaseInQuantityCustomCell,
+          scopedSlots: { customRender: 'purchaseInQuantity' }
+        },
+        { title: '染厂色号', dataIndex: 'ccolorNumber', width:'10%', className: 'replacecolor' },
+        { title: '物料编码', dataIndex: 'cinvCode', width: '7%', className: 'replacecolor noprint' },
+        { title: '货物名称', dataIndex: 'cinvName', width: '20%',className: 'replacecolor specel-width' },
+        { title: '颜色', dataIndex: 'ccolor', width: '7%', className: 'replacecolor' },
+        { title: '损耗', dataIndex: 'cquantityLoss',  width: '6%',className: 'replacecolor' },
+         { title: '多发少发', dataIndex: 'iquantityMoreLess', width: '6%', className: 'replacecolor',},
+         { title: '附件', dataIndex: 'enclosure', width: '6%', className: 'noprint', scopedSlots: { customRender: 'enclosure' }}
+      ],
+
+      // 成本发票 表头
+      costInvoiceColumns: [
+        { title: '类型', width: 120, dataIndex: 'cvcname', className: 'replacecolor' },
+        { title: '采购类型', width: 120, dataIndex: 'cbusType', className: 'replacecolor' },
+        { title: '工厂', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor'},
+        { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor'},
+        { title: '无税金额', dataIndex: 'inoTaxMoney', width: 120, className: 'replacecolor' }
+      ],
+      costInvoiceData: [
+        { costInvoiceType: '纱款', factory: '17TW-C-17B', costAmount: '5081.72' },
+        { costInvoiceType: '纱款', factory: '17TW-C-17C', costAmount: '127754.31' },
+        { costInvoiceType: '织款', factory: '18TW-C-8', costAmount: '17045.48' },
+        { costInvoiceType: '染款', factory: '福隆', costAmount: '59762.4' },
+        { costInvoiceType: '织款', factory: '江阴美纶', costAmount: '20482.95' }
+      ],
+
+      // 开票成本-面料 表头
+      costInvoiceFabricColumns: [
+        { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
+        {
+          title: '发票号码',
+          width: 120,
+          dataIndex: 'csbvcode',
+
+          className: 'replacecolor',
+          customCell: this.invoiceNumCustomCell,
+          scopedSlots: { customRender: 'invoiceNum' }
+        },
+        { title: '供应商', width: 120, dataIndex: 'cvenName', className: 'replacecolor' },
+        { title: '采购发票金额', width: 120, dataIndex: 'inatSum', className: 'replacecolor' },
+        { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' }
+      ],
+      costInvoiceFabricData: [
+        { invoiceNum: '18TW-MYA-44', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-05-04' },
+        { invoiceNum: '18TW-MYA-78', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-05-18' },
+        { invoiceNum: '18TW-MYA-34', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-06-1' }
+      ],
+      costInvoiceClothesColumns:[],
+      // 开票成本-成衣 表头无美元
+      costInvoiceClothesColumnsM1:[
+        { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
+        { title: '发票号码', width: 120, dataIndex: 'cpbvcode', className: 'replacecolor' },
+        { title: '委外供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: '成衣加工费(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
+        
+        { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' },
+        { title: '入库数量', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
+        {
+          title: '发票数量',
+          dataIndex: 'ipbvquantity',
+
+          width: 120,
+          className: 'replacecolor',
+        }
+      ],
+      // 开票成本-成衣 表头
+      costInvoiceClothesColumnsAll: [
+        { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
+        { title: '发票号码', width: 120, dataIndex: 'cpbvcode', className: 'replacecolor' },
+        { title: '委外供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: '成衣加工费(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
+        { title: '成衣加工费(美元)', width: 120, dataIndex: 'ioriSum', className: 'replacecolor' },        
+        { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' },
+        { title: '入库数量', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
+        {
+          title: '发票数量',
+          dataIndex: 'ipbvquantity',
+
+          width: 120,
+          className: 'replacecolor',
+        }
+      ],
+
+      // 开票成本-辅料 表头
+
+      costInvoiceIngredientColumns:[],
+      costInvoiceIngredientColumnsM1:[
+        { title: '序号', width: '10%', dataIndex: 'index', className: 'replacecolor' },
+        { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
+        { title: '供应商', width: '7%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: ' 类型', width: '13%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
+        {
+          title: '发票数量',
+          width: '7%',
+          dataIndex: 'iquantityInvoice',
+          className: 'replacecolor',
+          customCell: this.ingredientsInvoiceQuantityCustomCell,
+          scopedSlots: { customRender: 'ingredientsInvoiceQuantity' }
+        },
+        { title: '开票金额(人民币)', width: '10%', dataIndex: 'isum', className: 'replacecolor' },
+        { title: '无税金额', width: '6%', dataIndex: 'inoTaxMoney', className: 'replacecolor' },
+        { title: '单位', width: '10%', dataIndex: 'ccomUnitName', className: 'replacecolor' },
+        { title: '订单数', width: '10%', dataIndex: 'iquantity', className: 'replacecolor' },
+        { title: '采购入库数', width: '10%', dataIndex: 'iquantityIn', className: 'replacecolor' }
+      ],
+      costInvoiceIngredientColumnsAll: [
+        { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
+        { title: '供应商', width: '7%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: ' 类型', width: '10%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
+        {
+          title: '发票数量',
+          width: '10%',
+          dataIndex: 'iquantityInvoice',
+          className: 'replacecolor',
+        },
+        { title: '开票金额(人民币)', width: '10%', dataIndex: 'isum', className: 'replacecolor' },
+        { title: '开票金额(美元)', width: '10%', dataIndex: 'ioriSum', className: 'replacecolor',customRender: (text, record, index) => {
+            if (record.isum == record.ioriSum)
+              return "";
+            else
+              return record.ioriSum;
+         } },
+        { title: '无税金额', width: '6%', dataIndex: 'inoTaxMoney', className: 'replacecolor' },
+        { title: '单位', width: '10%', dataIndex: 'ccomUnitName', className: 'replacecolor' },
+        { title: '订单数', width: '10%', dataIndex: 'iquantity', className: 'replacecolor' },
+        { title: '采购入库数', width: '10%', dataIndex: 'iquantityIn', className: 'replacecolor' }
+      ],
+      costInvoiceIngredientData: [
+        { factory: '森加', type: '主标', ingredientsInvoiceQuantity: '45900', invoiceAmountCNY: '259.42' },
+        { factory: '森加', type: '尺码标', ingredientsInvoiceQuantity: '3670', invoiceAmountCNY: '1475.6' }
+      ],
+
+      // 费用支出 表头
+      costPayColumns: [
+        { title: '账套号', width: 120, dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '支出单号', width: 120, dataIndex: 'cspvcode', className: 'replacecolor' },
+        { title: '费用项目', dataIndex: 'cexpName', width: 120, className: 'replacecolor' },
+        { title: '支出人民币金额', dataIndex: 'inatMoney', width: 120, className: 'replacecolor' },
+        { title: '支出美元金额', dataIndex: 'imoney', width: 120, className: 'replacecolor',customRender: (text, record, index) => {
+            if (record.imoney == record.inatMoney)
+              return "";
+            else
+              return record.imoney;
+           } },
+        { title: '发票号', dataIndex: 'cinvoinceNo', width: 120, className: 'replacecolor' },
+        { title: '制单人', dataIndex: 'cmaker', width: 120, className: 'replacecolor' }
+      ],
+      costPayData: [{}],
+
+      // 事故单 表头
+      accidentListColumns: [
+        {
+          title: '单号',
+          width: 120,
+          dataIndex: 'cpbvcode',
+          className: 'replacecolor',
+        },
+         {
+          title: '事故单号',
+          width: 120,
+          dataIndex: 'cpbvmemo',
+          className: 'replacecolor',
+        },
+        { title: '事故承担方', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: '金额', dataIndex: 'ioriSum', width: 120, className: 'replacecolor' }
+      ],
+      accidentListData: [{ accidentNum: '1100011' }, { accidentNum: '3540011' }],
+      url: {
+        list: '/sys/user/list',
+        importExcelUrl: 'report/FabricLoss/addFile' ,// 导入
+      },
+      noteOne: '', // 备注 1
+      noteTwo: '', // 备注 2
+      dd:0,
+      status:'',
+      detailModVis:false 
+    }
+  },
+  methods: {
+    // uploadFlie(file) {
+    //   this.fileName = file.name
+    //   // const formData = new FormData()
+    //   // formData.append('file',file.file)
+    //   // fileDetail({code:this.planNO,name:this.fileName}).then(res => {
+    //   //       if (res.success) {
+    //   //         this.onSearch(this.planNO,'0')
+    //   //       }else{
+    //   //         this.$message.error(res.message);
+    //   //       }
+    //   //     })
+    //   },
+      // handleImportExcel(data){
+      //   if(data.fileList.length>this.fileList.length&&data.file.status=='uploading'){ 
+      //     var that =this
+      //     setTimeout(()=>{
+      //       that.onSearch(this.planNO,'0')
+      //   },1000)
+          
+      //   }
+        
+        
+      // },
+      // removeFile(data){
+      //   deleteFileDetail({code:this.planNO,name:data.name}).then(res => {
+      //       if (res.success) {
+      //         var cc=[]
+      //         this.fileList.map(item=>{
+      //           if(item.name !== data.name){
+      //             cc.push(item)
+      //           }
+      //         })
+      //         this.fileList = cc
+      //         this.loading =false
+      //         this.$message.success('删除成功');
+      //       }else{
+      //         this.$message.error(res.message);
+      //       }
+      //     })
+      // },
+    //   daYin(){
+    //      this.showSelect = 1
+    //      this.$nextTick(() => {
+    //       const html = window.document.getElementById('fabricLossTable').innerHTML 
+    //      const win = window.open();
+    //      const style = '<style>\n'
+    //      +'.noprint{display:none}'
+    //      +'.specleWidth{width:15% !important}'
+    //      +'.ant-table-body{overflow-x: hidden !important }' //去除滚动条
+    //      +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
+    //      +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
+    //      +'.ant-form-item-label{width:45%;font-size: 12px;}'
+    //      +'.ant-form-item-children{font-size: 12px}'
+    //      +'.ant-card-head-title{font-weight: bold;font-size: 0.67em;margin-bottom: 9px;}'
+    //      +'.ant-form-item-control-wrapper{width:100%}'
+    //      +'.ant-input{width:100%}'
+    //      +'.ant-form-item{display:flex}'
+    //      + 'table{width: 100% !important;border-collapse: collapse;border-spacing: 0;overflow-x:hidden;}\n'
+    //      + 'th,td{width:5%;height: 18px;border: 1px solid #999;font-size: 12px;color: #666;max-width:2000px;text-align: center;}\n'
+    //      +'.ant-table-row-cell-break-word{width:5%}'
+    //      +'.specel-width{width:25% !important}'
+    //      + 'th{color: #333}\n'
+    //      + 'a{color: #666; text-decoration:none;}\n'
+    //      +'.table-title{margin-bottom: 0% !important;margin-top: 0% !important;}'
+    //      +'.outsource-orders-table{margin: 15px 0px !important;}'
+    //      +'.cost-invoice-table{ margin: 15px 0px !important;}'
+    //      +'.costInvoice-fabric-table{margin: 15px 0px !important;}'
+    //      +'.costInvoice-ingredient-table{margin: 15px 0px !important;}'
+    //      +'.note-one{ margin-top: 15px;}'
+    //      +'.title{text-align: center;}'
+    //      + '</style>';
+    //      win.document.write(style+html);
+    //      win.focus();
+    //      setTimeout(function(){
+    //       let textArea = win.document.getElementsByTagName('textarea')
+    //       for (let i = 0; i < textArea.length; i++) {
+    //          textArea[i].style.height = 'auto' // 先设置成auto,再设置高度,删除文字的时候高度才会改变
+    //          textArea[i].style.height = textArea[i].scrollHeight+100 + 'px'
+    //       }
+    //         win.print();
+    //         win.close();
+    //      },500)
+    //      this.showSelect = 0
+    //     //  win.print();
+    //     //  win.close();
+		//     //  this.showSelect = 0
+    //     })
+        
+    // },
+    // 【计划单号】 搜索
+    onSearch(value,update) {
+      if (value == "" || value == null){
+        this.$message.error('请输入计划号!');
+      }else{
+        this.loading = true;
+        this.$nextTick(() => {
+          getFabricLossDatas({csocode:value,update:update}).then(res => {
+            this.loading = false;
+            if (res.success) {
+              this.planNO = value
+              this.PrintButton = false
+              this.fabricLoss = res.result;
+              var fileList =  this.fabricLoss.attachs!==''?this.fabricLoss.attachs.split(","):[]
+              this.fileList = []
+              if(fileList.length!==0){
+                fileList.map(item=>{
+                  this.fileList.push({
+                    uid: '-1',
+                    name: item,
+                    status: 'done',
+                    url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
+                  })
+              })
+              }
+              this.edit = this.fabricLoss.edit
+              // 开票成本成衣:获取原币和本币金额是否完全相同,完全相同隐藏美元列
+              var findList = this.fabricLoss.fabricCostClothesList.filter(e=>e.ioriSum!=e.isum);
+              if (findList.length == 0)
+                this.costInvoiceClothesColumns = this.costInvoiceClothesColumnsM1;
+              else
+                this.costInvoiceClothesColumns = this.costInvoiceClothesColumnsAll;
+              // 开票成本辅料:获取原币和本币金额是否完全相同,完全相同隐藏美元列
+              findList = this.fabricLoss.fabricCostAssistList.filter(e=>e.ioriSum!=e.isum);
+              if (findList.length == 0)
+                this.costInvoiceIngredientColumns = this.costInvoiceIngredientColumnsM1;
+              else
+                this.costInvoiceIngredientColumns = this.costInvoiceIngredientColumnsAll;
+
+              // 委外订单国内附件按钮状态
+              this.fabricLoss.fabricOMOrderList1.map(item=>{
+                item.buttonStatus = false
+                if(!item.accessorItemList||item.accessorItemList.length == 0  ){
+                  item.buttonStatus = true
+                }
+              })
+              // 委外订单国外附件按钮状态
+             this.fabricLoss.fabricOMOrderList2.map(item=>{
+                item.buttonStatus = false
+                if(!item.accessorItemList||item.accessorItemList.length == 0 ){
+                  item.buttonStatus = true
+                }
+              })
+              this.fabricLoss.fabricCostClothesList.map((item,index) => {item.index = index +1})
+              this.fabricLoss.fabricCostClothList.map((item,index) => {item.index = index +1})
+              this.fabricLoss.fabricCostAssistList.map((item,index) => {item.index = index +1})
+              this.fabricLoss.fabricPoOrderList.map(item => {
+                item["omcVenAbbNameArray"] = item.omcVenAbbName ? (item.omcVenAbbName.split(",")) : ''
+              })
+              if (this.fabricLoss.fabricAccidentList == null){
+                this.fabricLoss.fabricAccidentList = [];
+              }
+              this.calculateTotal('frist')
+              this.$forceUpdate()
+            }else{
+              this.fabricLoss = {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]};
+              this.$message.info(res.message);
+            }
+          })
+        })
+      }
+    },
+    //计算合计行
+    calculateTotal(data){
+      if(data =='notFrist'){
+        this.fabricLoss.fabricCostInvoiceList.pop()
+        this.fabricLoss.fabricCostClothList.pop()
+        this.fabricLoss.fabricAccidentList.pop()
+        this.fabricLoss.fabricCostClothesList.pop()
+        this.fabricLoss.fabricCostAssistList.pop()
+      }
+       //计算成本发票合计
+         var imoney = 0,
+         inoTaxMoney = 0
+         for (let row of this.fabricLoss.fabricCostInvoiceList){
+            imoney += row.imoney*1;
+            inoTaxMoney +=(row.inoTaxMoney?row.inoTaxMoney:0)*1
+          }
+          if(this.fabricLoss.fabricCostInvoiceList.length !==0){
+            this.fabricLoss.fabricCostInvoiceList.push({
+                cvcname:'',
+                cbusType:'合计',
+                cvenAbbName:'',
+                imoney:parseFloat(imoney.toFixed(2)),
+                inoTaxMoney:parseFloat(inoTaxMoney.toFixed(2)),
+              })
+          }
+        //计算开票成本-面料合计
+         var inatSum = 0;
+         for (let row of this.fabricLoss.fabricCostClothList){
+            inatSum += row.inatSum*1;
+          }
+          if(this.fabricLoss.fabricCostClothList.length !==0){
+             this.fabricLoss.fabricCostClothList.push({
+                 index:'',
+                 csbvcode:'合计',
+                 cvenName:'',
+                 inatSum:parseFloat(inatSum.toFixed(2)),
+                 cshipTime:''
+               })
+          }
+          //计算开票成本-成衣合计
+          var isum = 0,ioriSum=0,iquantity=0,ipbvquantity=0;
+          for (let row of this.fabricLoss.fabricCostClothesList){
+            isum += row.isum*1;
+            ioriSum += row.ioriSum*1;
+            iquantity += row.iquantity*1;
+            ipbvquantity += row.ipbvquantity*1;
+          }
+          if(this.fabricLoss.fabricCostClothesList.length!==0){
+              this.fabricLoss.fabricCostClothesList.push({
+                     cpbvcode:'合计',
+                     isum: parseFloat(isum.toFixed(2)),
+                     ioriSum: parseFloat(ioriSum.toFixed(2)),
+                     iquantity: parseFloat(iquantity.toFixed(4)),
+                     ipbvquantity: parseFloat(ipbvquantity.toFixed(4)),
+
+              })
+          }
+          //开票成本-辅料合计
+          var isum = 0,ioriSum=0,iquantity=0,iquantityIn=0,iquantityInvoice=0,inoTaxMoney = 0
+          for (let row of this.fabricLoss.fabricCostAssistList){
+            isum += row.isum*1;
+             iquantity += row.iquantity*1;
+             iquantityIn += row.iquantityIn*1;
+             iquantityInvoice += row.iquantityInvoice*1;
+             inoTaxMoney += (row.inoTaxMoney?row.inoTaxMoney:0)*1
+             if(row.isum!==row.ioriSum){
+                ioriSum += row.ioriSum*1;
+             }
+            }
+          if(this.fabricLoss.fabricCostAssistList.length !== 0){
+             this.fabricLoss.fabricCostAssistList.push({
+               caccount:'合计',
+               isum:parseFloat(isum.toFixed(2)),
+               ioriSum:parseFloat(ioriSum.toFixed(2)),
+               iquantity:parseFloat(iquantity.toFixed(4)),
+              iquantityIn:parseFloat(iquantityIn.toFixed(4)),
+                iquantityInvoice:parseFloat(iquantityInvoice.toFixed(4)),
+                inoTaxMoney:parseFloat(inoTaxMoney.toFixed(4)),
+            })
+          }
+
+        //事故单合计
+        var item = {
+        "cvenAbbName":"合计"
+      };
+      var ioriSum = 0
+      for (let row of this.fabricLoss.fabricAccidentList){
+          ioriSum += row.ioriSum*1       
+      }
+      if(this.fabricLoss.fabricAccidentList.length !== 0){
+        this.fabricLoss.fabricAccidentList.push({
+          cvenAbbName:"合计",
+          ioriSum:parseFloat(ioriSum.toFixed(4))
+        })
+      }
+    },
+    
+    //行样式
+    setRowClassName(record) {
+      return(record.iquantityLeft!==0&&record.fabricPoOrderOutList.length == 0) ? "inputRowStyl" : "inputRowSty2";//赋予点击行样式
+    },
+    openItemOnclosure(record){
+      var attachList = [];
+        record.accessorItemList.forEach(e=>{
+          var attach = {};
+          attach.name = e.filename;
+          attach.src=e.fileurl;
+          attachList.push(attach);
+        });
+      this.$refs.attachmentDisplay.AttachmentModVis = true
+      this.$refs.attachmentDisplay.attachmentData =  attachList;
+     
+    },
+    //提交
+    Submit(){
+      this.$refs.submitInformation.submitInformationModVis = true
+      this.$refs.submitInformation.text = '提交'
+
+    },
+    assign(){
+      this.$refs.SelectUserModal.visible = true
+    },
+    handlecLose(){
+         this.detailModVis = false
+         this.fabricLoss={fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]}
+    },
+    closeInformation(data,text){
+      var syApprovalHistory={
+        stuta:text=='提交'?'提交':'驳回',
+        planNo:this.planNO,
+        processingOpinion:data,
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:''
+      }
+      cancelSubmit({planNum:this.planNO,status:this.status,currentState:text=='提交'?'提交':'驳回',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.$message.success(text+'成功')
+            this.handlecLose()
+            this.$emit('close')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    selectFinished(data){
+      var syApprovalHistory={
+        stuta:'指派',
+        planNo:this.planNO,
+        processingOpinion:'',
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:data
+      }
+      cancelSubmit({planNum:this.planNO,status:this.status,currentState:'指派',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.$message.success('指派成功')
+            this.handlecLose()
+            this.$emit('close')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    Approved(){
+      var syApprovalHistory={
+        stuta:'审批通过',
+        planNo:this.planNO,
+        processingOpinion:'',
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:''
+      }
+      cancelSubmit({planNum:this.planNO,status:this.status,currentState:'审批通过',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.$message.success('审批通过')
+            this.handlecLose()
+            this.$emit('close')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    reject(){
+      this.$refs.submitInformation.submitInformationModVis = true
+      this.$refs.submitInformation.text = '返单'
+    },
+    revokeApproval(){
+      var syApprovalHistory={
+        stuta:'撤销审批',
+        planNo:this.planNO,
+        processingOpinion:'',
+        processedBy:this.$store.getters.userInfo.realname,
+        processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        assignedBy:''
+      }
+      cancelSubmit({planNum:this.planNO,status:this.status,currentState:'撤销审批',syApprovalHistory:syApprovalHistory}).then(res => {
+          if (res.success) {
+            this.$message.success('撤销审批成功')
+            this.handlecLose()
+            this.$emit('close')
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+
+  
+    // father
+    aa() {},
+    bb() {},
+    cc() {},
+    dd() {},
+    ee() {},
+    ff() {},
+    gg() {}
+  },
+}
+
+</script>
+
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/.ant-modal-body{
+  height: 571px;
+    overflow-y: scroll;
+}
+
+
+</style>

+ 5 - 1
src/views/cost-allocation-total/modal/fabRemQuaModal.vue

@@ -67,7 +67,11 @@ export default {
           title: '单位成本',
           dataIndex: 'unitCost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(4)
+            return re
+         }
         },
         {
           title: '总成本',

+ 176 - 0
src/views/cost-allocation-total/modal/historyModal.vue

@@ -0,0 +1,176 @@
+<template>
+  <div id="declareElementsModal">
+    <a-modal
+      title="审批历史"
+      v-model="histiryModVis"
+      :confirmLoading="confirmLoading"
+      @cancel="handleCancel"
+      width="80%"
+      style="top:330px;left:100px;"
+    >
+      <!-- 増行 子表 -->
+      <a-card :bordered="false" style="margin:10px 0">
+        <!-- 子表 -->
+        <a-spin :spinning="confirmLoading">
+          <a-form-model ref="formRef">
+            <a-table
+              v-if="historyData"
+              bordered
+              rowKey="id"
+              :columns="historyColumns"
+              :data-source="historyData"
+              :loading="loading"
+              :pagination="false"
+               :scroll="{y: 500}"
+            >
+            </a-table>
+          </a-form-model>
+        </a-spin>
+      </a-card>
+
+      <!-- 页面底部保存取消 -->
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1
+        }"
+      >
+        <!-- <a-popconfirm title="确定放弃?" @confirm="handleCancel" okText="确定" cancelText="取消"> -->
+          <a-button :style="{ marginRight: '8px' }" @click="handleCancel">返回</a-button>
+        <!-- </a-popconfirm>
+        <a-button type="primary" @click="addSave">
+          保存
+        </a-button> -->
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import {historyApproval } from '@api/document/fabricLossesSummary.js'
+
+export default {
+  name: 'DeclareElementsModal', // 报关要素
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+
+    return {
+      loading: false, // 表格加载
+      pushState: false, //是否推送
+      query:'1',//是否查询
+      // 子表表头
+      historyColumns: [
+        {
+          title: '序号',
+          width: 30,
+          dataIndex: 'index',
+          customRender: (text, record, index) => `${index + 1}`,
+          className: 'replacecolor'
+        },
+        {
+          title: '操作',
+          dataIndex: 'stuta',
+          width: 250,
+          className: 'replacecolor'
+        },
+        {
+          title: '计划号',
+          dataIndex: 'planNo',
+          width: 250,
+          className: 'replacecolor'
+        },
+        {
+          title: '处理人',
+          dataIndex: 'processedBy',
+          width: 200,
+
+          className: 'replacecolor'
+        },
+
+        {
+          title: '处理时间',
+          dataIndex: 'processingTime',
+          width: 200,
+          className: 'replacecolor'
+        },
+        {
+          title: '处理意见',
+          dataIndex: 'processingOpinion',
+          width: 200,
+          className: 'replacecolor'
+        }
+      ],
+      declareElements: {}, // 主表信息
+      historyData: [], // 子表信息
+      confirmLoading: false,
+      histiryModVis: false,
+    }
+  },
+  // 接收父组件 方法
+  props: {},
+
+  created() {  
+  },
+  methods: {
+    getHistoryList(data){
+      historyApproval({code:data}).then(res => {
+          if (res.success) {
+            this.historyData = res.result
+          }else{
+            this.$message.error(res.message);
+          }
+        })
+    },
+    handleCancel(){
+      this.histiryModVis = false 
+    }
+  },
+
+  computed: {}
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+// 对话框里的card样式
+/deep/ .ant-modal-content {
+  background-color: #f0f2f5;
+}
+/deep/ .ant-modal-body {
+  padding: 10px;
+}
+/deep/.ant-form-item{
+  margin-bottom: 0px !important;
+}
+// /deep/.ant-table-tbody .ant-table-row td{
+//   padding-top: 2px;
+//     padding-bottom: 2px;
+// }
+
+// /deep/ .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
+//   padding: 9px 16px
+// }
+</style>

+ 198 - 0
src/views/cost-allocation-total/modal/pilosityFewerModal.vue

@@ -0,0 +1,198 @@
+<template>
+  <a-modal
+    title="多发少发"
+    v-model="pilosityFewerModVis"
+    :confirmLoading="confirmLoading"
+    width="86%"
+    style="top:330px;left:100px;minHeight:700px"
+    :footer="null"
+  >
+    <!-- tabel 加载 -->
+    <a-spin :spinning="confirmLoading">
+      <!-- 回显信息  -->
+      <div class="table-page-search-wrapper" style="marginTop:20px;">
+        <!-- <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :md="6" :sm="8">
+              <a-form-item label="存货名称">
+                <a-input v-model="pilosityFewerList.goodsName"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="色号">
+                <a-input v-model="pilosityFewerList.color"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="计划数量">
+                <a-input v-model="pilosityFewerList.planQuantity"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="购入数量">
+                <a-input v-model="pilosityFewerList.purchaseQuantity"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="多发少发">
+                <a-input v-model="pilosityFewerList.pilosityFewer"></a-input>
+              </a-form-item>
+            </a-col> -->
+            <!-- <a-col :md="6" :sm="8">
+              <a-form-item label="备注">
+                <a-input v-model="pilosityFewerList.styleNumber"></a-input>
+              </a-form-item>
+            </a-col> -->
+
+            <!-- <a-col :md="24" :sm="24">
+              <a-form-item label="备注" class="noteBg">
+                <a-input type="textarea" v-model="pilosityFewerList.remarks" style="minHeight:100px;"></a-input> -->
+                <a-table
+                     bordered
+                    :loading="loading"
+                    :columns="pilosityFewerColumns"
+                     :data-source="pilosityFewerList"
+                     :pagination="false"
+                    :scroll="{ y: 500 }"
+                   >
+                   <span slot="color" slot-scope="text,record">
+                     <a-input placeholder="请输入" v-model="record.color" />
+                    </span>
+                    <span slot="remarks" slot-scope="text,record">
+                     <a-input placeholder="请输入" v-model="record.remarks" />
+                    </span>
+                </a-table>
+
+                <!-- 导出 打印 返回  -->
+                <a-row style="marginTop:20px;">
+                  <a-col :md="24" :sm="12">
+                    <span style="float: right;" class="table-operator">
+                      <!-- <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
+                      <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
+                      <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
+                    </span>
+                  </a-col>
+                </a-row>
+            <!-- </a-col>
+          </a-row>
+        </a-form> -->
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'pilosityFewerListModal', // 事故单 弹框
+  components: {},
+  data() {
+    return {
+      loading: false,
+      confirmLoading: false,
+      pilosityFewerModVis: false,
+      pilosityFewerList: [],
+      pilosityFewerColumns:[
+        {
+          title: '存货名称',
+          dataIndex: 'goodsName',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '色号',
+          dataIndex: 'color',
+          width: 120,
+          className: 'replacecolor',
+          scopedSlots: { customRender: 'color' },
+        },
+        {
+          title: '计划数量',
+          dataIndex: 'planQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '购入数量',
+          dataIndex: 'purchaseQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '多发少发',
+          dataIndex: 'pilosityFewer',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '备注',
+          dataIndex: 'remarks',
+          width: 120,
+          className: 'replacecolor',
+          scopedSlots: { customRender: 'remarks' },
+        },
+      ]
+    }
+  },
+  // 接收父组件 方法
+  props: {
+    father: {
+      type: Function,
+      default: null
+    }
+  },
+  created() {},
+  methods: {
+    //  导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      console.log('导出参数', params)
+      // downFile('/scas/dyeLoss/excel', params).then(data => {
+      //   console.log('888')
+      //   if (!data) {
+      //     this.$message.warning('文件下载失败')
+      //     return
+      //   }
+      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
+      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
+      //   } else {
+      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+      //     let link = document.createElement('a')
+      //     link.style.display = 'none'
+      //     link.href = url
+      //     link.setAttribute('download', fileName + '.xls')
+      //     document.body.appendChild(link)
+      //     link.click()
+      //     document.body.removeChild(link) // 下载完成移除元素
+      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
+      //   }
+      // })
+    },
+    // 打印
+    print() {},
+    // 返回
+    backFabricLossTable() {
+      console.log('返回到面料损耗表')
+      this.pilosityFewerModVis = false
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+
+// /deep/ th.replacecolor {
+//   background-color: #ccc;
+// }
+</style>

+ 75 - 0
src/views/cost-allocation-total/modal/submitInformation.vue

@@ -0,0 +1,75 @@
+<template>
+    <a-modal
+      :title="text+'信息'"
+      v-model="submitInformationModVis"
+      width="50%"
+      @ok="ok"
+      cancelText="取消"
+      @cancel="close"
+    >
+    <div>
+      
+     <a-textarea
+      v-model="value"
+      placeholder="请输入"
+      :auto-size="{ minRows: 3, maxRows: 15 }"
+    />
+    </div>
+    </a-modal>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import { downFile } from '@/api/manage'
+  export default {
+    name: 'submitInformation', // 反馈信息 弹窗
+    mixins: [JeecgListMixin],
+    components: { JEllipsis},
+    data() {
+      return {      
+        submitInformationModVis : false,
+         value:'',
+         text:''
+      }
+    },
+    watch:{
+    },
+   
+    methods: {
+        ok(){
+          this.$emit('close',this.value,this.text)
+          this.close()
+        },
+        close(){
+            this.submitInformationModVis = false
+            this.value = ''
+        }
+   },
+  }
+  </script>
+  <style lang="less" scoped>
+  @import '~@assets/less/common.less';
+  @import '~@assets/less/overwriter.less';
+  // /deep/ .ant-table-thead > tr > th {
+  //   text-align: center;
+  //   // font-weight: 700;
+  // }
+  
+  // /deep/ .ant-table-tbody {
+  //   text-align: center;
+  // }
+  //  /deep/ .ant-table-footer .ant-table-body {
+  //     overflow: hidden !important;
+  //   }
+  // /deep/ th.replacecolor {
+  //   background-color: #ccc;
+  // }
+  /deep/ .ant-modal-body {
+    height: 100% !important;
+  }
+  /deep/ .ant-modal-content{
+    overflow: auto;
+  }
+  </style>
+  

+ 1 - 1
src/views/packing-list/clothes-list.vue

@@ -747,7 +747,7 @@ export default {
       bitchPush({ids : ids}).then(res =>{
         this.clothesListData.map(item=>{
           this.selectedRowKeys.map(event=>{
-            if(item.pushState!=='4'&&item.id==event){
+            if(item.pushState!=='4'&&item.pushState!=='3'&&item.id==event){
               item.pushState = '3'
             }
           })

+ 1 - 1
src/views/packing-list/fabric-list.vue

@@ -717,7 +717,7 @@ export default {
       bitchPush({ids : ids}).then(res =>{
         this.fabricListData.map(item=>{
           this.selectedRowKeys.map(event=>{
-            if(item.pushState!=='4'&&item.id==event){
+            if(item.pushState!=='4'&&item.pushState!=='3'&&item.id==event){
               item.pushState = '3'
               this.$forceUpdate()
             }

+ 2 - 2
src/views/pre-book/advancePackingListModal.vue

@@ -87,10 +87,10 @@
           :loading="loading"
           :pagination="pagination"
           row-key="itemId"
-          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,fixed:true}"
           @change="handleTableChange"
           bordered
-          :scroll="{ x: 2800,y:500 }"
+          :scroll="{ x: 2000,y:500 }"
           size="small"
         >
         </a-table>

+ 18 - 0
src/views/pre-book/preBookList.vue

@@ -118,6 +118,7 @@
             <a-menu slot="overlay" v-if="record.theDocumentsState == '0'">
               <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
               <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
+              <a-menu-item><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item>
                 <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
                   <a href="javascript:void(0);" style="color:green;">提交</a>
@@ -132,6 +133,7 @@
             <!-- 已提交 -->
             <a-menu slot="overlay" v-if="record.theDocumentsState == '1'">
               <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
+              <a-menu-item><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item>
                 <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancel(record)">
                   <a href="javascript:void(0);" style="color:red;">取消提交</a>
@@ -370,6 +372,22 @@ export default {
       })
     },
 
+    //复制
+    copyForm(record){
+     preBookById({ id: record.id }).then(res => {
+        if (res.success) {
+          res.result.consigneeAll = res.result.consignee+"+"+res.result.consigneeAddress+"+"+res.result.notifyParty+"+"+res.result.notifyPartyAddress;
+          res.result.money = res.result.money.toFixed(2)
+          res.result.syLetterDepositItemList = []
+          this.$refs.addPreBookDrawer.addPreBook = res.result;
+          this.$refs.addPreBookDrawer.defultMethod = 'edit';
+          this.$refs.addPreBookDrawer.visible = true
+        }else{
+          this.$message.error(res.message)
+        }
+      })
+    },
+
     // 操作 提交
     submit(record) {
       this.$nextTick(() => {

+ 122 - 59
src/views/reportForms/cost-allocation-table.vue

@@ -3,7 +3,7 @@
   <div id="costAllocationTable">
     <a-card :bordered="false">
       <!-- 主表信息 点击搜索后 回显--->
-                <a-row :gutter="24">
+      <a-row :gutter="24">
       <div class="table-page-search-wrapper">
         <!-- ref="form" :model="costAllocationTable" -->
         <a-form-model layout="inline" class="kk">
@@ -67,50 +67,61 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="计划数量" prop="planQuantity">
-                {{ detailsPlanNum.planQuantity }}
+              <a-form-model-item label="面料不含税成本(¥)" prop="fabriccostNotincludestax" >
+                {{ detailsPlanNum.fabriccostNotincludestax }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="美元外销总价" prop="usdTotalexportprice">
-                {{ detailsPlanNum.usdTotalexportprice }}
+              <a-form-model-item label="辅料不含税成本(¥)" prop="excipiencostNotincludestax">
+                {{ detailsPlanNum.excipiencostNotincludestax }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="人民币费用支出" prop="rmbExpense">
-                <a href="javascript:void(0)" @click="mainTableExpenseCNY()">{{ detailsPlanNum.rmbExpense }}</a>
+              <a-form-model-item label="外销总价($)" prop="usdTotalexportprice">
+                {{ detailsPlanNum.usdTotalexportprice }}
               </a-form-model-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-model-item label="税率%" prop="taxrate" class="fontColor">
-                {{ detailsPlanNum.taxrate }}
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="外销金额(¥)" prop="rmbExportamount">
+                {{ detailsPlanNum.rmbExportamount }}
               </a-form-model-item>
-            </a-col> -->
+            </a-col>
             <a-col :md="6" :sm="8">
               <a-form-model-item label="实际出货数量" prop="actualShipquantity">
                 {{ detailsPlanNum.actualShipquantity }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="人民币外销金额" prop="rmbExportamount">
-                {{ detailsPlanNum.rmbExportamount }}
+              <a-form-model-item label="加工费(¥)" prop="rmbProcesscost">
+                {{ detailsPlanNum.rmbProcesscost }}
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="加工费($)" prop="usdProcesscost">
+                {{ detailsPlanNum.usdProcesscost }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="美元费用支出" prop="usdExpense" >
+              <a-form-model-item label="运杂费($)" prop="usdExpense" >
                 <a href="javascript:void(0)" @click="mainTableExpenseUSD()" >{{ detailsPlanNum.usdExpense }}</a>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="加工费(人民币)" prop="rmbProcesscost">
-                {{ detailsPlanNum.rmbProcesscost }}
+              <a-form-model-item label="事故金额($)" prop="accidentUsdamount" >
+                {{ detailsPlanNum.accidentUsdamount }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="加工费(美元)" prop="usdProcesscost">
-                {{ detailsPlanNum.usdProcesscost }}
+              <a-form-model-item label="事故金额(¥)" prop="accidentcnyAmount" >
+                {{ detailsPlanNum.accidentcnyAmount }}
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="计划数量" prop="planQuantity">
+                {{ detailsPlanNum.planQuantity }}
               </a-form-model-item>
             </a-col>
+
             <a-col :md="6" :sm="8">
               <a-form-model-item label="短出数" prop="shortseveral" >
                 {{ detailsPlanNum.shortseveral }}
@@ -121,87 +132,127 @@
                 {{ detailsPlanNum.shortvalue }}
               </a-form-model-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="8">
-              <a-form-model-item label="短出面料成本" prop="fabricshortcost" class="fontColor">
-                {{ detailsPlanNum.fabricshortcost }}
-              </a-form-model-item>
-            </a-col> -->
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="事故单美金金额" prop="accidentUsdamount" >
-                {{ detailsPlanNum.accidentUsdamount }}
+              <a-form-model-item label="面料成本($)" prop="UsdfabriccostIncludestax" >
+                {{ detailsPlanNum.fabriccostIncludestaxUsd }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="面料含税成本" prop="fabriccostIncludestax" >
+              <a-form-model-item label="面料成本(¥)" prop="fabriccostIncludestax" >
                 {{ detailsPlanNum.fabriccostIncludestax }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="面料含税成本(美元)" prop="UsdfabriccostIncludestax" >
-                {{ detailsPlanNum.fabriccostIncludestaxUsd }}
+              <a-form-model-item label="辅料成本($)" prop="UsdexcipiencostIncludestax">
+                {{ detailsPlanNum.excipiencostIncludestaxUsd }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="辅料含税成本" prop="excipiencostIncludestax">
+              <a-form-model-item label="辅料成本(¥)" prop="excipiencostIncludestax">
                 {{ detailsPlanNum.excipiencostIncludestax }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="辅料含税成本(美元)" prop="UsdexcipiencostIncludestax">
-                {{ detailsPlanNum.excipiencostIncludestaxUsd }}
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="8">
-              <a-form-model-item label="销售订单本币总额" prop="salesordersLocaltotal">
+              <a-form-model-item label="销售订单总额(¥)" prop="salesordersLocaltotal">
                 {{ detailsPlanNum.salesordersLocaltotal }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="事故单人民币金额" prop="accidentcnyAmount" >
-                {{ detailsPlanNum.accidentcnyAmount }}
+              <a-form-model-item label="销售订单总额($)" prop="salesrrdersOriginaltotal">
+                {{ detailsPlanNum.salesrrdersOriginaltotal }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="面料不含税成本" prop="fabriccostNotincludestax" >
-                {{ detailsPlanNum.fabriccostNotincludestax }}
+              <a-form-model-item label="费用支出(¥)" prop="rmbExpense">
+                <a href="javascript:void(0)" @click="mainTableExpenseCNY()">{{ detailsPlanNum.rmbExpense }}</a>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="面料不含税成本(美元)" prop="UsdfabriccostNotincludestax" >
-                {{ detailsPlanNum.fabriccostNotincludestaxUsd }}
+              <a-form-model-item label="运费税额" prop="salesrrdersOriginaltotal">
+                {{  }}
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="8">
-              <a-form-model-item label="辅料不含税成本" prop="excipiencostNotincludestax">
-                {{ detailsPlanNum.excipiencostNotincludestax }}
+            <!-- <a-col :md="6" :sm="8">
+              <a-form-model-item label="供应商事故单($)" prop="salesrrdersOriginaltotal">
+                {{ detailsPlanNum.supperAccidentUsdamount, }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="辅料不含税成本(美元)" prop="UsdexcipiencostNotincludestax">
-                {{ detailsPlanNum.excipiencostNotincludestaxUsd }}
+              <a-form-model-item label="供应商事故单(¥)" prop="salesrrdersOriginaltotal">
+                {{ detailsPlanNum.supperAccidentcnyAmount }}
               </a-form-model-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="销售订单原币总额" prop="salesrrdersOriginaltotal">
-                {{ detailsPlanNum.salesrrdersOriginaltotal }}
+              <a-form-model-item label="税率%" prop="taxrate" > 
+                <a-input placeholder="请输入" v-model="detailsPlanNum.taxrate"  @blur="changeTaxrate" class="taxrate"/>
               </a-form-model-item>
             </a-col>
+           
+           
+            
+           
+           
+            <!-- <a-col :md="6" :sm="8">
+              <a-form-model-item label="短出面料成本" prop="fabricshortcost" class="fontColor">
+                {{ detailsPlanNum.fabricshortcost }}
+              </a-form-model-item>
+            </a-col> -->
+            
+           
+            
+           
+            
+            
+            <!-- <a-col :md="6" :sm="8">
+              <a-form-model-item label="面料不含税成本(美元)" prop="UsdfabriccostNotincludestax" >
+                {{ detailsPlanNum.fabriccostNotincludestaxUsd }}
+              </a-form-model-item>
+            </a-col> -->
+<!--            
             <a-col :md="6" :sm="8">
+              <a-form-model-item label="辅料不含税成本(美元)" prop="UsdexcipiencostNotincludestax">
+                {{ detailsPlanNum.excipiencostNotincludestaxUsd }}
+              </a-form-model-item>
+            </a-col> -->
+            
+            <!-- <a-col :md="6" :sm="8">
               <a-form-model-item label="制单人" prop="preparedBy">
                 {{ detailsPlanNum.preparedBy }}
               </a-form-model-item>
-            </a-col>
+            </a-col> -->
 
             <a-col :md="6" :sm="8" class="noprint">
-              <h4 style="color:red;">
-                标记
-                <span>(计算结果是负值时,该标记是红色)</span>
+              <a-form-model-item label="" prop="" >
+              <h4 style="color:red;" v-if="color1<0">
+                标记(A)
+                <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
               </h4>
+              <h4 style="color:black;" v-else>
+                标记(A)
+                <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
+              </h4>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="8" class="noprint">
+              <a-form-model-item label="" prop="" >
+              <h4 style="color:blue;" v-if="color2<0.8">
+                标记(B)
+                <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
+              </h4>
+              <h4 style="color:black;" v-else>
+                标记(B)
+                <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
+              </h4>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-model-item label="备注" prop="UsdfabriccostNotincludestax" >
+                <a-input style="width:100%" type="text" v-model="detailsPlanNum.memo" @blur="changeContainerNumber" />
+              </a-form-model-item>
             </a-col>
-
         </a-form-model>
       </div>
-                </a-row>
+      </a-row>
     </a-card>
 
     <!--tabs 组件引入  -->
@@ -409,7 +460,9 @@ export default {
       costPayData: [],
 
       isDisabled: false, //按钮禁止
-      billstatus: '' // 单据状态
+      billstatus: '', // 单据状态
+      color1:0,
+      color2:0,
       // dateFormat: 'YYYY-MM-DD',
     }
   },
@@ -477,8 +530,8 @@ export default {
             })
             //  this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
              this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
-             this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/1.13).toFixed(2)//合计中的不含税面料总额
-            // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
+             this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/(1+Number(this.detailsPlanNum.taxrate))).toFixed(2)//合计中的不含税面料总额
+             // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
             // this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
             //合计中辅料相关金额
             var s = 0,
@@ -488,7 +541,7 @@ export default {
               v+=Number(item.rmbAmount)
             })
             this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
-            this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/1.13).toFixed(2)//辅料不含税金额合计
+            this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+Number(this.detailsPlanNum.taxrate))).toFixed(2)//辅料不含税金额合计
             //合计中出运明细相关金额
             var s =0,
             v = 0,
@@ -545,6 +598,9 @@ export default {
       this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?'':Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本   
       this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?'':Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本   
       this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?'':Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额   
+      this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
+      this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
+      this.color2 = this.color2>0?this.color2:-this.color2
     },
 
     //计算短出货值
@@ -724,6 +780,10 @@ export default {
         })
         
     },
+    //该表税率
+    changeTaxrate(){
+      this.$refs.unitTabs.changeTaxrate(this.detailsPlanNum.taxrate)
+    },
     //计算事故单美元金额和事故单人民币金额
     accidentCalculation(val){
       var usaMoney = 0,
@@ -847,4 +907,7 @@ export default {
 /deep/ .ant-input-group{
   padding-right: 6px !important;
 }
+.taxrate{
+  width: 40%;
+}
 </style>

+ 76 - 0
src/views/reportForms/cost-allocation-table/submitInformation.vue

@@ -0,0 +1,76 @@
+<template>
+    <a-modal
+      :title="备注"
+      v-model="remarkModVis"
+      width="50%"
+      @ok="ok"
+      cancelText="取消"
+      @cancel="close"
+    >
+    <div>
+      
+     <a-textarea
+      v-model="value"
+      placeholder="请输入"
+      :auto-size="{ minRows: 3, maxRows: 15 }"
+    />
+    </div>
+    </a-modal>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import { downFile } from '@/api/manage'
+  export default {
+    name: 'submitInformation', // 反馈信息 弹窗
+    mixins: [JeecgListMixin],
+    components: { JEllipsis},
+    data() {
+      return {      
+        remarkModVis : false,
+         value:'',
+         text:'',
+         father:{}
+      }
+    },
+    watch:{
+    },
+   
+    methods: {
+        ok(){
+          this.$emit('close',this.value,this.text,this.father)
+          this.close()
+        },
+        close(){
+            this.remarkModVis = false
+            this.value = ''
+        }
+   },
+  }
+  </script>
+  <style lang="less" scoped>
+  @import '~@assets/less/common.less';
+  @import '~@assets/less/overwriter.less';
+  // /deep/ .ant-table-thead > tr > th {
+  //   text-align: center;
+  //   // font-weight: 700;
+  // }
+  
+  // /deep/ .ant-table-tbody {
+  //   text-align: center;
+  // }
+  //  /deep/ .ant-table-footer .ant-table-body {
+  //     overflow: hidden !important;
+  //   }
+  // /deep/ th.replacecolor {
+  //   background-color: #ccc;
+  // }
+  /deep/ .ant-modal-body {
+    height: 100% !important;
+  }
+  /deep/ .ant-modal-content{
+    overflow: auto;
+  }
+  </style>
+  

+ 62 - 11
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -32,9 +32,14 @@
             <span slot="fabRemaQuaSlot" slot-scope="text">
               <a>{{ Number(text).toFixed(4) }}</a>
             </span>
+            <!-- 余下数量-->
+            <span slot="pilosityFewerSlot" slot-scope="text">
+              <a>{{ Number(text).toFixed(4) }}</a>
+            </span>
             <!-- 备注 -->
             <span slot="remarks" slot-scope="text,record">
-              <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/>
+              <!-- <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/> -->
+              <a @click="inputRemark(record,'面料')" v-show='showSelect==0'> 备注</a>
               <span v-show='showSelect==1'>{{ text }}</span>
             </span>
           </a-table>
@@ -66,7 +71,8 @@
             </span>
             <!-- 备注 -->
             <span slot="remarks" slot-scope="text,record">
-              <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/>
+              <!-- <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/> -->
+              <a @click="inputRemark(record,'辅料')" v-show='showSelect==0'> 备注</a>
               <span v-show='showSelect==1'>{{ text }}</span>
             </span>
           </a-table>
@@ -180,6 +186,8 @@
       <ingInQua-modal ref="ingInQuaModal" :father="cc"></ingInQua-modal>
       <!-- 余下数量 -->
       <ingRemQua-modal ref="ingRemQuaModal" :father="bb"></ingRemQua-modal>
+      <pilosity-fewer-list-modal ref="pilosityFewerListModal"></pilosity-fewer-list-modal>
+      <submit-information  ref="submitInformation" @close="closeRemark"></submit-information>
     </div>
   </div>
 </template>
@@ -193,7 +201,8 @@ import fabInQuaModal from '@views/cost-allocation-total/modal/fabInQuaModal.vue'
 import fabRemQuaModal from '@views/cost-allocation-total/modal/fabRemQuaModal.vue'
 import ingInQuaModal from '@views/cost-allocation-total/modal/ingInQuaModal.vue'
 import ingRemQuaModal from '@views/cost-allocation-total/modal/ingRemQuaModal.vue'
-
+import pilosityFewerListModal from '@views/cost-allocation-total/modal/pilosityFewerModal.vue'
+import submitInformation from '@views/reportForms/cost-allocation-table/submitInformation.vue' // tabs组件
 export default {
   name: 'UnitTabs', //  Tabs 详情
   mixins: [JeecgListMixin],
@@ -203,7 +212,9 @@ export default {
     fabInQuaModal, // 面料 转入数量
     fabRemQuaModal, //  余下数量
     ingInQuaModal, // 辅料 转入数量
-    ingRemQuaModal // 余下数量
+    ingRemQuaModal ,// 余下数量
+    pilosityFewerListModal,//多发少发
+    submitInformation
   },
   data() {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
@@ -276,7 +287,7 @@ export default {
         {
           title: '购入数量',
           dataIndex: 'purchaseQuantity',
-          width: '9%',
+          width: '6%',
           className: 'replacecolor',
           customRender: (text, record, index) => {
             if(text!==''&&text){
@@ -287,7 +298,7 @@ export default {
         {
           title: '余下数量',
           dataIndex: 'fabricremainingQuantity',
-          width: '7%',
+          width: '6%',
           className: 'replacecolor',
           customCell: this.fabRemQuaCustomCell,
           scopedSlots: { customRender: 'fabRemaQuaSlot' }
@@ -295,7 +306,7 @@ export default {
         {
           title: '损耗',
           dataIndex: 'loss',
-          width: '9%',
+          width: '6%',
           className: 'replacecolor',
           customRender: (text, record, index) => {
             if(text!==''&&text){
@@ -316,6 +327,19 @@ export default {
           // slots:{title:'remainingQuantitycostTitle'} ,
 
         },
+        {
+          title: '多发少发',
+          dataIndex: 'pilosityFewer',
+          width: '9%',
+          className: 'replacecolor',
+          customCell: this.pilosityFewerCell,
+          scopedSlots: { customRender: 'pilosityFewerSlot' }
+          // customRender: (text, record, index) => {
+          //   if(text!==''&&text){
+          //     return Number(text).toFixed(4)
+          //   }
+          // },
+        },
         {
           title: '备注',
           dataIndex: 'remarks',
@@ -613,6 +637,15 @@ export default {
   },
   created() {},
   methods: {
+    changeTaxrate(data){
+      this.sumInfo.fabricExcludTax =''
+      this.sumInfo.ingExcludAmount=''
+      this.sumInfo.amountTotal=''
+      this.sumInfo.fabricExcludTax =(Number(this.sumInfo.fabricAmount)/(1+Number(data))).toFixed(2)//合计中的不含税面料总额
+      this.sumInfo.ingExcludAmount = (Number(this.sumInfo.ingAmount).toFixed(2)/(1+Number(data))).toFixed(2)//辅料不含税金额合计
+      this.sumInfo.amountTotal = Number(this.sumInfo.fabricExcludTax)+Number(this.sumInfo.ingExcludAmount)+Number( this.sumInfo.shipProcesFees)//合计金额
+      this.$forceUpdate()
+    },
     tabsCallback(key) {
       this.activeKey = key
       // console.log('点击的是', this.activeKey)
@@ -661,6 +694,19 @@ export default {
       }
     },
 
+    //面料-多发少发
+    pilosityFewerCell(record){
+      return {
+        on: {
+          click: event => {
+            console.log('面料 - 多发少发')
+            this.$refs.pilosityFewerListModal.pilosityFewerModVis = true
+            this.$refs.pilosityFewerListModal.pilosityFewerList = record.pilosityFewerList
+          }
+        }
+      }
+    },
+
     // 辅料-转入数量 弹框
     ingInQuaCustomCell(record) {console.log('辅料 - 转入数量')
       return {
@@ -690,10 +736,15 @@ export default {
         }
       }
     },
-
-    aa() {},
-    bb() {},
-    cc() {}
+    inputRemark(record,data){
+       this.$refs.submitInformation.remarkModVis = true
+       this.$refs.submitInformation.value = record.remarks
+       this.$refs.submitInformation.text = data
+       this.$refs.submitInformation.father = record
+    },
+    closeRemark(value,data,record){
+      record.remarks=value
+    }
   },
 
   computed: {

+ 53 - 15
src/views/reportForms/fabric-loss-table.vue

@@ -103,10 +103,10 @@
               <a-button type="primary" @click="openEnclosure">附件</a-button>
             </a-col>
             <a-col :md="6" :sm="8" class="noprint">
-              <!-- <a-upload    :file-list="fileList" :multiple="true"  :action="importExcelUrl" :data="{code:this.planNO}" :customRequest="uploadFlie">
+              <a-upload  productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false"   :action="importExcelUrl"  @change="handleImportExcel"  :data="{code:this.planNO,name:this.fileName}"  :beforeUpload="uploadFlie" :remove="removeFile">
                 <a-button type="primary" >附件上传</a-button>
-              </a-upload> -->
-              <j-upload   v-model="fabricLoss.attachs"  ></j-upload>
+              </a-upload>
+              <!-- <j-upload   v-model="fabricLoss.attachs"  ></j-upload> -->
               <!-- <a-upload  name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76"    :multiple="true"    :default-file-list="fileList">
                 <a-button type="primary" >附件上传</a-button>
               </a-upload> -->
@@ -469,11 +469,12 @@ import imoneyCell from '@views/reportForms/fabric-loss-table/imoneyCell.vue'
 import iquantityMoreLessModal from '@views/reportForms/fabric-loss-table/iquantityMoreLessModal.vue'
 import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
 import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
-import { getFabricLossDatas,saveFabricLossData } from '@api/reportForms/fabric-loss-table'
+import { getFabricLossDatas,saveFabricLossData,fileDetail,deleteFileDetail } from '@api/reportForms/fabric-loss-table'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import JUpload from '@/components/jeecg/JUpload'
 import moment from 'moment'
+import { runInThisContext } from 'vm'
 
 export default {
   name: 'FabricLossTable', // 面料损耗表
@@ -509,6 +510,7 @@ export default {
       },
       fileList: [
       ],
+      fileName:'',
       edit:'0',
       planNO:'',//计划单号
       isView:false,//是否查看状态
@@ -801,18 +803,52 @@ export default {
         importExcelUrl: 'report/FabricLoss/addFile' ,// 导入
       },
       noteOne: '', // 备注 1
-      noteTwo: '' // 备注 2
+      noteTwo: '', // 备注 2
+      dd:0
     }
   },
-
   methods: {
     uploadFlie(file) {
-      const formData = new FormData()
-      formData.append('file', file.file)
-      console.log(file.file.name)
-      debugger
+      this.fileName = file.name
+      // const formData = new FormData()
+      // formData.append('file',file.file)
+      // fileDetail({code:this.planNO,name:this.fileName}).then(res => {
+      //       if (res.success) {
+      //         this.onSearch(this.planNO,'0')
+      //       }else{
+      //         this.$message.error(res.message);
+      //       }
+      //     })
+      },
+      handleImportExcel(data){
+        if(data.fileList.length>this.fileList.length&&data.file.status=='uploading'){ 
+          var that =this
+          setTimeout(()=>{
+            that.onSearch(this.planNO,'0')
+        },1000)
+          
+        }
+        
+        
       },
-    daYin(){
+      removeFile(data){
+        deleteFileDetail({code:this.planNO,name:data.name}).then(res => {
+            if (res.success) {
+              var cc=[]
+              this.fileList.map(item=>{
+                if(item.name !== data.name){
+                  cc.push(item)
+                }
+              })
+              this.fileList = cc
+              this.loading =false
+              this.$message.success('删除成功');
+            }else{
+              this.$message.error(res.message);
+            }
+          })
+      },
+      daYin(){
          this.showSelect = 1
          this.$nextTick(() => {
           const html = window.document.getElementById('fabricLossTable').innerHTML 
@@ -849,12 +885,12 @@ export default {
           let textArea = win.document.getElementsByTagName('textarea')
           for (let i = 0; i < textArea.length; i++) {
              textArea[i].style.height = 'auto' // 先设置成auto,再设置高度,删除文字的时候高度才会改变
-             textArea[i].style.height = textArea[i].scrollHeight+30 + 'px'
+             textArea[i].style.height = textArea[i].scrollHeight+100 + 'px'
           }
             win.print();
             win.close();
-            this.showSelect = 0
          },500)
+         this.showSelect = 0
         //  win.print();
         //  win.close();
 		    //  this.showSelect = 0
@@ -873,9 +909,10 @@ export default {
             if (res.success) {
               this.PrintButton = false
               this.fabricLoss = res.result;
-              var fileList = this.fabricLoss.attachs.split(",")
+              var fileList =  this.fabricLoss.attachs!==''?this.fabricLoss.attachs.split(","):[]
               this.fileList = []
-              fileList.map(item=>{
+              if(fileList.length!==0){
+                fileList.map(item=>{
                   this.fileList.push({
                     uid: '-1',
                     name: item,
@@ -883,6 +920,7 @@ export default {
                     url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
                   })
               })
+              }
               this.edit = this.fabricLoss.edit
               // 开票成本成衣:获取原币和本币金额是否完全相同,完全相同隐藏美元列
               var findList = this.fabricLoss.fabricCostClothesList.filter(e=>e.ioriSum!=e.isum);

+ 15 - 5
src/views/reportForms/supply-capacity-table.vue

@@ -116,7 +116,7 @@
         :data-source="supplyCapacityData"
         :loading="loading"
         :pagination="pagination"
-        :scroll="{ x: 1800}"
+        :scroll="{ x: 1800,y:500}"
         @change="handleTableChange"
       >
       </a-table>
@@ -153,7 +153,7 @@ export default {
         },
         {
           title: '订单号',
-          width: 95,
+          width: 100,
           align: 'left',
           dataIndex: 'csrccode',
           className: 'replacecolor',
@@ -172,8 +172,8 @@ export default {
         { title: '订单类型', width: 70, dataIndex: 'iorderType', className: 'replacecolor',ellipsis: true, },
        
         {
-          title: '预发货日期',
-          width: 65,
+          title: '预约发货月份 ',
+          width: 75,
           dataIndex: 'darriveDate',
           // customRender: text => {
           //   return moment(text).format('YYYY-MM')
@@ -236,6 +236,9 @@ export default {
       open:false,
       // 分页
       pagination: {
+        pageSizeOptions: ["10","50", "100", "150"],
+        showSizeChanger: true,
+        pageSize:10
         // total: '',
         // current: 0,
         // pageSize: 0
@@ -272,7 +275,9 @@ export default {
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
-              pageSize: res.result.size
+              pageSize: res.result.size,
+              pageSizeOptions: ["10","50", "100", "150"],
+              showSizeChanger: true,
             }
           }
         })
@@ -402,6 +407,7 @@ export default {
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
       this.queryParam.pageNo = pagination.current
+      this.queryParam.pageSize = pagination.pageSize
       this.getSupplyCapList()
     }
   }
@@ -430,4 +436,8 @@ export default {
   border: none;
   padding: 0;
 }
+/deep/ .ant-table-bordered .ant-table-tbody>tr>td, .ant-table-bordered .ant-table-thead>tr>th{
+  // white-space: nowrap;
+  word-break: break-all;
+}
 </style>

+ 16 - 4
src/views/shipment-details/shipmentList.vue

@@ -201,7 +201,8 @@
 
         <!-- 操作 默认按钮  未提交未推送-->
         <span slot="operationSlot" slot-scope="text, record">
-           <a href="javascript:void(0);" @click="declareElements(record)" style="color:green">报关要素</a>
+           <a href="javascript:void(0);" @click="declareElements(record)" style="color:green"  v-if="authority">报关要素</a>
+           <a href ="javascript:return false;"  style="opacity: 0.2"  v-if="!authority">报关要素</a>
            <a-divider type="vertical" />
           <a href="javascript:void(0);" @click="itemNumberElement(record)" style="color:green">维护款号成分</a>
           
@@ -289,7 +290,8 @@
           </a-dropdown>
         </span>
       </a-table>
-      <span >共勾选{{selectedNumber}}条数</span>
+      <span style="margin-right: 55%;">共勾选{{selectedNumber}}条数</span>
+      <span >总数量:{{ allMoney }}</span>
     </a-card>
 
     <!-- 抽屉  -->
@@ -325,7 +327,7 @@ import declareElementsModal from '@views/shipment-details/declareElementsModal.v
 import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
 import itemNumEleModal from '@views/shipment-details/itemNumEleModal.vue'
 import { randomUUID } from '@/utils/util'
-
+import { USER_AUTH } from "@/store/mutation-types"
 import {
   shipmentList,
   deleteShipment,
@@ -364,6 +366,7 @@ export default {
       exportButton: '1',
       exportButton1:'1',
       id: '',
+      authority:true,
       selectedNumber:0,//已选择条数
       monthStartDate:'',//本月1号
       nextMonthStartDate:'',//下月1号
@@ -617,7 +620,7 @@ export default {
         }
       ],
       shipmentListData: [], // 发运明细数据
-
+      allMoney:'',
       // 查询条件
       queryParam: {
         flourOrGarment:'1'
@@ -673,6 +676,7 @@ export default {
       await  shipmentList(this.queryParam).then(res => {
           if (res.success) {
            this.loading = false
+           this.allMoney = res.message
            if(this.queryParam.flourOrGarment == '1'){
              this.exportButton ='0'
              this.exportButton1 = '1'
@@ -680,6 +684,14 @@ export default {
              this.exportButton ='1'
              this.exportButton1 = '0'
            }
+           let allAuthes = JSON.parse(sessionStorage.getItem(USER_AUTH));
+           var quanXian = []
+           allAuthes.map(item=>{ quanXian.push(item.action)})
+           if(quanXian.indexOf('cymx:sbys')==-1 && this.queryParam.flourOrGarment=='0'){
+            this.authority = true
+           }else if(quanXian.indexOf('cymx:sbys')==-1 && this.queryParam.flourOrGarment=='1'){
+            this.authority = false
+           }
            this.shipmentListData = res.result.records
             for (var i=0; i<this.shipmentListData.length; i++){
               this.shipmentListData.randomId = randomUUID();