Преглед на файлове

森语-搬运工对账单

jbb преди 2 години
родител
ревизия
009343a124
променени са 2 файла, в които са добавени 40 реда и са изтрити 50 реда
  1. 9 0
      src/views/oa/modules/SyCarryDetailModal.vue
  2. 31 50
      src/views/oa/modules/SyCarryModal.vue

+ 9 - 0
src/views/oa/modules/SyCarryDetailModal.vue

@@ -168,6 +168,15 @@
             width: '6%',
             ellipsis: true,
           },
+          {
+            title: '外销发票号',
+            dataIndex: 'saleInvoiceNo',
+            width: '9%',
+             ellipsis: true,
+             scopedSlots: { customRender: 'saleInvoiceNo' },
+             className: 'replacecolor',
+            // slots:{title:'invoiceNoTitle'}
+           },
            {
             title: '总件数',
             dataIndex: 'allNum',

+ 31 - 50
src/views/oa/modules/SyCarryModal.vue

@@ -149,7 +149,7 @@
           </span>
           <!-- 计划员 -->
            <span slot="jhyByData" slot-scope="text, record, index">
-                 <a-select  v-model="record.jhyNameData" style="width:100%" mode="multiple"
+                 <a-select  v-model="record.jhyByData" style="width:100%" mode="multiple"
                   show-search :filterOption="filterOption" @change="handleChange(record)"> 
                       <a-select-option
                      v-for="(item,index) in jhyNameOption"
@@ -249,7 +249,7 @@
             // title: '日期',
             align: "center",
             dataIndex: 'orderDate',
-            width: '10%',
+            width: '7%',
             ellipsis: true,
             scopedSlots: { customRender: 'orderDate' },
             slots:{title:'orderDateTitle'}
@@ -308,7 +308,7 @@
            {
             // title: '集装箱号',
             dataIndex: 'containerNo',
-             width: '15%',
+             width: '6%',
              ellipsis: true,
              scopedSlots: { customRender: 'containerNo' },
              className: 'replacecolor',
@@ -334,8 +334,8 @@
            },
            {
             // title: '计划员',
-            dataIndex: 'jhyNameData',
-             width: '7%',
+            dataIndex: 'jhyByData',
+             width: '5%',
              ellipsis: true,
              scopedSlots: { customRender: 'jhyByData' },
              className: 'replacecolor',
@@ -344,7 +344,7 @@
            {
             title: '签名',
             dataIndex: 'jhyName',
-            width: '5',
+            width: '5%',
              ellipsis: true,
              className: 'replacecolor'
            },
@@ -368,8 +368,8 @@
            {
             title: '操作',
             dataIndex: 'option',
-             width: 120,
-             ellipsis: true,
+             width: '12%',
+            fixed:'right',
              scopedSlots: { customRender: 'option' },
              className: 'replacecolor'
            }                   
@@ -453,7 +453,7 @@
           invoiceNo:'',
           price:'',
           jhyName:'',
-          jhyNameData:'',
+          jhyNameData:[],
           demo:'',
           name:''
         })
@@ -474,7 +474,7 @@
       handleChange(record){
          this.jhyNameOption.map(item=>{
            if(item.value == record.jhyByData){
-             record.jhyNameData = item.label
+             record.jhyNameData.push(item.label)
            }
          })
       },
@@ -493,37 +493,6 @@
         this.syCarryBTable.dataSource.splice(index,1)
         this.formState.totalNum =(Number(this.formState.totalNum) -Number(record.totalPrice)).toFixed(2)
       },
