simple 4 年之前
父节点
当前提交
d25826434f

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ dist/
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
+dist.zip
 
 # Editor directories and files
 .idea

二进制
dist.zip


+ 632 - 683
src/page/purchase/components/balance/balanceAdd.vue

@@ -7,117 +7,83 @@
         <div slot="extra">
           <Button v-if="form.spzt != '1'" @click="toSpjl">查看审批记录</Button>
           <Button @click="addJs" v-if="form.spzt == '1' || form.spzt == '4'">保存</Button>
-          <Button
-            @click="submitJs"
-            :disabled="submitLoading"
-            v-if="balanceType == 'edit' && (form.spzt == '1' || form.spzt == '4')"
-          >提交</Button>
+          <Button @click="submitJs" :disabled="submitLoading"
+            v-if="balanceType == 'edit' && (form.spzt == '1' || form.spzt == '4')">提交</Button>
           <Button @click="cancel">返回</Button>
         </div>
         <Row class="mainCont">
           <Col span="4" class-name="tables">结算申请编号</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.jssqbh == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.jssqbh }}</span>
+          <span style="color: gray" v-if="form.jssqbh == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.jssqbh }}</span>
           </Col>
           <Col span="4" class-name="tables">标题</Col>
           <Col span="12" class-name="tables">
-            <span style="color: gray" v-if="form.bt == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.bt }}</span>
+          <span style="color: gray" v-if="form.bt == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.bt }}</span>
           </Col>
           <Col span="4" class-name="tables">
-            关联区域
-            <span class="mustSpan">*</span>
+          关联区域
+          <span class="mustSpan">*</span>
           </Col>
           <Col span="4" class-name="tables">
-            <Select
-              clearable
-              v-model="form.glqy"
-              :disabled="balanceType == 'edit'"
-              @on-change="glqyChange"
-              style="width: 95%"
-            >
-              <Option
-                v-for="item in glqyList"
-                :value="item.areaId"
-                :key="item.areaId"
-              >{{ item.areaName }}</Option>
-            </Select>
+          <Select clearable v-model="form.glqy" :disabled="balanceType == 'edit'" @on-change="glqyChange"
+            style="width: 95%">
+            <Option v-for="item in glqyList" :value="item.areaId" :key="item.areaId">{{ item.areaName }}</Option>
+          </Select>
           </Col>
           <Col span="4" class-name="tables">
-            关联项目
-            <span class="mustSpan">*</span>
+          关联项目
+          <span class="mustSpan">*</span>
           </Col>
           <Col span="4" class-name="tables">
-            <Select
-              clearable
-              v-model="form.glxm"
-              :disabled="balanceType == 'edit'"
-              style="width: 95%"
-            >
-              <Option
-                v-for="item in glxmList"
-                :value="item.projectId"
-                :key="item.projectId"
-              >{{ item.projectName }}</Option>
-            </Select>
+          <Select clearable v-model="form.glxm" :disabled="balanceType == 'edit'" style="width: 95%">
+            <Option v-for="item in glxmList" :value="item.projectId" :key="item.projectId">{{ item.projectName }}
+            </Option>
+          </Select>
           </Col>
-          <Col span="4" class-name="tables"></Col>
-          <Col span="4" class-name="tables"></Col>
           <Col span="4" class-name="tables">
-            供应商
-            <span class="mustSpan">*</span>
+          </Col>
+          <Col span="4" class-name="tables">
+          </Col>
+          <Col span="4" class-name="tables">
+          供应商
+          <span class="mustSpan">*</span>
           </Col>
           <Col span="12" class-name="tables">
-            <Select
-              :disabled="form.spzt != '1'"
-              clearable
-              v-model="form.gys"
-              placeholder="请选择供应商(如供应商银行信息不完整,则无法选择)"
-              filterable
-              style="width: 98%"
-              @on-change="gysChange"
-            >
-              <Option v-for="item in gysList" :value="item.gpId" :key="item.gpId">{{ item.gpName }}</Option>
-            </Select>
+          <Select :disabled="form.spzt != '1'" clearable v-model="form.gys" placeholder="请选择供应商(如供应商银行信息不完整,则无法选择)"
+            filterable style="width: 98%" @on-change="gysChange">
+            <Option v-for="item in gysList" :value="item.gpId" :key="item.gpId">{{ item.gpName }}</Option>
+          </Select>
           </Col>
           <Col span="4" class-name="tables">供方负责人</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.gffzr == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.gffzr }}</span>
+          <span style="color: gray" v-if="form.gffzr == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.gffzr }}</span>
           </Col>
           <Col span="4" class-name="tables">供应商联系电话</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.gyslxdh == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.gyslxdh }}</span>
+          <span style="color: gray" v-if="form.gyslxdh == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.gyslxdh }}</span>
           </Col>
           <Col span="4" class-name="tables">
-            账号
-            <span class="mustSpan">*</span>
+          账号
+          <span class="mustSpan">*</span>
           </Col>
           <Col span="4" class-name="tables">
-            <Select
-              :disabled="form.spzt != '1' && form.spzt != '4'"
-              v-model="form.gyszh"
-              placeholder="请选择供应商账号"
-              filterable
-              style="width: 95%"
-              @on-change="zhChange"
-            >
-              <Option
-                v-for="item in zhList"
-                :value="item.extensionId"
-                :key="item.extensionId"
-              >{{ item.unionpay }}</Option>
-            </Select>
+          <Select :disabled="form.spzt != '1' && form.spzt != '4'" v-model="form.gyszh" placeholder="请选择供应商账号"
+            filterable style="width: 95%" @on-change="zhChange">
+            <Option v-for="item in zhList" :value="item.extensionId" :key="item.extensionId">{{ item.unionpay }}
+            </Option>
+          </Select>
           </Col>
           <Col span="4" class-name="tables">
-            开户行
-            <span class="mustSpan">*</span>
+          开户行
+          <span class="mustSpan">*</span>
           </Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.khh == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.khh }}</span>
+          <span style="color: gray" v-if="form.khh == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.khh }}</span>
           </Col>
           <!-- <Col span="4" class-name="tables">
             单据类型
@@ -134,17 +100,13 @@
           </Col>-->
           <Col span="4" class-name="tables">下单时间</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.xdsj == ''">系统自动生成,不可编辑</span>
-            <span v-else>{{ form.xdsj }}</span>
+          <span style="color: gray" v-if="form.xdsj == ''">系统自动生成,不可编辑</span>
+          <span v-else>{{ form.xdsj }}</span>
           </Col>
           <Col span="4" class-name="tables">收货人</Col>
           <Col span="4" class-name="tables">
-            <Input
-              v-model="form.shr"
-              :disabled="form.spzt != '1' && form.spzt != '4'"
-              placeholder="请输入"
-              style="width: 95%"
-            />
+          <Input v-model="form.shr" :disabled="form.spzt != '1' && form.spzt != '4'" placeholder="请输入"
+            style="width: 95%" />
           </Col>
           <Col span="4" class-name="tables">入库时间(首次)</Col>
           <Col span="4" class-name="tables">{{ form.rksj }}</Col>
@@ -152,81 +114,56 @@
           <Col span="4" class-name="tables">{{ form.total }}</Col>
           <Col span="4" class-name="tables">调整金额(元)</Col>
           <Col span="4" class-name="tables">
-            <InputNumber
-              :min="1"
-              :disabled="form.spzt != '1' && form.spzt != '4'"
-              v-model="form.tzje"
-              placeholder="请输入"
-              style="width: 95%"
-            />
+          <InputNumber :min="1" :disabled="form.spzt != '1' && form.spzt != '4'" v-model="form.tzje" placeholder="请输入"
+            style="width: 95%" />
           </Col>
           <Col span="4" class-name="tables">实际支付金额(元)</Col>
-          <Col
-            span="4"
-            class-name="tables"
-          >{{ (Number(form.total) + Number(form.tzje)).toFixed(2) }}</Col>
+          <Col span="4" class-name="tables">{{ (Number(form.total) + Number(form.tzje)).toFixed(2) }}</Col>
           <Col span="4" class-name="tables">申请人</Col>
           <Col span="4" class-name="tables">{{ form.sqr }}</Col>
           <Col span="4" class-name="tables">审批状态</Col>
           <Col span="4" class-name="tables">
