Browse Source

提交福达

caojunjie 2 years ago
parent
commit
618ae7e16b

+ 1 - 1
src/api/exportTrade/purchaseContract.js

@@ -109,7 +109,7 @@ export function purchaseStatusUpdate(query) {
   return request({
     url: '/api/blade-purchase-sales/exportOrder/purchaseStatusUpdate',
     method: 'post',
-    params: query
+    data: query
   })
 }
 // 获取销售订单明细详情

+ 3 - 0
src/enums/column-name.js

@@ -1067,6 +1067,9 @@ const columnName = [{
   code: 254.4,
   name: '海运出口-附件'
 }, {
+  code: 254.5,
+  name: '海运出口-分票'
+}, {
   code: 255,
   name: '海运进口-列表'
 }, {

+ 1 - 0
src/option/system/dictbiz.js

@@ -210,6 +210,7 @@ export const optionChild = {
       label: '颜色',
       prop: 'colour',
       type: 'color',
+      value: "#000000",
       hide: true,
       colorFormat:"hex",
       showAlpha:false

+ 3 - 0
src/views/exportTrade/customerInquiry/index.vue

@@ -40,6 +40,9 @@
         <template slot-scope="{ row }" slot="amount">
           <span>{{ row.amount | decimalFormat }}</span>
         </template>
+        <template slot-scope="{ row }" slot="orderStatus">
+          <span v-for="item in $refs.crud.DIC.orderStatus" :style="{color: item.colour}" v-if="item.dictValue == row.orderStatus">{{row.orderStatus}}</span>
+        </template>
         <template slot-scope="{ row }" slot="purchaseAmount">
           <span>{{ row.purchaseAmount | decimalFormat }}</span>
         </template>

+ 7 - 12
src/views/exportTrade/invoice/config/mainList.json

@@ -22,16 +22,14 @@
       "overHidden": true,
       "search": true,
       "searchSpan": 8
-    },
-    {
+    },{
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "searchSpan": 8,
       "minWidth": 80,
       "overHidden": true
-    },
-    {
+    },{
       "label": "客户详情",
       "prop": "clientMessage",
       "overHidden": true
@@ -125,11 +123,11 @@
       "prop": "shippingRemark",
       "overHidden": true
     },{
-      "label": "预计货好状态",
+      "label": "采购状态",
       "prop": "estimateGoodGoods",
       "overHidden": true
     },{
-      "label": "预计货好日期",
+      "label": "采购日期",
       "prop": "estimateGoodGoodsDate",
       "overHidden": true
     },{
@@ -156,16 +154,14 @@
       "label": "出运日期",
       "prop": "shippingDate",
       "overHidden": true
-    },
-    {
+    },{
       "label": "备注",
       "prop": "deliveryRemarks",
       "search": true,
       "searchSpan": 8,
       "minWidth": 80,
       "overHidden": true
-    },
-    {
+    },{
       "label": "制单日期",
       "prop": "createTime",
       "minWidth": 80,
@@ -174,8 +170,7 @@
       "searchSpan": 8,
       "type": "date",
       "format": "yyyy-MM-dd"
-    },
-    {
+    },{
       "label": "制单人",
       "prop": "createUser",
       "minWidth": 80,

+ 4 - 5
src/views/exportTrade/invoice/detailsPage.vue

@@ -117,11 +117,11 @@
               @click.stop="openReport()"
               >报表打印</el-button
             >
-            <el-button :type="!form.customsStatus?'info':'primary'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 1"
+            <el-button :type="!form.customsStatus?'info':'primary'" size="small" :disabled="!form.id||form.estimateGoodGoods !='采购完成'" @click.native="dialog = true;fudaSatus = 1"
             >已报关</el-button>
-            <el-button :type="!form.shippingStatus?'info':'warning'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 2"
+            <el-button :type="!form.shippingStatus?'info':'warning'" size="small" :disabled="!form.id||form.estimateGoodGoods !='采购完成'" @click.native="dialog = true;fudaSatus = 2"
             >已出运</el-button>
-            <el-button :type="form.documentaryStatus == '已完成'?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 3"
+            <el-button :type="form.documentaryStatus == '已完成'?'success':'info'" size="small" :disabled="!form.id||form.estimateGoodGoods !='采购完成'" @click.native="dialog = true;fudaSatus = 3"
             >已完成</el-button>
           </template>
           <template slot-scope="{ row }" slot="corpId">
@@ -859,8 +859,7 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       });
-      detail(id)
-        .then(res => {
+      detail(id).then(res => {
           if (this.detailData.status == "copy") {
             delete res.data.data.id;
             delete res.data.data.sysNo;

+ 10 - 4
src/views/exportTrade/invoice/index.vue

@@ -8,6 +8,7 @@
         v-model="form"
         :page.sync="page"
         :search.sync="search"
+        :key="key"
         @search-change="searchChange"
         @current-change="currentChange"
         @size-change="sizeChange"
@@ -63,6 +64,9 @@
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
         </template>
+        <template slot-scope="{ row }" slot="deliveryStatus">
+          <span v-for="item in $refs.crud.DIC.deliveryStatus" :style="{color: item.colour}" v-if="item.dictValue == row.deliveryStatus">{{row.deliveryStatus}}</span>
+        </template>
         <template slot="portOfDestinationSearch">
           <port-info v-model="search.portOfDestination" />
         </template>
@@ -125,6 +129,7 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+      key:0,
       search: {
         businessDate: defaultDate()
       },
@@ -154,12 +159,13 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
     this.option.height = window.innerHeight - 210;
+    this.key++
   },
   activated() {
     //当页面已打开并无法重新渲染时,用activated重新激活keepalive组件
-    if (!this.$store.getters.outStatus && !this.show) {
-      this.show = true;
-    }
+    // if (!this.$store.getters.outStatus && !this.show) {
+    //   this.show = true;
+    // }
     setTimeout(() => {
       if (this.$route.query.pageType == "Generate" && this.show) {
         this.newAdd();
@@ -210,7 +216,7 @@ export default {
         status: status
       };
       this.show = false;
-      this.$store.commit("OUT_IN__DETAIL");
+      // this.$store.commit("OUT_IN__DETAIL");
     },
     copyDoc() {
       this.selectionList.forEach(e => {

+ 9 - 14
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -44,6 +44,15 @@
       "overHidden": true
     },
     {
+      "label": "销售订单号",
+      "prop": "srcOrderNo",
+      "search": true,
+      "searchSpan": 8,
+      "index": 3.1,
+      "minWidth": 100,
+      "overHidden": true
+    },
+    {
       "label": "预交日期",
       "prop": "plannedDeliveryDate",
       "search": true,
@@ -191,20 +200,6 @@
       "overHidden": true
     },
     {
-      "label": "跟单状态",
-      "prop": "documentaryStatus",
-      "index": 8.59,
-      "minWidth": 80,
-      "overHidden": true
-    },
-    {
-      "label": "跟单日期",
-      "prop": "documentaryDate",
-      "index": 8.6,
-      "minWidth": 80,
-      "overHidden": true
-    },
-    {
       "label": "收货金额",
       "prop": "",
       "index": 9,

+ 48 - 8
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -181,13 +181,12 @@
                 icon="el-icon-printer"
                 size="small"
                 @click.stop="openReport()"
-                >报表打印</el-button
-              >
-              <el-button type="info" size="small" :disabled="!form.id || form.fudaPurchaseStatus" @click.native="PSModification(1)"
+                >报表打印</el-button>
+              <el-button :type="form.productionScheduling?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 1"
               >排产中</el-button>
-              <el-button type="info" size="small" :disabled="!form.id || form.productionScheduling" @click.native="PSModification(2)"
+              <el-button :type="form.estimateGoodGoods?'success':'info'" size="small" :disabled="!form.id" @click.native="dialog = true;fudaSatus = 2"
               >预计货好</el-button>
-              <el-button type="info" size="small" :disabled="!form.id || form.estimateGoodGoods != '待采购'" @click.native="PSModification(3)"
+              <el-button type="info" size="small" :disabled="!form.id || form.fudaPurchaseStatus != '采购中'" @click.native="dialog = true;fudaSatus = 3"
               >采购完成</el-button>
 <!--              <el-button-->
 <!--                type="warning"-->
@@ -348,6 +347,27 @@
       reportName="客户询价"
       @onClose="onClose()"
     ></report-dialog>
+    <el-dialog
+        title="选择日期"
+        :visible.sync="dialog"
+        v-if="dialog"
+        width="30%"
+        append-to-body>
+      <span>
+        <el-date-picker
+            v-model="pickerValue"
+            type="date"
+            style="width: 100%;"
+            size="small"
+            value-format="yyyy-MM-dd HH:ss:mm"
+            placeholder="选择日期">
+      </el-date-picker>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialog = false;">取 消</el-button>
+        <el-button type="primary" @click="PSModification(fudaSatus)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -376,10 +396,21 @@ import {
 } from "@/util/validate";
 import financialAccount from "@/components/finance/financialAccount";
 import billApplication from "@/components/bill/billApplication";
+import {dateFormat} from "@/util/date";
 export default {
   name: "detailsPageEdit",
+  watch:{
+    dialog(newVla, oldVal) {
+      if (newVla){
+        this.pickerValue = dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00"
+      }
+    }
+  },
   data() {
     return {
+      pickerValue:dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
+      dialog:false,
+      fudaSatus:0,
       billData: {}, //账单需要数据
       financialAccountDialog: false,
       applicationDialog: false,
@@ -647,6 +678,7 @@ export default {
     billApplication
   },
   async created() {
+    return
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -689,6 +721,7 @@ export default {
       this.$emit("copyOrder", this.form.id);
     },
     PSModification(type){
+      if (!this.pickerValue)return this.$message.error("请选择日期")
       const loading = this.$loading({
         lock: true,
         text: '操作中',
@@ -697,11 +730,19 @@ export default {
       });
       purchaseStatusUpdate({
         id:this.form.id,
-        purchaseStatusType:type
+        purchaseStatusType:type,
+        productionSchedulingDate:this.pickerValue,
+        estimateGoodGoodsDate:this.pickerValue,
+        fudaPurchaseDate:this.pickerValue
       }).then(res=>{
+        this.getDetail(this.form.id);
         this.$message.success("操作成功")
+        this.pickerValue = ''
+        this.dialog = false
         loading.close();
       }).catch((err)=>{
+        this.pickerValue = ''
+        this.dialog = false
         loading.close();
       })
     },
@@ -882,8 +923,7 @@ export default {
     getDetail(id) {
       this.showBut = false;
       this.pageLoading = true;
-      detail(id)
-        .then(res => {
+      detail(id).then(res => {
           if (this.detailData.status == "copy") {
             delete res.data.data.id;
             delete res.data.data.sysNo;

+ 15 - 0
src/views/exportTrade/purchaseContract/index.vue

@@ -102,6 +102,21 @@
             >{{ scope.row.orderNo }}
           </span>
         </template>
+        <template slot-scope="scope" slot="fudaPurchaseStatus">
+          <span class="el-button--text">
+            {{scope.row.fudaPurchaseStatus}}
+          </span>
+        </template>
+        <template slot-scope="scope" slot="fudaPurchaseDate">
+          <span class="el-button--text">
+            {{scope.row.fudaPurchaseDate}}
+          </span>
+        </template>
+        <template slot-scope="scope" slot="productionScheduling">
+          <span class="el-button--text">
+            {{scope.row.productionScheduling}}
+          </span>
+        </template>
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>

+ 3 - 0
src/views/exportTrade/salesContract/index.vue

@@ -30,6 +30,9 @@
             class="itemTable"
           ></avue-crud>
         </template>
+        <template slot-scope="{ row }" slot="orderStatus">
+          <span v-for="item in $refs.crud.DIC.orderStatus" :style="{color: item.colour}" v-if="item.dictValue == row.orderStatus">{{row.orderStatus}}</span>
+        </template>
         <template slot-scope="{ row }" slot="grossProfitRate">
           {{ row.grossProfitRate }}%
         </template>