- 
-      /** 调用完edit()方法之后会自动调用此方法 */
-      // editAfter() {
-      //   this.$nextTick(() => {
-      //     this.form.setFieldsValue(pick(this.model, 'name', 'code', 'demo','total_num'))
-      //     console.log(this.model)
-
-      //     // 时间格式化
-      //     // this.form.setFieldsValue({ ckTime: this.model.ckTime ? moment(this.model.ckTime) : null })
-      //     // this.form.setFieldsValue({ rsxzTime: this.model.rsxzTime ? moment(this.model.rsxzTime) : null })
-      //     // this.form.setFieldsValue({ cwjlTime: this.model.cwjlTime ? moment(this.model.cwjlTime) : null })
-      //   })
-      //   // 加载子表数据
-      //   if (this.model.id) {
-      //     let params = { id: this.model.id }
-      //     this.requestSubTableData(this.url.syCarryB.list, params, this.syCarryBTable)
-      //   }
-      // },
-      // handleAutograph(props){
-      //   var code = '',
-      //   text=''
-      //   this.syCarryBTable.columns[7].options.map(item=>{
-      //     if(item.text ==this.$store.getters.nickname ){
-      //        code = item.value
-      //        text = item.text
-      //     }
-      //   })      
-      //   if(code == this.syCarryBTable.dataSource[props.index].jhyName){
-      //     this.syCarryBTable.dataSource[props.index].jhyNameData = text
-      //   })
-      // },
       changeJhy(props){
         console.log(this.syCarryBTable.columns[7].options)
 
@@ -549,21 +518,20 @@
             this.syCarryBTable.dataSource.map(item=>{
              
             //  console.log('ssssssssssss',item.jhyByData.toString());
-              if(item.jhyByData!=''&&item.jhyByData){
-                
-                 // item.jhyByData.forEach(t => {
-                 //    console.log('ssssssssssss',t);
-                 // })
+              if(item.jhyByData.length!==0&&item.jhyByData){
                 item.jhyByData = item.jhyByData.toString();
               }
+              if(item.jhyNameData.length!==0&&item.jhyNameData){
+                item.jhyNameData = item.jhyNameData.toString();
+              }
               if(item.orderDate!==''&&item.orderDate){
                 item.orderDate = moment(item.orderDate).format('YYYY-MM-DD HH:mm:ss');
               }
             })
             obj.syCarryBList = this.syCarryBTable.dataSource
             await this.judageTablez(obj.syCarryBList)
-            this.buttonLoading = true
             if(this.defultMethods == 'add' && this.passVerification == 'yes'){
+              this.buttonLoading = true
                 subimtList(obj).then(res => {
                      if (res.success) {
                       this.$message.success('新增成功')
@@ -576,6 +544,7 @@
                     }
                 })
             }else if(this.passVerification == 'yes'){
+              this.buttonLoading = true
                 putAction('/oa/syCarry/edit', obj).then((res) => {
                    if(res.success){
                       this.$message.success('编辑成功')
@@ -606,10 +575,14 @@
               {key:'price',value:'单价'},
               {key:'containerNo',value:'集装箱号'},
               {key:'totalPrice',value:'总价'},
-              {key:'jhyByData',value:'计划员'},
+              {key:'jhyNameData',value:'计划员'},
               ]
              for(var j=0 ; j<required.length;j++){
-                if(tableRow[required[j].key] == null || tableRow[required[j].key] == "" || tableRow[required[j].key] == undefined){
+              if(required.key == 'jhyNameData' && (!tableRow[jhyNameData]|| tableRow[jhyNameData].length==0)){
+                this.$message.error('第'+(i+1)+'行'+'计划员'+'无值,无法保存');
+                  this.passVerification = 'no'
+                  return
+              }else if(tableRow[required[j].key] == null || tableRow[required[j].key] == "" || tableRow[required[j].key] == undefined){
                   this.$message.error('第'+(i+1)+'行'+required[j].value+'无值,无法保存');
                   this.passVerification = 'no'
                   return
@@ -629,6 +602,8 @@
          this.syCarryBTable.dataSource = res.result.syCarryBList
          this.syCarryBTable.dataSource.map(item=>{
           item.orderDate = moment(item.orderDate)
+          item.jhyByData=item.jhyByData.split(',')
+          item.jhyNameData= item.jhyNameData.split('/')
          })
          this.getRemarks()
         //  this.handleChangePrice()
@@ -660,7 +635,7 @@
           record.price = 0.00
         }
         if(record.price && record.coatHanger){
-          record.totalPrice = Number(record.coatHanger)* Number(record.price)+ Number((C?record.detailedNum:0))
+          record.totalPrice = Number(record.coatHanger)* Number(record.price)+ Number((record.detailedNum?record.detailedNum:0))
           this.$forceUpdate()
         }else{
            record.totalPrice = record.detailedNum
@@ -748,6 +723,12 @@
       content: '*';
       color: red;
 }
+/deep/ .ant-calendar-picker{
+  width: 141px !important;
+}
+/deep/ .ant-table-fixed-left table,.ant-table-fixed-right table{ 
+  width: min-content;
+}
 // /deep/.ant-table-fixed-header .ant-table-scroll .ant-table-header{
 
 //    width: calc(100% - 8px);//减去滚动条的宽度