wengyuwen 4 rokov pred
rodič
commit
fdc9304006

+ 20 - 0
src/api/reportAnalysis/profitGeneralLedger.js

@@ -0,0 +1,20 @@
+import request from '@/utils/request'
+
+// 查询数据主列表
+export function queryData(query) {
+  return request({
+    url: '/anpin/stockControl/salectAnpinProfit',
+    method: 'get',
+    params: query
+  })
+}
+// 查询项目名称
+export function queryItem(query) {
+  return request({
+    url: '/anpin/project/projectName',
+    method: 'post',
+    data: {
+      projectName:query
+    }
+  })
+}

+ 41 - 1
src/views/reportAnalysis/inoutStatistics.vue

@@ -76,10 +76,38 @@ export default {
           type: 'primary',
           size: 'mini',
           icon: 'el-icon-edit',
+          name: '全部',
+          plain:true,
+          disabled: false,
+          hasPermi:['anpin:stockControl:tWarehouseInorOutExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
+          name: '入账',
+          plain:true,
+          disabled: false,
+          hasPermi:['anpin:stockControl:tWarehouseInorOutExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
+          name: '未入账',
+          disabled: false,
+          plain: true,
+          hasPermi:['anpin:stockControl:tWarehouseInorOutExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
           name: '导出',
           disabled: false,
           hasPermi:['anpin:stockControl:tWarehouseInorOutExcePorrt']
-        }],
+        }
+        ],
       inDex: 4,
       total:0,
       formDataList:{
@@ -351,6 +379,18 @@ export default {
     buttonList(row){
       console.log(row)
       switch (row.name){
+        case '全部':
+          this.formDataList.fBillstatus = ''
+          this.getList()
+          break
+        case '入账':
+          this.formDataList.fBillstatus = 1
+          this.getList()
+          break
+        case '未入账':
+          this.formDataList.fBillstatus = 2
+          this.getList()
+          break
         case '导出':
           const queryParams = this.formDataList;
           this.$confirm("是否确认导出所有出入库数据项?", "警告", {

+ 337 - 68
src/views/reportAnalysis/inventoryAccount.vue

@@ -1,83 +1,352 @@
 <template>
-    <div class="app-container">
-      <el-form :model="form" ref="form" label-width="68px">
-        <el-form-item label="客户项目" prop="fCorpid">
-          <el-select
-            v-model="form.fCorpid"
-            filterable
-            remote
-            clearable
-            style="width: 200px"
-            size="small"
-            placeholder="请选择货权方"
-          >
-            <el-option
-              v-for="(dict, index) in fMblnoOptions"
-              :key="index.fId"
-              :label="dict.fName"
-              :value="dict.fId"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="物资类别" prop="fMblno">
-          <el-select
-            v-model="form.fMblno"
-            placeholder="请输入提单号"
-            clearable
-            style="width: 200px"
-            size="small"
-          />
-        </el-form-item>
-        <el-form-item label="年" prop="fToCorpid">
-          <el-date-picker
-            v-model="form.fToCorpid"
-            type="year"
-            style="width: 200px"
-            format="yyyy"
-            value-format="yyyy"
-            placeholder="选择年">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="开始月" prop="fProductName">
-          <el-date-picker
-            v-model="form.fProductName"
-            type="month"
-            format="MM"
-            style="width: 200px"
-            value-format="MM"
-            placeholder="选择月">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="结束月" prop="fMarks">
-          <el-date-picker
-            v-model="form.fProductName"
-            type="month"
-            format="MM"
-            style="width: 200px"
-            value-format="MM"
-            placeholder="选择月">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-<!--          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
-<!--          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
-        </el-form-item>
-      </el-form>
+  <div class="app-container">
+    <el-form label-width="80px" :model="form" ref="form">
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="供应商" prop="">
+        <el-input>
+
+        </el-input>
+      </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="物资类别" prop="">
+        <el-input>
+
+        </el-input>
+      </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="物资名称" prop="">
+        <el-input>
+
+        </el-input>
+      </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="仓库" prop="">
+        <el-input>
+
+        </el-input>
+      </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="期间" prop="">
+            <el-date-picker
+              v-model="form.data"
+              type="daterange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <div class="tabSetting">
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+            v-hasPermi="['warehouseBusiness:profit:export']"
+          >导出
+          </el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
+    </el-row>
+    <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-table v-loading="loading" :data="dataList" show-summary :summary-method="getSum">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column type="index" label="行号" align="center" width="100"/>
+      <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+        sortable
+        :fixed="item.fixed"
+      />
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="form.pageNum"
+      :limit.sync="form.pageSize"
+      :page-sizes="[50,100, 200, 500, 1000]"
+      @pagination="getList"
+    />
+
   </div>
 </template>
-
 <script>
+import draggable from 'vuedraggable'
+import Cookies from 'js-cookie'
+import { addSet, resetModule, select } from '@/api/system/set'
+
 export default {
-  name: 'inventoryAccount',
+  name: 'profitGeneralLedger',
+  components: { draggable },
   data(){
     return{
       form:{},
-      fMblnoOptions:[]
+      total:0,
+      dataList:[],
+      showSetting: false,
+      setRowList: [],
+      getRowList: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "fName",
+          name: "年",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fFeesName",
+          name: "月",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fMblno",
+          name: "供应商",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fProductName",
+          name: "货物",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      allCheck: false,
     }
+  },
+  methods:{
+    getList(){
+
+    },
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "利润总账",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    delRow() {
+      this.data = {
+        tableName: "利润总账",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "利润总账",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+        }
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    getSum(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '总计'
+        } else if (index === 7 || index === 8 || index === 9) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+          }
+        }
+      })
+      return sums
+    },
+
   }
 }
 </script>
-
 <style scoped lang="scss">
 
 </style>

+ 76 - 88
src/views/reportAnalysis/profitGeneralLedger.vue

@@ -1,61 +1,60 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="客户项目" prop="fCorpid">
+      <el-form-item label="客户项目" prop="fGoodsid">
         <el-select
-          v-model="queryParams.fCorpid"
+          v-model="queryParams.fGoodsid"
           filterable
-          remote
           clearable
           style="width: 200px"
           size="small"
           @keyup.enter.native="handleQuery"
-          placeholder="请选择货权方"
+          placeholder="请选择客户项目"
         >
           <el-option
-            v-for="(dict, index) in fMblnoOptions"
-            :key="index.fId"
-            :label="dict.fName"
-            :value="dict.fId"
+            v-for="(item, index) in projectOption"
+            :key="index"
+            :label="item.corpsName"
+            :value="item.fId"
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="物资类别" prop="fMblno">
+      <el-form-item label="物资类别" prop="fFeeType">
         <el-select
-          v-model="queryParams.fMblno"
-          placeholder="请输入提单号"
+          v-model="queryParams.fFeeType"
+          placeholder="请选择物资类别"
           clearable
           style="width: 200px"
           size="small"
           @keyup.enter.native="handleQuery"
-        />
+        >
+          <el-option
+            v-for="dict in fFeetypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
       </el-form-item>
-      <el-form-item label="年" prop="fToCorpid">
+      <el-form-item label="年" prop="annual">
         <el-date-picker
           @change="choseYear"
-          v-model="queryParams.fToCorpid"
+          v-model="queryParams.annual"
           type="year"
           format="yyyy"
           value-format="yyyy"
           placeholder="选择年">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="开始月" prop="fProductName">
+      <el-form-item label="开始月" prop="monthList">
         <el-date-picker
-          v-model="queryParams.fProductName"
-          type="month"
+          v-model="queryParams.monthList"
+          type="monthrange"
+          range-separator="至"
+          start-placeholder="开始月份"
           format="MM"
           value-format="MM"
-          placeholder="选择月">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="结束月" prop="fMarks">
-        <el-date-picker
-          v-model="queryParams.fProductName"
-          type="month"
-          format="MM"
-          value-format="MM"
-          placeholder="选择月">
+          end-placeholder="结束月份">
         </el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -139,7 +138,7 @@
         <el-button type="primary" @click="save()">确 定</el-button>
       </span>
     </el-dialog>
-    <el-table v-loading="loading" :data="receivableList" show-summary :summary-method="getSum">
+    <el-table v-loading="loading" :data="dataList" show-summary :summary-method="getSum">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column type="index" label="行号" align="center" width="100"/>
         <el-table-column
@@ -167,52 +166,24 @@
 </template>
 
 <script>
-import {
-  listpayable,
-  listWhgenleg,
-  getWhgenleg,
-  delWhgenleg,
-  addWhgenleg,
-  updateWhgenleg,
-  exportWhgenleg
-} from '@/api/reportManagement/profit'
-import { listWarehouse } from '@/api/basicdata/warehouse'
-import { listArea } from '@/api/basicdata/area'
-import { listGoods } from '@/api/basicdata/goods'
-import { listCorps } from '@/api/basicdata/corps'
-import { listFees } from '@/api/basicdata/fees'
+import { queryData,queryItem } from '@/api/reportAnalysis/profitGeneralLedger'
+
 import { addSet, select, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
 import draggable from "vuedraggable";
 
 export default {
-  name: 'generalLedgerDr',
+  name: 'profitGeneralLedger',
   components: {draggable},
   data() {
     return {
-      //费用名称
-      fWbuOptions:[],
-      businessInTypeOption:[],
-      businessOutTypeOption:[],
-      businessTransTypeOption:[],
-      businessTypeOption: [],
-      // 货权方(客户数据)
-      fMblnoOptions: [],
-      // 贸易方式(数据字典),对应t_trademodels 字典
-      fTrademodeidOptions: [],
-      // 货物
-      goodsOptions: [],
-      // 仓库(仓库数据)
-      warehouseOptions: [],
-      kqhouseOptions: [],
+      dataList:[],
       // 遮罩层
       loading: true,
       // 显示搜索条件
       showSearch: true,
       // 总条数
       total: 0,
-      // 库存总账表格数据
-      receivableList: [],
       // 弹出层标题
       title: '',
       // 是否显示弹出层
@@ -221,16 +192,10 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 50,
-        fCorpid: null,
-        fMblno: null,
-        timeExamine: null,
-        fToCorpid: null,
-        fProductName: null,
-        fMarks: null,
-        fReconciliation: null,
-        fBillstatus: null,
-        fBusinessType:null,
-        fFeeid:null
+        fGoodsid: null,
+        fFeeType: null,
+        annual: null,
+        monthList:null
       },
       // 表单参数
       showSetting: false,
@@ -240,46 +205,65 @@ export default {
       tableDate: [
         {
           surface: "1",
-          label: "fName",
-          name: "客户名称",
+          label: "annual",
+          name: "",
           checked: 0,
           width: 300,
         },
         {
           surface: "2",
-          label: "fFeesName",
-          name: "收入",
+          label: "abbreviated",
+          name: "",
           checked: 0,
           width: 300,
         },
         {
           surface: "3",
-          label: "fMblno",
-          name: "支出",
+          label: "fCorpName",
+          name: "客户名称",
           checked: 0,
           width: 300,
         },
         {
           surface: "4",
-          label: "fProductName",
+          label: "market",
+          name: "收入",
+          checked: 0,
+          width: 300,
+        },
+        {
+          surface: "5",
+          label: "purchase",
+          name: "支出",
+          checked: 0,
+          width: 300,
+        },
+        {
+          surface: "6",
+          label: "profit",
           name: "利润",
           checked: 0,
           width: 300,
         },
       ],
       allCheck: false,
-      data:null
+      fFeetypeOptions: [],
+      projectOption:[]
     }
   },
   created() {
-    // this.data = new Date().getUTCFullYear()
-    console.log(this.data)
-    this.queryParams.fToCorpid = JSON.stringify(new Date().getUTCFullYear())
-    console.log(this.queryParams)
+    this.queryParams.annual = JSON.stringify(new Date().getUTCFullYear())
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.getList()
     this.getRow();
+    this.getDicts("data_cost_attribute").then((response) => {
+      this.fFeetypeOptions = response.data;
+    });
+    queryItem().then(res=>{
+      console.log(res.data)
+      this.projectOption = res.data
+    })
   },
   methods: {
     choseYear(){
@@ -384,11 +368,8 @@ export default {
     /** 查询库存总账列表 */
     getList() {
       this.loading = true
-      this.getDicts('approval_process').then((response) => {
-        this.options = response.data
-      })
-      listpayable(this.queryParams).then(response => {
-        this.receivableList = response.rows
+      queryData(this.queryParams).then(response => {
+        this.dataList = response.rows
         this.total = response.total
         this.loading = false
       })
@@ -401,7 +382,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm('queryForm')
+      this.queryParams = {
+        pageNum: 1,
+          pageSize: 50,
+          fGoodsid: null,
+          fFeeType: null,
+          annual: JSON.stringify(new Date().getUTCFullYear()),
+          monthList:null
+      },
       this.handleQuery()
     },
     /** 导出按钮操作 */

+ 52 - 0
src/views/reportAnalysis/salesStatistics.vue

@@ -75,6 +75,42 @@ export default {
           type: 'primary',
           size: 'mini',
           icon: 'el-icon-edit',
+          name: '全部',
+          plain:true,
+          disabled: false,
+          hasPermi:['anpin:stockControl:salesOfOutboundExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
+          name: '暂存',
+          plain:true,
+          disabled: false,
+          hasPermi:['anpin:stockControl:salesOfOutboundExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          plain:true,
+          icon: 'el-icon-edit',
+          name: '审核中',
+          disabled: false,
+          hasPermi:['anpin:stockControl:salesOfOutboundExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          plain:true,
+          icon: 'el-icon-edit',
+          name: '审核通过',
+          disabled: false,
+          hasPermi:['anpin:stockControl:salesOfOutboundExcePorrt']
+        },
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
           name: '导出',
           disabled: false,
           hasPermi:['anpin:stockControl:salesOfOutboundExcePorrt']
@@ -253,6 +289,22 @@ export default {
     buttonList(row){
       console.log(row)
       switch (row.name){
+        case'全部':
+          this.formDataList.fBillstatus = ''
+          this.getList()
+          break
+        case'暂存':
+          this.formDataList.fBillstatus = 2
+          this.getList()
+          break
+        case'审核中':
+          this.formDataList.fBillstatus = 5
+          this.getList()
+          break
+        case'审核通过':
+          this.formDataList.fBillstatus = 6
+          this.getList()
+          break
         case '导出':
           const queryParams = this.formDataList;
           this.$confirm("是否确认导出所有销售出库数据项?", "警告", {

+ 19 - 17
src/views/warehouse/inStock/index.vue

@@ -1323,27 +1323,31 @@ export default {
     },
     backSave(valid,i){
       if(valid){
-        this.detailForm.fMoney = 0
-        for(let li in this.detailData){
-          if(this.detailData[li]){
-            this.detailForm.fMoney += Number(this.detailData[li].fAmount)
+        if(this.detailForm.fBillstatus < 4){
+          this.detailForm.fMoney = 0
+          for(let li in this.detailData){
+            if(this.detailData[li]){
+              this.detailForm.fMoney += Number(this.detailData[li].fAmount)
+            }
           }
-        }
-        let formData = new window.FormData();
-        formData.append('tWarehousebills', JSON.stringify(this.detailForm))
-        formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
-        formData.append('fBilltype', 'RK')
-        addSave(formData).then(res=>{
-            if(res.code == 200){
+          let formData = new window.FormData();
+          formData.append('tWarehousebills', JSON.stringify(this.detailForm))
+          formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
+          formData.append('fBilltype', 'RK')
+          addSave(formData).then(res=> {
+            if (res.code == 200) {
               this.detailForm = res.data.warehouseBills
-              this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
+              this.$set(this.detailForm, 'fStorekeeper', JSON.parse(this.detailForm.fStorekeeper))
               this.detailData = res.data.tWarehousebillsCntrs
-              for(let li in this.detailData){
-                this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
-                this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
+              for (let li in this.detailData) {
+                this.$set(this.detailData[li], 'fFeeunitid', JSON.stringify(this.detailData[li].fFeeunitid))
+                this.$set(this.detailData[li], 'fStltypeid', JSON.stringify(this.detailData[li].fStltypeid))
               }
               this.$message.success("保存成功")
               this.getList();
+            }
+          })
+            }
               if(i == 2){
                 let data = {
                   fBilltype:'RK',
@@ -1362,8 +1366,6 @@ export default {
                 this.MainTable = false
                 this.inDex = 4
               }
-            }
-        })
       }
     },
     //所以按钮

+ 96 - 93
src/views/warehouse/outStock/index.vue

@@ -481,71 +481,71 @@ export default {
           data:[],
           disabled:false
         },
-        {
-          surface: "10",
-          label: "tProductdate",
-          name: "生产日期",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 3,
-          data:[],
-          disabled:false
-        },{
-          surface: "11",
-          label: "fLotno",
-          name: "批号",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 2,
-          data:[],
-          disabled:false
-        },
-        {
-          surface: "12",
-          label: "fValid",
-          name: "保质期限",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 2,
-          data:[],
-          disabled:false,
-          onabort:'this.value=this.value.replace(/[^\\d^\\.]+/g,\'\')'
-        },
-        {
-          surface: "13",
-          label: "fUnits",
-          name: "单位",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 1,
-          data:[],
-          disabled:false
-        },
-        {
-          surface: "14",
-          label: "fStoreEnv",
-          name: "存储环境",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 1,
-          data:[],
-          disabled:false
-        },
-        {
-          surface: "15",
-          label: "fIsfilles",
-          name: "索证索票",
-          checked: 0,
-          width: 100,
-          operation:2,
-          changeable: 1,
-          disabled:false
-        },
+        // {
+        //   surface: "10",
+        //   label: "tProductdate",
+        //   name: "生产日期",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 3,
+        //   data:[],
+        //   disabled:false
+        // },{
+        //   surface: "11",
+        //   label: "fLotno",
+        //   name: "批号",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 2,
+        //   data:[],
+        //   disabled:false
+        // },
+        // {
+        //   surface: "12",
+        //   label: "fValid",
+        //   name: "保质期限",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 2,
+        //   data:[],
+        //   disabled:false,
+        //   onabort:'this.value=this.value.replace(/[^\\d^\\.]+/g,\'\')'
+        // },
+        // {
+        //   surface: "13",
+        //   label: "fUnits",
+        //   name: "单位",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 1,
+        //   data:[],
+        //   disabled:false
+        // },
+        // {
+        //   surface: "14",
+        //   label: "fStoreEnv",
+        //   name: "存储环境",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 1,
+        //   data:[],
+        //   disabled:false
+        // },
+        // {
+        //   surface: "15",
+        //   label: "fIsfilles",
+        //   name: "索证索票",
+        //   checked: 0,
+        //   width: 100,
+        //   operation:2,
+        //   changeable: 1,
+        //   disabled:false
+        // },
         {
           surface: "16",
           label: "remark",
@@ -1323,48 +1323,50 @@ export default {
     },
     backSave(valid,i){
       if(valid){
-        this.detailForm.fMoney = 0
-        for(let li in this.detailData){
-          if(this.detailData[li]){
-            this.detailForm.fMoney += Number(this.detailData[li].fAmount)
+        if(this.detailForm.fBillstatus < 4) {
+          this.detailForm.fMoney = 0
+          for (let li in this.detailData) {
+            if (this.detailData[li]) {
+              this.detailForm.fMoney += Number(this.detailData[li].fAmount)
+            }
           }
-        }
-        let formData = new window.FormData();
-        formData.append('tWarehousebills', JSON.stringify(this.detailForm))
-        formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
-        formData.append('fBilltype', 'CK')
-        addSave(formData).then(res=>{
-          if(res.code == 200){
-            this.detailForm = res.data.warehouseBills
-            this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
-            this.detailData = res.data.tWarehousebillsCntrs
-            for(let li in this.detailData){
-              this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
-              this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
+          let formData = new window.FormData();
+          formData.append('tWarehousebills', JSON.stringify(this.detailForm))
+          formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
+          formData.append('fBilltype', 'CK')
+          addSave(formData).then(res => {
+            if (res.code == 200) {
+              this.detailForm = res.data.warehouseBills
+              this.$set(this.detailForm, 'fStorekeeper', JSON.parse(this.detailForm.fStorekeeper))
+              this.detailData = res.data.tWarehousebillsCntrs
+              for (let li in this.detailData) {
+                this.$set(this.detailData[li], 'fFeeunitid', JSON.stringify(this.detailData[li].fFeeunitid))
+                this.$set(this.detailData[li], 'fStltypeid', JSON.stringify(this.detailData[li].fStltypeid))
+              }
+              this.$message.success("保存成功")
+              this.getList();
             }
-            this.$message.success("保存成功")
-            this.getList();
-            if(i == 2){
+          })
+        }
+            if (i == 2) {
               let data = {
-                fBilltype:'CK',
-                fId:this.detailForm.fId
+                fBilltype: 'CK',
+                fId: this.detailForm.fId
               }
-              copyNew(data).then(res=>{
-                if(res.code == 200) {
+              copyNew(data).then(res => {
+                if (res.code == 200) {
                   this.$message.success("操作成功")
                   this.copyeId = res.data
                   this.getList()
-                  this.viewMethod(null,1)
+                  this.viewMethod(null, 1)
                 }
               })
             }
-            if(i == 1){
+            if (i == 1) {
               this.MainTable = false
               this.inDex = 4
             }
           }
-        })
-      }
     },
     //所以按钮
     buttonList(row){
@@ -1409,6 +1411,7 @@ export default {
           for(let li in this.detailButton){
             this.detailButton[li].disabled = false
           }
+          this.MainTable = true
           break
         case '录入明细':
           this.$refs.detailForm.rules()

+ 2 - 2
vue.config.js

@@ -34,9 +34,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.1.143:9020`,
+        // target: `http://192.168.1.143:9020`,
         // target: `http://localhost:8080`,
-        // target: `https://ap.tubaosoft.com/prod-api/`,
+        target: `https://ap.tubaosoft.com/prod-api/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''