-            <div>
-              <span v-if="form.spzt == '1'">未提交</span>
-              <span v-if="form.spzt == '2'">审核中</span>
-              <span v-if="form.spzt == '3'">审核通过</span>
-              <span v-if="form.spzt == '4'">审核拒绝</span>
-              <span v-if="form.spzt == '5'">已付款</span>
-            </div>
+          <div>
+            <span v-if="form.spzt == '1'">未提交</span>
+            <span v-if="form.spzt == '2'">审核中</span>
+            <span v-if="form.spzt == '3'">审核通过</span>
+            <span v-if="form.spzt == '4'">审核拒绝</span>
+            <span v-if="form.spzt == '5'">已付款</span>
+          </div>
+          </Col>
+          <Col span="4" class-name="tables">
+          </Col>
+          <Col span="4" class-name="tables">
           </Col>
-          <Col span="4" class-name="tables"></Col>
-          <Col span="4" class-name="tables"></Col>
         </Row>
         <Row class="uplCont" type="flex" justify="center" style="align-items: stretch">
           <Col span="4" class-name="upl">附件</Col>
           <Col span="10" class-name="uplf">
-            <Upload
-              :disabled="form.spzt != '1' && form.spzt != '4'"
-              :headers="uploadHeaders"
-              style="width: 80%"
-              multiple
-              type="drag"
-              action="/purchase/common/uploadFile"
-              :before-upload="beforeUpload"
-              :on-success="uploadFilesSuccess"
-              :show-upload-list="false"
-              :on-progress="upFilesLoading"
-            >
-              <!-- :default-file-list="xzwgForm.filesList" -->
-              <div style="padding: 5px 0">
-                <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
-                <span>点击或将文件拖拽到这里上传</span>
-              </div>
-            </Upload>
+          <Upload :disabled="form.spzt != '1' && form.spzt != '4'" :headers="uploadHeaders" style="width: 80%" multiple
+            type="drag" action="/purchase/common/uploadFile" :before-upload="beforeUpload"
+            :on-success="uploadFilesSuccess" :show-upload-list="false" :on-progress="upFilesLoading">
+            <!-- :default-file-list="xzwgForm.filesList" -->
+            <div style="padding: 5px 0">
+              <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
+              <span>点击或将文件拖拽到这里上传</span>
+            </div>
+          </Upload>
           </Col>
           <Col span="10" class="upl" style="padding: 5px">
-            <div v-for="(item, index) in form.filesList" :key="index">
-              <a
-                :href="item.docUrl ? item.docUrl : 'javascript:void(0);'"
-                :download="item.fileName"
-                :target="item.docUrl ? '_blank' : '_self'"
-              >{{ item.fileName }}</a>
-              <span
-                v-if="form.spzt == '1' || form.spzt == '4'"
-                style="float: right; cursor:pointer"
-                @click="form.filesList.splice(index, 1)"
-              >x</span>
-            </div>
-            <p v-if="uploading" style="text-align: center">上传中...</p>
+          <div v-for="(item, index) in form.filesList" :key="index">
+            <a :href="item.docUrl ? item.docUrl : 'javascript:void(0);'" :download="item.fileName"
+              :target="item.docUrl ? '_blank' : '_self'">{{ item.fileName }}</a>
+            <span v-if="form.spzt == '1' || form.spzt == '4'" style="float: right; cursor:pointer"
+              @click="form.filesList.splice(index, 1)">x</span>
+          </div>
+          <p v-if="uploading" style="text-align: center">上传中...</p>
           </Col>
         </Row>
         <Row class="mainCont">
           <Col span="4" class-name="tables">说明</Col>
           <Col span="20" class-name="tables">
-            <Input
-              v-model="form.sm"
-              :disabled="form.spzt != '1' && form.spzt != '4'"
-              placeholder="请输入"
-              style="width: 99%"
-            />
+          <Input v-model="form.sm" :disabled="form.spzt != '1' && form.spzt != '4'" placeholder="请输入"
+            style="width: 99%" />
           </Col>
         </Row>
         <Spin size="large" fix v-if="spinShow"></Spin>
@@ -234,11 +171,8 @@
       <Card style="width:100%" :bordered="false" :dis-hover="true">
         <p slot="title">结算明细</p>
         <div slot="extra">
-          <Button
-            type="primary"
-            :disabled="balanceType == 'add' || (form.spzt != '1' && form.spzt != '4')"
-            @click="addMxShow"
-          >新增明细</Button>
+          <Button type="primary" :disabled="balanceType == 'add' || (form.spzt != '1' && form.spzt != '4')"
+            @click="addMxShow">新增明细</Button>
         </div>
         <Table :columns="tableColumn" style="width: 100%" :data="tableData" :loading="tableLoading">
           <template slot-scope="{ row, index }" slot="cz">
@@ -250,586 +184,601 @@
       </Card>
     </div>
     <!-- 采购明细新增 -->
-    <balanceMxAdd
-      ref="mxAdd"
-      :ssxmList="glxmList"
-      @addMx="addMx"
-      @return="contentShow = true"
-      v-show="!contentShow"
-    />
+    <balanceMxAdd ref="mxAdd" :ssxmList="glxmList" @addMx="addMx" @return="contentShow = true" v-show="!contentShow" />
   </div>
 </template>
 
 <script>
-import {
-  addPurchaseSettlement,
-  queryPurchaseSettlementInfo,
-  editPurchaseSettlement,
-  selectGoodProviderSelectionList,
-  getProjectList,
-  submitPurchaseSettlement,
-  goodProviderBankCardPageList,
-} from "@/service/getData";
-import balanceMxAdd from "./balanceMxAdd";
-export default {
-  name: "balanceAdd",
-  props: ["glqyList", "djlxList"],
-  components: {
-    balanceMxAdd,
-  },
-  data() {
-    return {
-      submitLoading: false,
-      balanceType: "add",
-      requestId: "",
-      settlementId: "",
-      spinShow: true,
-      contentShow: true,
-      gysGo: true,
-      uploadHeaders: {
-        token: localStorage.token,
-        userId: localStorage.user_id,
-      },
-      form: {
-        jssqbh: "", //结算申请编号
-        bt: "", //标题
-        glqy: "", //关联区域
-        glxm: "", //关联项目
-        gys: "", //供应商
-        gffzr: "", //供方负责人
-        gyszh: "", //供应商账号 工具值
-        gyslxdh: "", //供应商联系电话
-        khh: "", //开户行
-        zh: "", //账号
-        djlx: "", //单据类型
-        shr: "", //收货人
-        tzje: 0, //调整金额
-        rksj: "", //入库时间
-        xdsj: "", //下单时间
-        sqr: localStorage.user_name, //申请人
-        spzt: 1, //审批状态
-        sm: "", //说明
-        total: 0, //总价
-        filesList: [],
-      },
-      // glqyList: [{ value: 1, label: "test" }],
-      glxmList: [],
-      gysList: [],
-      zhList: [],
-      gyslxdhList: [{ value: 1, label: "test" }],
-      // djlxList: [{ value: 1, label: "test" }],
-      sqrList: [{ value: 1, label: "test" }],
-      uploading: false,
-      // 批量设置
-      plszShow: false,
-      plrkck: "",
-      pldhsj: "",
-      // table
-      tableColumn: [
-        {
-          title: "操作",
-          slot: "cz",
-          tooltip: true,
-          width: 60,
-        },
-        {
-          title: "入库单",
-          key: "warehouseEntry",
-          width: 200,
-          tooltip: true,
-        },
-        {
-          title: "总价(元)",
-          key: "totalPrice",
-          tooltip: true,
-        },
-        {
-          title: "采购人",
-          key: "purchaserName",
-          tooltip: true,
-        },
-        {
-          title: "采购人联系方式",
-          key: "purchaserTel",
-          tooltip: true,
-        },
-        {
-          title: "下单时间",
-          key: "orderTime",
-          tooltip: true,
-        },
-        {
-          title: "入库时间",
-          key: "storehouseTime",
-          tooltip: true,
-        },
-        {
-          title: "入库仓库",
-          key: "storehouseName",
-          tooltip: true,
+  import {
+    addPurchaseSettlement,
+    queryPurchaseSettlementInfo,
+    editPurchaseSettlement,
+    selectGoodProviderSelectionList,
+    getProjectList,
+    submitPurchaseSettlement,
+    goodProviderBankCardPageList,
+  } from "@/service/getData";
+  import balanceMxAdd from "./balanceMxAdd";
+  export default {
+    name: "balanceAdd",
+    props: ["glqyList", "djlxList"],
+    components: {
+      balanceMxAdd,
+    },
+    data() {
+      return {
+        submitLoading: false,
+        balanceType: "add",
+        requestId: "",
+        settlementId: "",
+        spinShow: true,
+        contentShow: true,
+        gysGo: true,
+        uploadHeaders: {
+          token: localStorage.token,
+          userId: localStorage.user_id,
         },
-        {
-          title: "仓管员",
-          key: "warehouseKeeper",
-          tooltip: true,
+        form: {
+          jssqbh: "", //结算申请编号
+          bt: "", //标题
+          glqy: "", //关联区域
+          glxm: "", //关联项目
+          gys: "", //供应商
+          gffzr: "", //供方负责人
+          gyszh: "", //供应商账号 工具值
+          gyslxdh: "", //供应商联系电话
+          khh: "", //开户行
+          zh: "", //账号
+          djlx: "", //单据类型
+          shr: "", //收货人
+          tzje: 0, //调整金额
+          rksj: "", //入库时间
+          xdsj: "", //下单时间
+          sqr: localStorage.user_name, //申请人
+          spzt: 1, //审批状态
+          sm: "", //说明
+          total: 0, //总价
+          filesList: [],
         },
-      ],
-      tableData: [],
-      tableSelect: [],
-      tableLoading: false,
-    };
-  },
-  created() {
-    this.getTableData();
-    selectGoodProviderSelectionList({ isCheck: true }).then((res) => {
-      this.gysList = res.data;
-    });
-  },
-  methods: {
-    //批量设置弹窗
-    plszOpen() {
-      this.plszShow = true;
-    },
-    plszOk() {},
-    plszCancel() {},
-    //表单上传
-    beforeUpload() {},
-    upFilesLoading() {
-      this.uploading = true;
-    },
-    uploadFilesSuccess(response, file, fileList) {
-      this.uploading = false;
-      this.form.filesList.push({
-        fileName: response.data.fileName,
-        // fullName: response.fileInfo.fName,
-        filePath: response.data.filePath,
-        // fileDetailType: ""
-      });
-    },
-    //关联区域切换
-    glqyChange(val) {
-      let postData = {
-        areaId: this.form.glqy,
-        userId: localStorage.user_id,
+        // glqyList: [{ value: 1, label: "test" }],
+        glxmList: [],
+        gysList: [],
+        zhList: [],
+        gyslxdhList: [{
+          value: 1,
+          label: "test"
+        }],
+        // djlxList: [{ value: 1, label: "test" }],
+        sqrList: [{
+          value: 1,
+          label: "test"
+        }],
+        uploading: false,
+        // 批量设置
+        plszShow: false,
+        plrkck: "",
+        pldhsj: "",
+        // table
+        tableColumn: [{
+            title: "操作",
+            slot: "cz",
+            tooltip: true,
+            width: 60,
+          },
+          {
+            title: "入库单",
+            key: "warehouseEntry",
+            width: 200,
+            tooltip: true,
+          },
+          {
+            title: "总价(元)",
+            key: "totalPrice",
+            tooltip: true,
+          },
+          {
+            title: "采购人",
+            key: "purchaserName",
+            tooltip: true,
+          },
+          {
+            title: "采购人联系方式",
+            key: "purchaserTel",
+            tooltip: true,
+          },
+          {
+            title: "下单时间",
+            key: "orderTime",
+            tooltip: true,
+          },
+          {
+            title: "入库时间",
+            key: "storehouseTime",
+            tooltip: true,
+          },
+          {
+            title: "入库仓库",
+            key: "storehouseName",
+            tooltip: true,
+          },
+          {
+            title: "仓管员",
+            key: "warehouseKeeper",
+            tooltip: true,
+          },
+        ],
+        tableData: [],
+        tableSelect: [],
+        tableLoading: false,
       };
-      getProjectList(postData).then((res) => {
-        this.form.glxm = "";
-        this.glxmList = res.items;
-      });
     },
-    //供应商切换
-    gysChange(val) {
-      this.gysGo = true;
-      if (!val) {
-        return false;
-      }
-      let pageStr = `10000/1?gpId=${val}`;
-      let postData = {
-        gpId: val,
-      };
-      goodProviderBankCardPageList(postData, pageStr).then((res) => {
-        if (res.status == 200) {
-          let arr = res.data.records;
-          arr = arr.sort(
-            (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
-          );
-          this.zhList = arr;
-          if (arr.filter((a) => a.gpbcDefault == "1").length > 0) {
-            this.form.gyszh = arr.filter(
-              (a) => a.gpbcDefault == "1"
-            )[0].extensionId;
-            this.form.zh = arr.filter((a) => a.gpbcDefault == "1")[0].unionpay;
-            this.form.khh = arr.filter((a) => a.gpbcDefault == "1")[0].bank;
-          } else {
-            this.form.gyszh = arr[0].extensionId;
-            this.zhChange(arr[0].extensionId);
-          }
-        }
+    created() {
+      this.getTableData();
+      selectGoodProviderSelectionList({
+        isCheck: true
+      }).then((res) => {
+        this.gysList = res.data;
       });
-      let gys = this.gysList.filter((a) => a.gpId == val);
-      if (gys.length > 0) {
-        let sup = gys[0];
-        if (!sup.gpcName || !sup.gpcPhone) {
-          this.$Message.error(
-            "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
-          );
-          this.gysGo = false;
-          this.form.gffzr = "";
-          this.form.gyslxdh = "";
-          this.form.khh = "";
-          this.form.zh = "";
+    },
+    methods: {
+      //批量设置弹窗
+      plszOpen() {
+        this.plszShow = true;
+      },
+      plszOk() {},
+      plszCancel() {},
+      //表单上传
+      beforeUpload() {},
+      upFilesLoading() {
+        this.uploading = true;
+      },
+      uploadFilesSuccess(response, file, fileList) {
+        this.uploading = false;
+        this.form.filesList.push({
+          fileName: response.data.fileName,
+          // fullName: response.fileInfo.fName,
+          filePath: response.data.filePath,
+          // fileDetailType: ""
+        });
+      },
+      //关联区域切换
+      glqyChange(val) {
+        let postData = {
+          areaId: this.form.glqy,
+          userId: localStorage.user_id,
+        };
+        getProjectList(postData).then((res) => {
+          this.form.glxm = "";
+          this.glxmList = res.items;
+        });
+      },
+      //供应商切换
+      gysChange(val) {
+        this.gysGo = true;
+        if (!val) {
           return false;
         }
-        this.form.gffzr = sup.gpcName;
-        this.form.gyslxdh = sup.gpcPhone;
-        // bank开户行   unionpay银行账号
-      }
-    },
-    //供应商账号切换
-    zhChange(val) {
-      if (val != "" && val) {
-        this.form.khh = this.zhList.filter((a) => a.extensionId == val)[0].bank;
-        this.form.zh = this.zhList.filter(
-          (a) => a.extensionId == val
-        )[0].unionpay;
-      }
-    },
-    //查询结算详情
-    getJs(settlementId) {
-      this.spinShow = true;
-      queryPurchaseSettlementInfo(settlementId).then((res) => {
-        this.spinShow = false;
-        if (res.status == 200) {
-          let data = res.data;
-          this.form.bt = data.title;
-          this.form.glqy = Number(data.areaId);
-          this.form.glxm = data.projectId;
-          this.form.gys = data.supplierId;
-          this.form.gffzr = data.supplierPrincipal;
-          this.form.gyslxdh = Number(data.supplierTel);
-          this.form.khh = data.depositBank;
-          this.form.zh = data.accountNumber;
-          this.form.gyszh = data.extensionId;
-          // this.form.djlx = data.type;
-          this.form.shr = data.receivedName;
-          this.form.spzt = data.approvalState;
-          this.form.sqr = data.applicantName;
-          this.form.xdsj = data.orderTime;
-          this.form.tzje = data.adjustmentPrice;
-          this.form.jssqbh = data.settlementCode;
-          this.form.sm = data.instruction;
-          this.form.rksj = data.warehouseTime;
-          this.balanceType = "edit";
-          this.form.filesList = data.attachmentList;
-          for (let i in data.detailList) {
-            data.detailList[i].totalPrice = data.detailList[
-              i
-            ].totalPrice.toFixed(2);
-          }
-          this.tableData = data.detailList;
-          this.requestId = data.requestId;
-
-          let pStr = `10000/1?gpId=${data.supplierId}`;
-          let pData = {
-            gpId: data.supplierId,
-          };
-          goodProviderBankCardPageList(pData, pStr).then((res) => {
-            if (res.status == 200) {
-              let arr = res.data.records;
-              arr = arr.sort(
-                (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
-              );
-              this.zhList = arr;
+        let pageStr = `10000/1?gpId=${val}`;
+        let postData = {
+          gpId: val,
+        };
+        goodProviderBankCardPageList(postData, pageStr).then((res) => {
+          if (res.status == 200) {
+            let arr = res.data.records;
+            arr = arr.sort(
+              (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
+            );
+            this.zhList = arr;
+            if (arr.filter((a) => a.gpbcDefault == "1").length > 0) {
+              this.form.gyszh = arr.filter(
+                (a) => a.gpbcDefault == "1"
+              )[0].extensionId;
+              this.form.zh = arr.filter((a) => a.gpbcDefault == "1")[0].unionpay;
+              this.form.khh = arr.filter((a) => a.gpbcDefault == "1")[0].bank;
+            } else {
+              this.form.gyszh = arr[0].extensionId;
+              this.zhChange(arr[0].extensionId);
             }
-          });
-
-          let postData = {
-            areaId: this.form.glqy,
-            userId: localStorage.user_id,
-          };
-          getProjectList(postData).then((res) => {
-            this.glxmList = res.items;
-          });
-          let gys = this.gysList.filter((a) => a.gpId == data.supplierId);
-          if (gys.length) {
-            this.form.gffzr = gys[0].gpcName;
-            this.form.gyslxdh = gys[0].gpcPhone;
           }
-        } else {
-          this.$Message.error(res.message);
+        });
+        let gys = this.gysList.filter((a) => a.gpId == val);
+        if (gys.length > 0) {
+          let sup = gys[0];
+          if (!sup.gpcName || !sup.gpcPhone) {
+            this.$Message.error(
+              "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
+            );
+            this.gysGo = false;
+            this.form.gffzr = "";
+            this.form.gyslxdh = "";
+            this.form.khh = "";
+            this.form.zh = "";
+            return false;
+          }
+          this.form.gffzr = sup.gpcName;
+          this.form.gyslxdh = sup.gpcPhone;
+          // bank开户行   unionpay银行账号
         }
-      });
-    },
-    //编辑结算详情
-    editJs() {
-      let arr = [];
-      for (let i in this.tableData) {
-        this.tableData[i].totalPrice = Number(
-          this.tableData[i].totalPrice
-        ).toFixed(2);
-      }
-      let postData = {
-        settlementId: this.settlementId,
-        projectId: this.form.glxm,
-        projectName: this.glxmList.filter(
-          (a) => a.projectId == this.form.glxm
-        )[0].projectName,
-        areaId: this.form.glqy,
-        areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
-          .areaName,
-        supplierId: this.form.gys,
-        supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
-          .gpNumber,
-        supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
-          .gpName,
-        supplierPrincipal: this.form.gffzr,
-        supplierTel: this.form.gyslxdh,
-        depositBank: this.form.khh,
-        accountNumber: this.form.zh,
-        extensionId: this.form.gyszh,
-        // type: this.form.djlx,
-        receivedName: this.form.shr,
-        warehouseTime: this.tableData.length
-          ? this.tableData[0].storehouseTime
-          : "",
-        adjustmentPrice: this.form.tzje.toFixed(2),
-        instruction: this.form.sm,
-        attachmentList: this.form.filesList,
-        applicantId: localStorage.user_id,
-        applicantName: localStorage.user_name,
-        attachmentList: this.form.filesList,
-        detailList: this.tableData,
-      };
-      // console.log(postData);
-      return new Promise((resolve, reject) => {
-        editPurchaseSettlement(postData).then((res) => {
+      },
+      //供应商账号切换
+      zhChange(val) {
+        if (val != "" && val) {
+          this.form.khh = this.zhList.filter((a) => a.extensionId == val)[0].bank;
+          this.form.zh = this.zhList.filter(
+            (a) => a.extensionId == val
+          )[0].unionpay;
+        }
+      },
+      //查询结算详情
+      getJs(settlementId) {
+        this.spinShow = true;
+        queryPurchaseSettlementInfo(settlementId).then((res) => {
+          this.spinShow = false;
           if (res.status == 200) {
-            this.$Message.success("编辑结算详情成功!");
-            this.getJs(this.settlementId);
-            resolve();
+            let data = res.data;
+            this.form.bt = data.title;
+            this.form.glqy = Number(data.areaId);
+            this.form.glxm = data.projectId;
+            this.form.gys = data.supplierId;
+            this.form.gffzr = data.supplierPrincipal;
+            this.form.gyslxdh = Number(data.supplierTel);
+            this.form.khh = data.depositBank;
+            this.form.zh = data.accountNumber;
+            this.form.gyszh = data.extensionId;
+            // this.form.djlx = data.type;
+            this.form.shr = data.receivedName;
+            this.form.spzt = data.approvalState;
+            this.form.sqr = data.applicantName;
+            this.form.xdsj = data.orderTime;
+            this.form.tzje = data.adjustmentPrice;
+            this.form.jssqbh = data.settlementCode;
+            this.form.sm = data.instruction;
+            this.form.rksj = data.warehouseTime;
+            this.balanceType = "edit";
+            this.form.filesList = data.attachmentList;
+            for (let i in data.detailList) {
+              data.detailList[i].totalPrice = data.detailList[
+                i
+              ].totalPrice.toFixed(2);
+            }
+            this.tableData = data.detailList;
+            this.requestId = data.requestId;
+
+            let pStr = `10000/1?gpId=${data.supplierId}`;
+            let pData = {
+              gpId: data.supplierId,
+            };
+            goodProviderBankCardPageList(pData, pStr).then((res) => {
+              if (res.status == 200) {
+                let arr = res.data.records;
+                arr = arr.sort(
+                  (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
+                );
+                this.zhList = arr;
+              }
+            });
+
+            let postData = {
+              areaId: this.form.glqy,
+              userId: localStorage.user_id,
+            };
+            getProjectList(postData).then((res) => {
+              this.glxmList = res.items;
+            });
+            let gys = this.gysList.filter((a) => a.gpId == data.supplierId);
+            if (gys.length) {
+              this.form.gffzr = gys[0].gpcName;
+              this.form.gyslxdh = gys[0].gpcPhone;
+            }
           } else {
             this.$Message.error(res.message);
-            reject();
           }
         });
-      });
-    },
-    submitJs() {
-      if (this.submitLoading) {
-        return false;
-      }
-      this.submitLoading = true;
-      this.editJs()
-        .then(() => {
-          let postData = {
-            settlementId: this.settlementId,
-          };
-          submitPurchaseSettlement(postData).then((res) => {
-            this.submitLoading = false;
+      },
+      //编辑结算详情
+      editJs() {
+        let arr = [];
+        for (let i in this.tableData) {
+          this.tableData[i].totalPrice = Number(
+            this.tableData[i].totalPrice
+          ).toFixed(2);
+        }
+        let postData = {
+          settlementId: this.settlementId,
+          projectId: this.form.glxm,
+          projectName: this.glxmList.filter(
+            (a) => a.projectId == this.form.glxm
+          )[0].projectName,
+          areaId: this.form.glqy,
+          areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
+            .areaName,
+          supplierId: this.form.gys,
+          supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
+            .gpNumber,
+          supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
+            .gpName,
+          supplierPrincipal: this.form.gffzr,
+          supplierTel: this.form.gyslxdh,
+          depositBank: this.form.khh,
+          accountNumber: this.form.zh,
+          extensionId: this.form.gyszh,
+          // type: this.form.djlx,
+          receivedName: this.form.shr,
+          warehouseTime: this.tableData.length ?
+            this.tableData[0].storehouseTime : "",
+          adjustmentPrice: this.form.tzje.toFixed(2),
+          instruction: this.form.sm,
+          attachmentList: this.form.filesList,
+          applicantId: localStorage.user_id,
+          applicantName: localStorage.user_name,
+          attachmentList: this.form.filesList,
+          detailList: this.tableData,
+        };
+        // console.log(postData);
+        return new Promise((resolve, reject) => {
+          editPurchaseSettlement(postData).then((res) => {
             if (res.status == 200) {
-              this.$Message.success("提交结算详情成功!");
+              this.$Message.success("编辑结算详情成功!");
               this.getJs(this.settlementId);
+              resolve();
             } else {
               this.$Message.error(res.message);
+              reject();
             }
           });
-        })
-        .catch(() => {
-          this.submitLoading = false;
         });
-    },
-    //审批记录跳转
-    toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
-      window.open(link);
-    },
-    //新增结算
-    addJs() {
-      let mArr = ["glqy", "glxm", "gys", "khh", "zh", "sqr"];
-      for (let item in mArr) {
-        let it = mArr[item];
-        if (!this.form[it]) {
-          this.$Message.error("请将信息填写完整!");
-          console.log(it);
+      },
+      submitJs() {
+        if (this.submitLoading) {
           return false;
         }
-        if (this.form[it] == "" || this.form[it].length == 0) {
-          this.$Message.error("请将信息填写完整!");
-          console.log(it);
+        this.submitLoading = true;
+        this.editJs()
+          .then(() => {
+            let postData = {
+              settlementId: this.settlementId,
+            };
+            submitPurchaseSettlement(postData).then((res) => {
+              this.submitLoading = false;
+              if (res.status == 200) {
+                this.$Message.success("提交结算详情成功!");
+                this.getJs(this.settlementId);
+              } else {
+                this.$Message.error(res.message);
+              }
+            });
+          })
+          .catch(() => {
+            this.submitLoading = false;
+          });
+      },
+      //审批记录跳转
+      toSpjl() {
+        let link =
+          `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+        window.open(link);
+      },
+      //新增结算
+      addJs() {
+        let mArr = ["glqy", "glxm", "gys", "khh", "zh", "sqr"];
+        for (let item in mArr) {
+          let it = mArr[item];
+          if (!this.form[it]) {
+            this.$Message.error("请将信息填写完整!");
+            console.log(it);
+            return false;
+          }
+          if (this.form[it] == "" || this.form[it].length == 0) {
+            this.$Message.error("请将信息填写完整!");
+            console.log(it);
+            return false;
+          }
+        }
+        if (!this.gysGo) {
+          this.$Message.error(
+            "供应商信息不完整,请完善供应商信息或选择其他供应商!"
+          );
           return false;
         }
-      }
-      if (!this.gysGo) {
-        this.$Message.error(
-          "供应商信息不完整,请完善供应商信息或选择其他供应商!"
-        );
-        return false;
-      }
-      if (this.balanceType == "edit") {
-        this.editJs();
-        return false;
-      }
-      let postData = {
-        areaId: this.form.glqy,
-        projectId: this.form.glxm,
-        areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
-          .areaName,
-        projectName: this.glxmList.filter(
-          (a) => a.projectId == this.form.glxm
-        )[0].projectName,
-        supplierId: this.form.gys,
-        supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
-          .gpNumber,
-        supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
-          .gpName,
-        supplierPrincipal: this.form.gffzr,
-        supplierTel: this.form.gyslxdh,
-        depositBank: this.form.khh,
-        accountNumber: this.form.zh,
-        extensionId: this.form.gyszh,
-        // type: this.form.djlx,
-        receivedName: this.form.shr,
-        // recivedTel: this,
-        adjustmentPrice: Number(this.form.tzje).toFixed(2),
-        instruction: this.form.sm,
-        attachmentList: this.form.filesList,
-        applicantId: localStorage.user_id,
-        applicantName: localStorage.user_name,
-      };
-      this.spinShow = true;
-      addPurchaseSettlement(postData).then((res) => {
+        if (this.balanceType == "edit") {
+          this.editJs();
+          return false;
+        }
+        let postData = {
+          areaId: this.form.glqy,
+          projectId: this.form.glxm,
+          areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
+            .areaName,
+          projectName: this.glxmList.filter(
+            (a) => a.projectId == this.form.glxm
+          )[0].projectName,
+          supplierId: this.form.gys,
+          supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
+            .gpNumber,
+          supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
+            .gpName,
+          supplierPrincipal: this.form.gffzr,
+          supplierTel: this.form.gyslxdh,
+          depositBank: this.form.khh,
+          accountNumber: this.form.zh,
+          extensionId: this.form.gyszh,
+          // type: this.form.djlx,
+          receivedName: this.form.shr,
+          // recivedTel: this,
+          adjustmentPrice: Number(this.form.tzje).toFixed(2),
+          instruction: this.form.sm,
+          attachmentList: this.form.filesList,
+          applicantId: localStorage.user_id,
+          applicantName: localStorage.user_name,
+        };
+        this.spinShow = true;
+        addPurchaseSettlement(postData).then((res) => {
+          this.spinShow = false;
+          if (res.status == 200) {
+            this.$Message.success("新增采购结算成功");
+            this.form.jssqbh = res.data.settlementCode;
+            this.form.xdsj = res.data.orderTime;
+            this.settlementId = res.data.settlementId;
+            this.form.filesList = res.data.attachmentList;
+            this.balanceType = "edit";
+          } else {
+            this.$Message.error(res.message);
+          }
+        });
+      },
+      // 新增明细弹窗
+      addMxShow() {
+        this.contentShow = false;
+        let arr = [];
+        for (let item in this.tableData) {
+          arr.push(this.tableData[item].orderId);
+        }
+        this.$refs.mxAdd.orderIds = arr;
+        this.$refs.mxAdd.gysId = this.form.gys;
+        this.$refs.mxAdd.addForm.ssxm = this.form.glxm;
+        this.$refs.mxAdd.getTableData();
+      },
+      //列表方法
+      getTableData() {
         this.spinShow = false;
-        if (res.status == 200) {
-          this.$Message.success("新增采购结算成功");
-          this.form.jssqbh = res.data.settlementCode;
-          this.form.xdsj = res.data.orderTime;
-          this.settlementId = res.data.settlementId;
-          this.form.filesList = res.data.attachmentList;
-          this.balanceType = "edit";
-        } else {
-          this.$Message.error(res.message);
+      },
+      tableOnSelect(selection, row) {},
+      //添加明细
+      addMx(list) {
+        for (let item in list) {
+          list[item].totalPrice = list[item].totalPrice.toFixed(2);
+          if (this.tableData.filter(a => a.warehouseEntryId == list[item].warehouseEntryId).length == 0) {
+            this.tableData.push(list[item])
+          }
         }
-      });
-    },
-    // 新增明细弹窗
-    addMxShow() {
-      this.contentShow = false;
-      let arr = [];
-      for (let item in this.tableData) {
-        arr.push(this.tableData[item].orderId);
-      }
-      this.$refs.mxAdd.orderIds = arr;
-      this.$refs.mxAdd.gysId = this.form.gys;
-      this.$refs.mxAdd.addForm.ssxm = this.form.glxm;
-      this.$refs.mxAdd.getTableData();
-    },
-    //列表方法
-    getTableData() {
-      this.spinShow = false;
-    },
-    tableOnSelect(selection, row) {},
-    //添加明细
-    addMx(list) {
-      for (let item in list) {
-        list[item].totalPrice = list[item].totalPrice.toFixed(2);
-      }
-      this.tableData = list;
-      // this.form.rksj = this.tableData[0].storehouseTime;
-      // if (this.form.shr == "" && this.tableData.length) {
-      //   this.form.shr = this.tableData[0].warehouseKeeper;
-      // }
-    },
-    //删除明细
-    deleteMx(row, index) {
-      this.tableData.splice(index, 1);
-    },
-    //取消、返回
-    cancel() {
-      this.spinShow = false;
-      this.submitLoading = false;
-      this.balanceType = "add";
-      this.gysGo = true;
-      this.form = {
-        jssqbh: "", //结算申请编号
-        bt: "", //标题
-        glqy: "", //关联区域
-        glxm: "", //关联项目
-        gys: "", //供应商
-        gffzr: "", //供方负责人
-        gyslxdh: "", //供应商联系电话
-        khh: "", //开户行
-        gyszh: "", //供应商账号 工具值
-        zh: "", //账号
-        djlx: "", //单据类型
-        rksj: "", //入库时间
-        shr: "", //收货人
-        tzje: 0, //调整金额
-        xdsj: "", //下单时间
-        sqr: localStorage.user_name, //申请人
-        spzt: 1, //审批状态
-        sm: "", //说明
-        total: 0, //总价
-        filesList: [],
-      };
-      this.tableData = [];
-      this.$emit("return");
+        // this.tableData = list;
+        // this.form.rksj = this.tableData[0].storehouseTime;
+        // if (this.form.shr == "" && this.tableData.length) {
+        //   this.form.shr = this.tableData[0].warehouseKeeper;
+        // }
+      },
+      //删除明细
+      deleteMx(row, index) {
+        this.tableData.splice(index, 1);
+      },
+      //取消、返回
+      cancel() {
+        this.spinShow = false;
+        this.submitLoading = false;
+        this.balanceType = "add";
+        this.gysGo = true;
+        this.form = {
+          jssqbh: "", //结算申请编号
+          bt: "", //标题
+          glqy: "", //关联区域
+          glxm: "", //关联项目
+          gys: "", //供应商
+          gffzr: "", //供方负责人
+          gyslxdh: "", //供应商联系电话
+          khh: "", //开户行
+          gyszh: "", //供应商账号 工具值
+          zh: "", //账号
+          djlx: "", //单据类型
+          rksj: "", //入库时间
+          shr: "", //收货人
+          tzje: 0, //调整金额
+          xdsj: "", //下单时间
+          sqr: localStorage.user_name, //申请人
+          spzt: 1, //审批状态
+          sm: "", //说明
+          total: 0, //总价
+          filesList: [],
+        };
+        this.tableData = [];
+        this.$emit("return");
+      },
     },
-  },
-  watch: {
-    tableData(val) {
-      let num = 0;
-      for (let item in val) {
-        num += Number(val[item].totalPrice);
-      }
-      if (val.length) {
-        console.log(val[0]);
-        this.form.rksj = val[0].storehouseTime;
-      } else {
-        this.form.rksj = "";
-      }
-      if (this.form.shr == "" && val.length) {
-        this.form.shr = val[0].warehouseKeeper;
-      }
-      this.form.total = Number(num).toFixed(2);
+    watch: {
+      tableData(val) {
+        let num = 0;
+        for (let item in val) {
+          num += Number(val[item].totalPrice);
+        }
+        if (val.length) {
+          console.log(val[0]);
+          this.form.rksj = val[0].storehouseTime;
+        } else {
+          this.form.rksj = "";
+        }
+        if (this.form.shr == "" && val.length) {
+          this.form.shr = val[0].warehouseKeeper;
+        }
+        this.form.total = Number(num).toFixed(2);
+      },
     },
-  },
-};
+  };
+
 </script>
 
 <style lang="scss" scoped>
-.mustSpan {
-  color: red;
-  margin-left: 2px;
-}
-button {
-  min-width: 80px;
-}
-.uplCont {
-  border-left: 1px solid #e4e4e4;
-  .upl {
-    flex: auto;
-    border-right: 1px solid #e4e4e4;
-    &:nth-child(1) {
-      background: #f8f9fb;
+  .mustSpan {
+    color: red;
+    margin-left: 2px;
+  }
+
+  button {
+    min-width: 80px;
+  }
+
+  .uplCont {
+    border-left: 1px solid #e4e4e4;
+
+    .upl {
+      flex: auto;
+      border-right: 1px solid #e4e4e4;
+
+      &:nth-child(1) {
+        background: #f8f9fb;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+    }
+
+    .uplf {
       display: flex;
       align-items: center;
       justify-content: center;
+      min-height: 80px;
     }
   }
-  .uplf {
+
+  .mainCont .tables {
+    height: 50px;
+    border-right: 1px solid #e4e4e4;
+    border-bottom: 1px solid #e4e4e4;
     display: flex;
     align-items: center;
     justify-content: center;
-    min-height: 80px;
+
+    &:nth-child(2n + 1) {
+      background: #f8f9fb;
+    }
   }
-}
-.mainCont .tables {
-  height: 50px;
-  border-right: 1px solid #e4e4e4;
-  border-bottom: 1px solid #e4e4e4;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  &:nth-child(2n + 1) {
-    background: #f8f9fb;
+
+  .mainCont {
+    border-left: 1px solid #e4e4e4;
+    border-top: 1px solid #e4e4e4;
+  }
+
+  ivu-card-head-inner,
+  .ivu-card-head p {
+    display: inline-block;
+    width: 100%;
+    height: 20px;
+    line-height: 20px;
+    font-size: 14px;
+    color: #17233d;
+    font-weight: 700;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    font-weight: normal;
   }
-}
-.mainCont {
-  border-left: 1px solid #e4e4e4;
-  border-top: 1px solid #e4e4e4;
-}
-ivu-card-head-inner,
-.ivu-card-head p {
-  display: inline-block;
-  width: 100%;
-  height: 20px;
-  line-height: 20px;
-  font-size: 14px;
-  color: #17233d;
-  font-weight: 700;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  font-weight: normal;
-}
-</style>
+
+</style>

文件差异内容过多而无法显示
+ 785 - 747
src/page/purchase/components/order/orderAdd.vue


+ 4 - 4
src/page/purchase/components/order/orderPrint.vue

@@ -49,7 +49,7 @@
               <th style="width: 100px">物料名称</th>
               <th style="width: 120px">规格型号</th>
               <th style="width: 60px">单位</th>
-              <th style="width: 70px">申购数量</th>
+              <!-- <th style="width: 70px">申购数量</th> -->
               <th style="width: 70px">采购数量</th>
               <th style="width: 50px">单价</th>
               <th style="width: 80px">金额</th>
@@ -63,7 +63,7 @@
               <td>{{ item.detailList[0].materialName }}</td>
               <td>{{ item.detailList[0].specs }}</td>
               <td>{{ item.detailList[0].unit }}</td>
-              <td>{{ item.detailList[0].amount }}</td>
+              <!-- <td>{{ item.detailList[0].amount }}</td> -->
               <td>{{ item.purchaseNum }}</td>
               <td>{{ item.price }}</td>
               <td>{{ item.totalPrice }}</td>
@@ -72,13 +72,13 @@
             <tr>
               <td colspan="2">总金额:</td>
               <td>大写:</td>
-              <td colspan="5">{{ chinesePrice }}</td>
+              <td colspan="4">{{ chinesePrice }}</td>
               <td>小写:</td>
               <td>¥{{ printData.totalPrice }} -</td>
             </tr>
             <tr>
               <td>说明:</td>
-              <td colspan="10" style="text-align: left">
+              <td colspan="9" style="text-align: left">
                 <p>
                   1、承包范围:
                   <span class="square" />不包运输/

+ 4 - 4
src/page/purchase/components/order/orderPrint2.vue

@@ -49,7 +49,7 @@
               <th style="width: 100px">物料名称</th>
               <th style="width: 120px">规格型号</th>
               <th style="width: 60px">单位</th>
-              <th style="width: 70px">申购数量</th>
+              <!-- <th style="width: 70px">申购数量</th> -->
               <th style="width: 70px">采购数量</th>
               <th style="width: 50px">单价</th>
               <th style="width: 80px">金额</th>
@@ -63,7 +63,7 @@
               <td>{{ item.detailList[0].materialName }}</td>
               <td>{{ item.detailList[0].specs }}</td>
               <td>{{ item.detailList[0].unit }}</td>
-              <td>{{ item.detailList[0].amount }}</td>
+              <!-- <td>{{ item.detailList[0].amount }}</td> -->
               <td>{{ item.purchaseNum }}</td>
               <td>{{ item.price }}</td>
               <td>{{ item.totalPrice }}</td>
@@ -72,13 +72,13 @@
             <tr>
               <td colspan="2">总金额:</td>
               <td>大写:</td>
-              <td colspan="5">{{ chinesePrice }}</td>
+              <td colspan="4">{{ chinesePrice }}</td>
               <td>小写:</td>
               <td>¥{{ printData.totalPrice }} -</td>
             </tr>
             <tr>
               <td>说明:</td>
-              <td colspan="10" style="text-align: left">
+              <td colspan="9" style="text-align: left">
                 <p>
                   1、承包范围:
                   <span class="square" />不包运输/

+ 113 - 47
src/page/purchase/components/plan/planAdd.vue

@@ -2,25 +2,32 @@
   <div>
     <!-- 页面主体内容 -->
     <div class="planAddContent">
-      <Card style="width:100%" :bordered="false" :dis-hover="true">
+      <Card style="width: 100%" :bordered="false" :dis-hover="true">
         <p slot="title">申购计划详情</p>
         <div slot="extra">
           <Button v-if="form.spzt != '0'" @click="toSpjl">查看审批记录</Button>
           <Button
             @click="addSgjh"
-            v-if="(form.spzt == '0' || form.spzt == '3') && (form.status = '1' || form.status == '2')"
-          >保存</Button>
+            v-if="
+              (form.spzt == '0' || form.spzt == '3') &&
+              (form.status = '1' || form.status == '2')
+            "
+            >保存</Button
+          >
           <Button
             @click="submitSgjh"
             :disabled="submitLoading"
             v-if="planType == 'edit' && (form.spzt == '0' || form.spzt == '3')"
-          >提交</Button>
+            >提交</Button
+          >
           <Button @click="cancel">返回</Button>
         </div>
         <Row class="mainCont">
           <Col span="4" class-name="tables">计划单据号</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.jhdjh == ''">系统自动生成,不可编辑</span>
+            <span style="color: gray" v-if="form.jhdjh == ''"
+              >系统自动生成,不可编辑</span
+            >
             <span v-else>{{ form.jhdjh }}</span>
           </Col>
           <Col span="4" class-name="tables">
@@ -39,7 +46,8 @@
                 v-for="item in ssqyList"
                 :value="item.areaId + ',' + item.areaName"
                 :key="item.areaId"
-              >{{ item.areaName }}</Option>
+                >{{ item.areaName }}</Option
+              >
             </Select>
           </Col>
           <Col span="4" class-name="tables">
@@ -47,17 +55,25 @@
             <span class="mustSpan">*</span>
           </Col>
           <Col span="4" class-name="tables">
-            <Select clearable v-model="form.ssxm" style="width: 95%" :disabled="planType == 'edit'">
+            <Select
+              clearable
+              v-model="form.ssxm"
+              style="width: 95%"
+              :disabled="planType == 'edit'"
+            >
               <Option
                 v-for="item in ssxmList"
                 :value="item.projectId + ',' + item.projectName"
                 :key="item.projectId"
-              >{{ item.projectName }}</Option>
+                >{{ item.projectName }}</Option
+              >
             </Select>
           </Col>
           <Col span="4" class-name="tables">标题</Col>
           <Col span="4" class-name="tables">
-            <span style="color: gray" v-if="form.bt == ''">系统自动生成,不可编辑</span>
+            <span style="color: gray" v-if="form.bt == ''"
+              >系统自动生成,不可编辑</span
+            >
             <span v-else>{{ form.bt }}</span>
           </Col>
           <Col span="4" class-name="tables">参考总价(元)</Col>
@@ -76,7 +92,8 @@
                 v-for="item in jhlxList"
                 :value="item.value"
                 :key="item.value"
-              >{{ item.label }}</Option>
+                >{{ item.label }}</Option
+              >
             </Select>
           </Col>
           <Col span="4" class-name="tables">
@@ -89,7 +106,7 @@
               style="width: 95%"
               format="yyyy年MM月"
               :value="form.date"
-              @on-change="form.date=$event"
+              @on-change="form.date = $event"
               :options="jhyfOption"
               type="month"
               placeholder="请选择"
@@ -110,7 +127,8 @@
                 v-for="item in cgyList"
                 :value="item.userId"
                 :key="item.userId"
-              >{{ item.userName }}</Option>
+                >{{ item.userName }}</Option
+              >
             </Select>
           </Col>
           <Col span="4" class-name="tables">申请人</Col>
@@ -130,7 +148,12 @@
           <Col span="4" class-name="tables"></Col>
           <Col span="4" class-name="tables"></Col>
         </Row>
-        <Row class="uplCont" type="flex" justify="center" style="align-items: stretch">
+        <Row
+          class="uplCont"
+          type="flex"
+          justify="center"
+          style="align-items: stretch"
+        >
           <Col span="4" class-name="upl">附件</Col>
           <Col span="10" class-name="uplf">
             <Upload
@@ -142,12 +165,16 @@
               :before-upload="beforeUpload"
               :on-success="uploadFilesSuccess"
               :show-upload-list="false"
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               :on-progress="upFilesLoading"
             >
               <!-- :default-file-list="xzwgForm.filesList" -->
               <div style="padding: 5px 0">
-                <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
+                <Icon
+                  type="md-cloud-upload"
+                  size="36"
+                  style="color: #3399ff"
+                ></Icon>
                 <span>点击或将文件拖拽到这里上传</span>
               </div>
             </Upload>
@@ -158,12 +185,14 @@
                 :href="item.docUrl ? item.docUrl : 'javascript:void(0);'"
                 :download="item.fileName"
                 :target="item.docUrl ? '_blank' : '_self'"
-              >{{ item.fileName }}</a>
+                >{{ item.fileName }}</a
+              >
               <span
-                v-if="form.spzt == '0'  || form.spzt == '3' || form.spzt == '4'"
-                style="float: right; cursor:pointer"
+                v-if="form.spzt == '0' || form.spzt == '3' || form.spzt == '4'"
+                style="float: right; cursor: pointer"
                 @click="form.filesList.splice(index, 1)"
-              >x</span>
+                >x</span
+              >
             </div>
             <p v-if="uploading" style="text-align: center">上传中...</p>
           </Col>
@@ -181,21 +210,25 @@
         </Row>
         <Spin size="large" fix v-if="spinShow"></Spin>
       </Card>
-      <Card style="width:100%" :bordered="false" :dis-hover="true">
+      <Card style="width: 100%" :bordered="false" :dis-hover="true">
         <p slot="title">申购计划明细</p>
         <div slot="extra">
           <Button
             v-show="tableData.length"
             type="primary"
             @click="plszOpen"
-            :disabled="form.spzt == '2'  || form.spzt == '1'"
-          >批量设置</Button>
+            :disabled="form.spzt == '2' || form.spzt == '1'"
+            >批量设置</Button
+          >
           <!-- <Button type="primary">批量导入</Button> -->
           <Button
             type="primary"
             @click="addMxShow"
-            :disabled="planType == 'add' || form.spzt == '2'  || form.spzt == '1'"
-          >新增明细</Button>
+            :disabled="
+              planType == 'add' || form.spzt == '2' || form.spzt == '1'
+            "
+            >新增明细</Button
+          >
         </div>
         <Table
           :columns="tableColumn"
@@ -213,7 +246,7 @@
                 :min="1"
                 :precision="2"
                 v-model="tableData[index].amount"
-                :disabled="form.spzt == '2'  || form.spzt == '1'"
+                :disabled="form.spzt == '2' || form.spzt == '1'"
                 placeholder="请输入"
                 style="width: 95%"
               />
@@ -221,29 +254,39 @@
           </template>
           <template slot-scope="{ row, index }" slot="storehouseId">
             <Select
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               v-model="tableData[index].storehouseId"
               style="width: 95%"
               :transfer="true"
             >
-              <Option v-for="item in ckList" :value="item.twId" :key="item.twId">{{ item.twName }}</Option>
+              <Option
+                v-for="item in ckList"
+                :value="item.twId"
+                :key="item.twId"
+                >{{ item.twName }}</Option
+              >
             </Select>
           </template>
           <template slot-scope="{ row, index }" slot="linkedPersonId">
             <Select
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               v-model="tableData[index].linkedPersonId"
               filterable
               label-in-value
               style="width: 95%"
               :transfer="true"
-              @on-change="(param) => {djrChange(param, index)}"
+              @on-change="
+                (param) => {
+                  djrChange(param, index);
+                }
+              "
             >
               <Option
                 v-for="item in djrList"
                 :value="item.userId"
                 :key="item.userId"
-              >{{ item.userName }}</Option>
+                >{{ item.userName }}</Option
+              >
             </Select>
           </template>
           <!-- <template slot-scope="{ row, index }" slot="billType">
@@ -261,13 +304,13 @@
           </template>
           <template slot-scope="{ row, index }" slot="arriveTime">
             <DatePicker
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               :transfer="true"
               format="yyyy-MM-dd"
               :options="jhdhsjOption"
               type="date"
               :value="tableData[index].arriveTime"
-              @on-change="tableData[index].arriveTime=$event"
+              @on-change="tableData[index].arriveTime = $event"
               placeholder="请选择"
               style="width: 95%"
             ></DatePicker>
@@ -275,19 +318,22 @@
           <!-- @on-change="((val, date) => tableDateChange(val, date ,index))" -->
           <template slot-scope="{ row, index }" slot="remark">
             <Input
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               v-model="tableData[index].remark"
               placeholder="请输入"
               style="width: 95%"
             />
           </template>
-          <template
-            slot-scope="{ row, index }"
-            slot="isCancel"
-          >{{ row.isCancel == '0' ? '有效' : '已取消' }}</template>
+          <template slot-scope="{ row, index }" slot="isCancel">{{
+            row.isCancel == "0" ? "有效" : "已取消"
+          }}</template>
           <template slot-scope="{ row, index }" slot="cz">
             <div
-              v-if="form.spzt != '1' && form.spzt !='2' && (form.status = '1' || form.status == '2')"
+              v-if="
+                form.spzt != '1' &&
+                form.spzt != '2' &&
+                (form.status = '1' || form.status == '2')
+              "
             >
               <a href="javascript:;" @click="deleteRow(index)">删除</a>
             </div>
@@ -295,7 +341,12 @@
               <a href="javascript:;" @click="cancelRow(row, index)">取消</a>
             </div>
             <div v-if="row.isCancel == '1' && form.spzt == '2'">
-              <Poptip placement="top-end" width="300" trigger="hover" :transfer="true">
+              <Poptip
+                placement="top-end"
+                width="300"
+                trigger="hover"
+                :transfer="true"
+              >
                 <a href="javascript:;">查看原因</a>
                 <div slot="content">
                   <p>操作人:{{ row.cancelInfo.operatorName }}</p>
@@ -307,29 +358,39 @@
           </template>
         </Table>
       </Card>
-      <Modal v-model="plszShow" title="批量设置" @on-ok="plszOk" @on-cancel="plszCancel">
+      <Modal
+        v-model="plszShow"
+        title="批量设置"
+        @on-ok="plszOk"
+        @on-cancel="plszCancel"
+      >
         <Row class="mainCont">
           <Col span="12" class-name="tables">入库仓库</Col>
           <Col span="12" class-name="tables">
             <Select
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               clearable
               v-model="plrkck"
               style="width: 95%"
               :transfer="true"
             >
-              <Option v-for="item in ckList" :value="item.twId" :key="item.twId">{{ item.twName }}</Option>
+              <Option
+                v-for="item in ckList"
+                :value="item.twId"
+                :key="item.twId"
+                >{{ item.twName }}</Option
+              >
             </Select>
           </Col>
           <Col span="12" class-name="tables">计划到货时间</Col>
           <Col span="12" class-name="tables">
             <DatePicker
-              :disabled="form.spzt == '2'  || form.spzt == '1'"
+              :disabled="form.spzt == '2' || form.spzt == '1'"
               :transfer="true"
               format="yyyy-MM-dd"
               type="date"
               :value="pldhsj"
-              @on-change="pldhsj=$event"
+              @on-change="pldhsj = $event"
               :options="jhdhsjOption"
               placeholder="请选择"
               style="width: 95%"
@@ -346,7 +407,12 @@
         <Button type="primary" :loading="buttonLoading" @click="addOk">确认</Button>-->
       </div>
     </Modal>
-    <Modal v-model="qxShow" title="取消明细" @on-ok="qxOk" @on-cancel="qxCancel">
+    <Modal
+      v-model="qxShow"
+      title="取消明细"
+      @on-ok="qxOk"
+      @on-cancel="qxCancel"
+    >
       <Input v-model="qxsm" placeholder="请输入取消原因" />
     </Modal>
   </div>
@@ -392,7 +458,7 @@ export default {
       jhyfOption: {
         disabledDate(date) {
           let nDate = new Date();
-          let dn = +new Date(`${nDate.getFullYear()}-${nDate.getMonth() + 1}`);
+          let dn = +new Date(`${nDate.getFullYear()}-${nDate.getMonth()}-28`);
           return date.valueOf() < dn;
         },
       },
@@ -914,7 +980,7 @@ export default {
     },
     //审批记录跳转
     toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+      let link = `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
       window.open(link);
     },
     submitSgjh() {

+ 1 - 1
src/page/purchase/components/pool/poolAdd.vue

@@ -760,7 +760,7 @@ export default {
     },
     //审批记录跳转
     toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+      let link = `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
       window.open(link);
     },
     //提交订单

+ 4 - 4
src/page/purchase/components/pool/poolPrint.vue

@@ -49,7 +49,7 @@
               <th style="width: 100px">物料名称</th>
               <th style="width: 120px">规格型号</th>
               <th style="width: 60px">单位</th>
-              <th style="width: 70px">申购数量</th>
+              <!-- <th style="width: 70px">申购数量</th> -->
               <th style="width: 70px">采购数量</th>
               <th style="width: 50px">单价</th>
               <th style="width: 80px">金额</th>
@@ -63,7 +63,7 @@
               <td>{{ item.detailList[0].materialName }}</td>
               <td>{{ item.detailList[0].specs }}</td>
               <td>{{ item.detailList[0].unit }}</td>
-              <td>{{ item.detailList[0].amount }}</td>
+              <!-- <td>{{ item.detailList[0].amount }}</td> -->
               <td>{{ item.purchaseNum }}</td>
               <td>{{ item.price }}</td>
               <td>{{ item.totalPrice }}</td>
@@ -72,13 +72,13 @@
             <tr>
               <td colspan="2">总金额:</td>
               <td>大写:</td>
-              <td colspan="5">{{ chinesePrice }}</td>
+              <td colspan="4">{{ chinesePrice }}</td>
               <td>小写:</td>
               <td>¥{{ printData.totalPrice }} -</td>
             </tr>
             <tr>
               <td>说明:</td>
-              <td colspan="10" style="text-align: left">
+              <td colspan="9" style="text-align: left">
                 <p>
                   1、承包范围:
                   <span class="square" />不包运输/

+ 1 - 1
src/page/purchase/purchaseOrder.vue

@@ -121,7 +121,7 @@
             >删除</a>
             <a
               href="javascript:;"
-              v-if="buttonShow.print && row.orderState != '6' && row.approvalState != '4'"
+              v-if="buttonShow.print && row.orderState != '6'"
               @click="printRow(row)"
             >打印</a>
             <a

+ 1 - 1
src/page/purchaseView/balance.vue

@@ -267,7 +267,7 @@ export default {
     },
     //审批记录跳转
     toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+      let link = `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
       window.open(link);
     },
     uploadFilesSuccess(response, file, fileList) {

+ 4 - 4
src/page/purchaseView/order.vue

@@ -136,11 +136,11 @@
           <template
             slot-scope="{ row, index }"
             slot="isNumControl"
-          >{{ row.isNumControl == '1' ? '是' : '否' }}</template>
+          >{{ row.isNumControl == '0' ? '是' : '否' }}</template>
           <template
             slot-scope="{ row, index }"
             slot="isTimeControl"
-          >{{ row.isTimeControl == '1' ? '是' : '否' }}</template>
+          >{{ row.isTimeControl == '0' ? '是' : '否' }}</template>
           <template slot-scope="{ row, index }" slot="remark">{{ row.remark }}</template>
         </Table>
       </Card>
@@ -307,7 +307,7 @@ export default {
         },
         {
           title: "备注",
-          slot: "remark",
+          key: "remark",
           tooltip: true,
           width: 100,
         },
@@ -342,7 +342,7 @@ export default {
     },
     //审批记录跳转
     toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+      let link = `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
       window.open(link);
     },
     getInfo() {

+ 2 - 2
src/page/purchaseView/plan.vue

@@ -237,7 +237,7 @@ export default {
         },
         {
           title: "备注",
-          slot: "remark",
+          key: "remark",
           tooltip: true,
           // width: 100
         },
@@ -309,7 +309,7 @@ export default {
     },
     //审批记录跳转
     toSpjl() {
-      let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
+      let link = `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
       window.open(link);
     },
     plAdd(list) {

部分文件因为文件数量过多而无法显示