浏览代码

前端mxx

gjy 4 年之前
父节点
当前提交
ad540e42c6

文件差异内容过多而无法显示
+ 6 - 20320
package-lock.json


+ 19 - 20
package.json

@@ -2,22 +2,22 @@
   "name": "@winsea-product/winsea-product-platform-front",
   "version": "6.6.3-2-hot",
   "description": "用户前台前端",
-  "author": "赢海科技",
-   "main": "main.js",
-    "build": {
-      "appId": "com.hangge.demo",
-      "copyright": "Copyright © 2019 hangge.com",
-      "nsis": {
-        "oneClick": true,
-        "perMachine": true,
-        "runAfterFinish": true
-      },
-      "files": [
-        "dist/static",
-        "dist/*.html",
-        "*.js"
-      ]
+  "author": "中天",
+  "main": "main.js",
+  "build": {
+    "appId": "com.hangge.demo",
+    "copyright": "Copyright © 2019 hangge.com",
+    "nsis": {
+      "oneClick": true,
+      "perMachine": true,
+      "runAfterFinish": true
     },
+    "files": [
+      "dist/static",
+      "dist/*.html",
+      "*.js"
+    ]
+  },
   "scripts": {
     "dev": "vue-cli-service serve --max-old-space-size=8192",
     "dev:staging": "vue-cli-service serve --mode staging",
@@ -37,9 +37,9 @@
     "update-win:baseTemplateLib": "npm update base-template-lib -S && rd/s/q .\\node_modules\\.cache",
     "update-mac:base-template-lib": "npm update base-template-lib -S && rm -rf ./node_modules/.cache",
     "build:publish": "node bin/deploy.js",
-      "start": "electron .",
-        "pack": "electron-builder --dir",
-        "dist": "electron-builder"
+    "start": "electron .",
+    "pack": "electron-builder --dir",
+    "dist": "electron-builder"
   },
   "dependencies": {
     "@babel/polyfill": "^7.12.1",
@@ -76,7 +76,7 @@
   },
   "devDependencies": {
     "@babel/core": "7.0.0",
-     "autoprefixer": "^7.1.2",
+    "autoprefixer": "^9.5.1",
     "@babel/register": "7.0.0",
     "@pixul/node-rancher-api": "^1.4.0",
     "@vue/cli-plugin-babel": "3.6.0",
@@ -84,7 +84,6 @@
     "@vue/cli-plugin-pwa": "^3.12.1",
     "@vue/cli-service": "3.5.3",
     "@vue/test-utils": "1.0.0-beta.29",
-    "autoprefixer": "^9.5.1",
     "babel-core": "7.0.0-bridge.0",
     "babel-plugin-dynamic-import-node": "^2.3.3",
     "chai": "^4.1.2",

+ 13 - 3
src/api/V2/contract/index.js

@@ -1,6 +1,16 @@
 // 根据ID,常量类别获常量数据
-export const API_GET_CONTRACT_TENANT = '/contractManagementInfo/selectinfo'
 // 查看合同接口
 export const API_GET_EXAMINE_HISTORY = '/contractManagementInfo/getInfo'
-//查询合同信息
-export const API_GET_CONTRACT_INQUIRY = '/contractManagementInfo/selectinfo'
+export const API_GET_CONTRACT_TENANT = '/contractManagementInfo/selectInfo'
+export const API_POST_ADD_CONTRACT_TENANT = '/contractManagementInfo/addInfo'
+export const API_POST_MANNER_OF_PACKING_TENANT = '/commonSysParameter/getInfo'
+// 验收下拉
+export const API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN = `/customDropDown/query/customDropDown`
+// 下拉添加
+export const API_POST_CUSTOM_DOWN_ADD = '/customDropDown/api/saveAdd'
+// 下拉编辑
+export const API_POST_CUSTOM_DOWN_EDIT = '/customDropDown/api/saveEdit'
+// 下拉删除
+export const API_POST_CUSTOM_DOWN_DELETE = '/customDropDown/api/saveDelete'
+// 导出
+export const API_POST_EXPORT = '/contractManagementInfo/export'

+ 162 - 140
src/components/WsUpload/index.vue

@@ -1,92 +1,113 @@
 <template>
   <div class="ws-upload">
     <div v-if="!remarkWord">
-      <el-button class="upload-btn"
-                 size="small"
-                 :disabled="disabled"
-                 type="primary"
-                 @click="_handleUploadClick">{{ buttonName?buttonName:$t('upload.uploadButton') }}</el-button>
+      <el-button
+        class="upload-btn"
+        size="small"
+        :disabled="disabled"
+        type="primary"
+        @click="_handleUploadClick"
+        >{{ buttonName ? buttonName : $t('upload.uploadButton') }}</el-button
+      >
     </div>
-    <div class="trigger-group"
-         v-if="editable && remarkWord">
-      <el-button class="upload-btn"
-                 size="small"
-                 :disabled="disabled"
-                 type="primary"
-                 @click="_handleUploadClick">{{ buttonName?buttonName:$t('upload.uploadButton') }}</el-button>
+    <div class="trigger-group" v-if="editable && remarkWord">
+      <el-button
+        class="upload-btn"
+        size="small"
+        :disabled="disabled"
+        type="primary"
+        @click="_handleUploadClick"
+        >{{ buttonName ? buttonName : $t('upload.uploadButton') }}</el-button
+      >
       <div class="tip">
         {{ $t('upload.uploadText01') }}{{ formatTxt }}
-        {{ $t('upload.uploadText02') }}
+        格式的文件,单个文件大小不能超过10M
       </div>
     </div>
-    <el-upload action="#"
-               list-type="picture-card"
-               :http-request="_handleRequest"
-               :file-list="fileList"
-               :before-upload="_handleBeforeUpload"
-               :accept="accept"
-               :multiple="!limit || parseInt(limit) > 1"
-               ref="elUpload">
+    <el-upload
+      action="#"
+      list-type="picture-card"
+      :http-request="_handleRequest"
+      :file-list="fileList"
+      :before-upload="_handleBeforeUpload"
+      :accept="accept"
+      :multiple="!limit || parseInt(limit) > 1"
+      ref="elUpload"
+    >
       <template v-slot:trigger>
         <div ref="triggerDiv">-</div>
       </template>
       <template v-slot:file="{ file }">
         <div class="thumbnail-group">
-          <winsea-picture-view v-if="isPictureFile(file)"
-                               class="el-upload-list__item-thumbnail"
-                               picturesShowType="fold"
-                               :pic-small-list="_getFileImg(file)"
-                               :pic-list="_getFileImgs"
-                               :width="110"
-                               :height="110" />
-          <img v-else
-               class="el-upload-list__item-thumbnail"
-               :class="getFileClass(file)" />
+          <winsea-picture-view
+            v-if="isPictureFile(file)"
+            class="el-upload-list__item-thumbnail"
+            picturesShowType="fold"
+            :pic-small-list="_getFileImg(file)"
+            :pic-list="_getFileImgs"
+            :width="110"
+            :height="110"
+          />
+          <img
+            v-else
+            class="el-upload-list__item-thumbnail"
+            :class="getFileClass(file)"
+          />
         </div>
-        <div class="fileName"
-             v-if="showName"
-             :title="file.name">
+        <div class="fileName" v-if="showName" :title="file.name">
           {{ file.name }}
         </div>
-        <span class="el-upload-list__item-actions"
-              :class="!(file.status == 'success') ? 'operate-bg' : ''"
-              v-if="file.status == 'success' && (editable || download)">
+        <span
+          class="el-upload-list__item-actions"
+          :class="!(file.status == 'success') ? 'operate-bg' : ''"
+          v-if="file.status == 'success' && (editable || download)"
+        >
           <span class="el-upload-list__item-delete">
-            <i class="el-icon-view"
-               v-if="
+            <i
+              class="el-icon-view"
+              v-if="
                 isOnlineFile(file) &&
-                  download &&
-                  !isPictureFile(file) &&
-                  !onlineEdit
+                download &&
+                !isPictureFile(file) &&
+                !onlineEdit
               "
-               @click="_handleDownload(file, 'view')"></i>
-            <i class="el-icon-edit"
-               v-if="onlineEdit"
-               @click="_handleOnline(file)"></i>
-            <i class="el-icon-download"
-               @click.stop="_handleDownload(file, 'down')"></i>
-            <i v-if="editable"
-               class="el-icon-delete"
-               @click.stop="_handleRemove(file)"></i>
+              @click="_handleDownload(file, 'view')"
+            ></i>
+            <i
+              class="el-icon-edit"
+              v-if="onlineEdit"
+              @click="_handleOnline(file)"
+            ></i>
+            <i
+              class="el-icon-download"
+              @click.stop="_handleDownload(file, 'down')"
+            ></i>
+            <i
+              v-if="editable"
+              class="el-icon-delete"
+              @click.stop="_handleRemove(file)"
+            ></i>
           </span>
         </span>
       </template>
     </el-upload>
-    <BaseDialog v-drag
-                :modal="false"
-                :visible.sync="dialogVisible"
-                @closed="_handlePreviewClosed"
-                :title="downloadName"
-                append-to-body>
-      <img v-lazy="dialogImageUrl"
-           width="100%" />
+    <BaseDialog
+      v-drag
+      :modal="false"
+      :visible.sync="dialogVisible"
+      @closed="_handlePreviewClosed"
+      :title="downloadName"
+      append-to-body
+    >
+      <img v-lazy="dialogImageUrl" width="100%" />
     </BaseDialog>
-    <BaseDialog width="70%"
-                :title="pdfFileName"
-                :visible.sync="isShowPdf"
-                :appendToBody="true">
-      <pdf :loadUrl="pdfUrl"
-           v-if="isShowPdf" />
+    <BaseDialog
+      width="70%"
+      :title="pdfFileName"
+      :visible.sync="isShowPdf"
+      :appendToBody="true"
+    >
+      <pdf :loadUrl="pdfUrl" v-if="isShowPdf" />
     </BaseDialog>
   </div>
 </template>
@@ -102,70 +123,70 @@ import { mapActions } from 'vuex'
 export default {
   name: 'WsUpload',
   components: {
-    pdf
+    pdf,
   },
   props: {
     appendixIds: String,
     editable: {
       // 是否为编辑模式
       type: Boolean,
-      default: true
+      default: true,
     },
     remarkWord: {
       // 是否有备注要求
       type: Boolean,
-      default: true
+      default: true,
     },
     preview: {
       // 是否允许预览
       type: Boolean,
-      default: true
+      default: true,
     },
     download: {
       // 是否允许下载
       type: Boolean,
-      default: true
+      default: true,
     },
     showName: {
       // 是否显示文件名
       type: Boolean,
-      default: true
+      default: true,
     },
     limit: {
       // 文件总数量限制
       type: Number,
-      default: 10
+      default: 10,
     },
     sizeLimit: {
       // 文件大小限制
       type: Number,
-      default: undefined
+      default: undefined,
     },
     accept: {
       // 限制文件类型
       type: String,
       default:
-        '.jpg, .jpeg, .png, .gif, .pdf, .doc, .docx, .xls, .xlsx, .zip, .rar, .eml, .mpeg, .avi, .asf, .wmv, .mpv, .rmvb, .rm, .flv, .mp4, .3pg, .ppt, .pptx, .txt'
+        '.jpg, .jpeg, .png, .gif, .pdf, .doc, .docx, .xls, .xlsx, .zip, .rar, .eml, .mpeg, .avi, .asf, .wmv, .mpv, .rmvb, .rm, .flv, .mp4, .3pg, .ppt, .pptx, .txt',
     },
     ossKey: {
       type: String,
-      required: true
+      required: true,
     },
     compId: {
       // 公司ID
       type: String,
-      required: true
+      required: true,
     },
     vesselId: {
       // 船舶ID
       type: String,
       default: '',
-      required: false
+      required: false,
     },
     tableName: {
       // 要保存的表的名字
       type: String,
-      required: true
+      required: true,
     },
     onlineEdit: false,
     disabled: false,
@@ -174,7 +195,7 @@ export default {
       type: String,
     },
   },
-  data () {
+  data() {
     return {
       pdfUrl: '',
       pdfFileName: '',
@@ -193,22 +214,22 @@ export default {
       loadingView: '', // loading弹出层
       uploadParams: {
         companyId: this.compId,
-        basePath: '' //config.getUploadPath(this.ossKey, this.compId)
+        basePath: '', //config.getUploadPath(this.ossKey, this.compId)
       },
-      clientFag: sessionStorage.getItem('ws-pf_clientFag')
+      clientFag: sessionStorage.getItem('ws-pf_clientFag'),
     }
   },
   computed: {
-    formatTxt () {
+    formatTxt() {
       return this.accept
         .replace(/\./g, '')
         .replace(/ /g, '')
         .replace(/,/g, '、')
     },
-    thisAppendixIds () {
+    thisAppendixIds() {
       return this.appendixIds
     },
-    _getFileImgs () {
+    _getFileImgs() {
       let arr = []
       for (let i of this.fileList) {
         if (this.isPictureFile(i)) {
@@ -216,19 +237,19 @@ export default {
         }
       }
       return arr
-    }
+    },
   },
   watch: {
     // 监听props.appendixIds, 变化时向服务器请求
-    async thisAppendixIds (newV, oldV) {
+    async thisAppendixIds(newV, oldV) {
       this.getDefaultFiles(newV)
-    }
+    },
   },
-  mounted () {
+  mounted() {
     this.getDefaultFiles(this.appendixIds)
 
     const handleChange = this.$refs.elUpload.$refs['upload-inner'].handleChange
-    this.$refs.elUpload.$refs['upload-inner'].handleChange = ev => {
+    this.$refs.elUpload.$refs['upload-inner'].handleChange = (ev) => {
       this.initFileList = []
       this.curFileNum = ev.target.files.length
       for (let i = 0; i < this.curFileNum; i++) {
@@ -242,8 +263,10 @@ export default {
   methods: {
     ...mapActions('common', ['uploadShipFiles']),
     //pdf预览
-    async toOpen (scope) {
-      const data = await this.getFileList({ appendixIds: scope.row.filePathId }).toPromise()
+    async toOpen(scope) {
+      const data = await this.getFileList({
+        appendixIds: scope.row.filePathId,
+      }).toPromise()
       let path = data[0] ? data[0].appendixPath : ''
       let filePath = this.$store.getters.baseInfo.fileUrl + '/' + path
       this.pdfUrl = filePath
@@ -256,7 +279,7 @@ export default {
     //   this.tempFileList = fileList
     // },
     // 获取图片文件
-    _getFileImg (file) {
+    _getFileImg(file) {
       if (!file) {
         return ''
       }
@@ -269,7 +292,7 @@ export default {
       return ''
     },
 
-    async getDefaultFiles (appendixIds) {
+    async getDefaultFiles(appendixIds) {
       this.fileList = []
       if (appendixIds) {
         this.loading = true
@@ -282,7 +305,7 @@ export default {
               appendixId: item.appendixId,
               name: item.appendixName,
               url: this.getFilePath(item.appendixPath),
-              uid: uuid()
+              uid: uuid(),
             }
           })
         }
@@ -290,49 +313,47 @@ export default {
     },
 
     // 处理上传按钮点击
-    _handleUploadClick () {
+    _handleUploadClick() {
       this.$refs.triggerDiv.click()
     },
     // 处理预览
-    _handlePreview (file) {
+    _handlePreview(file) {
       this.dialogImageUrl = file.url
       this.downloadName = file.name
       this.dialogVisible = true
     },
     // 处理预览关闭
-    _handlePreviewClosed () {
+    _handlePreviewClosed() {
       this.dialogImageUrl = ''
       this.downloadName = ''
     },
 
     // 处理删除
-    _handleRemove (file) {
+    _handleRemove(file) {
       if (file.appendixId) {
         // 这是要删除已经存在的附件
         const index = this.fileList.findIndex(
-          itm => itm.appendixId === file.appendixId
+          (itm) => itm.appendixId === file.appendixId
         )
         this.fileList.splice(index, 1)
         this.removeList.push(file.appendixId)
       } else {
         // 这是删除已上传但还未保存的附件
-        const index = this.fileList.findIndex(itm => itm.uid === file.uid)
+        const index = this.fileList.findIndex((itm) => itm.uid === file.uid)
         this.fileList.splice(index, 1)
       }
       this.$emit('onChange', this.fileList.length)
     },
 
     // 自定义上传过程
-    _handleRequest (param) {
+    _handleRequest(param) {
       if (this.vesselBankFlag === 'V') {
         //船端
         this._uploadFilesShip(param)
       }
     },
 
-
-
-    async _uploadFilesShip (param) {
+    async _uploadFilesShip(param) {
       return new Promise(async (resolve, reject) => {
         this.showLoading()
         const file = param.file
@@ -343,7 +364,7 @@ export default {
             modelId: this.isNull(this.tableName)
               ? ''
               : this.tableName.split('_')[0],
-            vesselId: this.vesselId || ''
+            vesselId: this.vesselId || '',
           })
           this.$emit('uploadSuccess', data, file)
           const item = {
@@ -359,7 +380,7 @@ export default {
             vesselId: this.vesselId || '',
             uid: file.uid,
             url: this.getFilePath(data.appendixPath),
-            name: file.name
+            name: file.name,
           }
           let fileIndex = this.getFileIndex(item.uid)
           if (fileIndex >= 0) {
@@ -375,12 +396,12 @@ export default {
     },
 
     // 处理单个文件上传成功
-    _handleSuccessOnce () {
+    _handleSuccessOnce() {
       this.curFileNum--
       if (this.curFileNum === 0) {
         this.fileList.push.apply(
           this.fileList,
-          this.tempFileList.filter(item => {
+          this.tempFileList.filter((item) => {
             return !this.isNull(item.uid)
           })
         )
@@ -390,19 +411,20 @@ export default {
       }
     },
     // 处理在线编辑
-    _handleOnline (file) {
+    _handleOnline(file) {
       window.open(
         process.env.VUE_APP_BASE_API +
-        '/office/file?fileId=' +
-        file.appendixId +
-        '&showSaveFlag=1'
+          '/office/file?fileId=' +
+          file.appendixId +
+          '&showSaveFlag=1'
       )
     },
 
     // 处理下载
-    _handleDownload (file, type) {
+    _handleDownload(file, type) {
       if (this.isOnlineFile(file) && type === 'view') {
-        this.pdfUrl = file.url || (this.$store.getters.baseInfo.fileUrl + file.appendixPath)
+        this.pdfUrl =
+          file.url || this.$store.getters.baseInfo.fileUrl + file.appendixPath
         this.pdfFileName = file.appendixName || file.name
         this.isShowPdf = true
         return
@@ -410,7 +432,7 @@ export default {
       downloadNow(file.url, file.name, this.vesselBankFlag, type)
     },
 
-    _handleBeforeUpload (file) {
+    _handleBeforeUpload(file) {
       let size = this.sizeLimit ? this.sizeLimit : 50
       if (file.size > size * 1024 * 1024) {
         EventBus.$emit('error', this.$t('showMessage.filesCannot') + size + 'M')
@@ -430,27 +452,27 @@ export default {
       return true
     },
     //处理文件上传失败
-    _handleError () {
+    _handleError() {
       this.curFileNum--
       this.hideLoading()
     },
 
-    _handleExceed () {
+    _handleExceed() {
       EventBus.$emit('warning', `最多只能上传${this.limit}个文件`)
     },
 
     // 传入appendixIds 从服务器获取文件列表信息
-    _getFileList (appendixIds) {
-      return new Promise(async next => {
+    _getFileList(appendixIds) {
+      return new Promise(async (next) => {
         try {
-          next(await getFileList({ appendixIds }).toPromise() || [])
+          next((await getFileList({ appendixIds }).toPromise()) || [])
         } catch (error) {
           next()
         }
       })
     },
 
-    handleSaveBill () {
+    handleSaveBill() {
       return new Promise((resolve, reject) => {
         if (!this.removeList && this.fileList.length == 0) {
           resolve('')
@@ -462,10 +484,10 @@ export default {
         // if (newAppendixs)
         saveFiles(params)
           .toPromise()
-          .then(res => {
+          .then((res) => {
             resolve(res.join())
           })
-          .catch(err => {
+          .catch((err) => {
             EventBus.$emit('error', this.$t('showMessage.saveFilesError'))
             reject()
           })
@@ -473,12 +495,12 @@ export default {
     },
 
     // 获取文件样式
-    getFileClass (file) {
+    getFileClass(file) {
       const ext = this.getExtName(file.name)
       return 'ext ' + ext
     },
     // 是否为图片
-    isPictureFile (file) {
+    isPictureFile(file) {
       if (file && file.name) {
         const name = this.getExtName(file.name)
         return (
@@ -499,7 +521,7 @@ export default {
       return false
     },
     // 是否为在线打开文件
-    isOnlineFile (file) {
+    isOnlineFile(file) {
       if (file && file.name) {
         const name = this.getExtName(file.name)
         return name === 'pdf' || name === 'tet'
@@ -507,8 +529,8 @@ export default {
       return false
     },
 
-    getOssInter () {
-      return new Promise(async next => {
+    getOssInter() {
+      return new Promise(async (next) => {
         try {
           next(await getOssInterimCredentials().toPromise())
         } catch (error) {
@@ -517,7 +539,7 @@ export default {
       })
     },
 
-    getFileIndex (uid) {
+    getFileIndex(uid) {
       for (let i = 0; i < this.initFileList.length; i++) {
         if (this.initFileList[i].uid === uid) {
           return i
@@ -527,21 +549,21 @@ export default {
     },
 
     // 显示loading
-    showLoading () {
+    showLoading() {
       this.loadingView = this.$loading({
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
         background: 'rgba(0, 0, 0, 0.7)',
-        target: document.querySelector('.div1')
+        target: document.querySelector('.div1'),
       })
     },
     // 隐藏loading
-    hideLoading () {
+    hideLoading() {
       this.loadingView.close()
     },
     // 获取后缀名
-    getExtName (url) {
+    getExtName(url) {
       if (!url) {
         return url
       }
@@ -551,7 +573,7 @@ export default {
       }
       return url
     },
-    checkUrl (path) {
+    checkUrl(path) {
       if (path.indexOf('http://') > -1 || path.indexOf('https://') > -1) {
         let pathSplit = path.split('.com/')
         if (pathSplit) {
@@ -560,7 +582,7 @@ export default {
       }
       return path
     },
-    getFilePath (path) {
+    getFilePath(path) {
       // let sysUrl =  process.env.NODE_ENV === "production"?"http://" + window.location.host+"/":"http://product-dev.winsea.com/";
       let sysUrl = this.$store.getters.baseInfo.fileUrl
       path = this.checkUrl(path)
@@ -570,19 +592,19 @@ export default {
       return sysUrl + this.slash(path)
     },
     // 字节转KB
-    toKB (bt) {
+    toKB(bt) {
       return (bt / 1024).toFixed(2) + 'KB'
     },
 
-    clearFiles () {
+    clearFiles() {
       // debugger
       this.fileList = []
     },
     // 反斜杠转斜杠
-    slash (str) {
+    slash(str) {
       return str.replace(/\\/g, '/')
-    }
-  }
+    },
+  },
 }
 </script>
 

+ 7 - 0
src/lang/zh.js

@@ -484,6 +484,9 @@
     salesContractEdit: '销售合同编辑',
     salesContractExamine: '销售合同查看',
     purchaseContractExamine: '采购合同查看',
+    salesContractAdd: '销售合同添加',
+    purchaseContractAdd: '采购合同添加',
+    purchaseContractEdit: '采购合同编辑',
     // 采购模块
     procurement: '采购管理',
     sparepart: '备件采购',
@@ -4654,6 +4657,10 @@
     salesContractEdit: '销售合同编辑',
     salesContractExamine: '销售合同查看',
     purchaseContractExamine: '采购合同查看',
+    salesContractAdd: '销售合同添加',
+    purchaseContractAdd: '采购合同添加',
+    purchaseContractEdit: '采购合同编辑',
+
   },
   purchase: {
     purchaseContract: '采购合同',

+ 24 - 10
src/model/contarct/index.js

@@ -1,12 +1,26 @@
-/* eslint-disable no-undef */
-import{
-    API_GET_CONTRACT_TENANT,
-    API_GET_CONTRACT_INQUIRY
-}from '@/api/v2/contract'
+
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
-//查看合同接口
-export const getList = appRx.get(API_GET_CONTRACT_TENANT,errorCatcher,errorHandle,filter)
+import {
+    API_GET_CONTRACT_TENANT,
+    API_POST_ADD_CONTRACT_TENANT,
+    API_GET_EXAMINE_HISTORY,
+    API_POST_MANNER_OF_PACKING_TENANT,
+    API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN,
+    API_POST_CUSTOM_DOWN_ADD,
+    API_POST_CUSTOM_DOWN_EDIT,
+    API_POST_CUSTOM_DOWN_DELETE,
+    API_POST_EXPORT
+} from '@/api/V2/contract'
+export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
+export const addList = appRx.get(API_POST_ADD_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
+export const packList = appRx.get(API_POST_MANNER_OF_PACKING_TENANT, errorCatcher, errorHandle, filter)
 //查询合同
-export const getInquiry = appRx.get(API_GET_CONTRACT_INQUIRY,errorCatcher,errorHandle,filter)
-
-
+export const getInquiry = appRx.get(API_GET_EXAMINE_HISTORY,errorCatcher,errorHandle,filter)
+// 下拉
+export const xiala = appRx.get(API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
+export const addxiala = appRx.post(API_POST_CUSTOM_DOWN_ADD, errorCatcher, errorHandle, filter)
+export const editxiala = appRx.post(API_POST_CUSTOM_DOWN_EDIT, errorCatcher, errorHandle, filter)
+export const delxiala = appRx.post(API_POST_CUSTOM_DOWN_DELETE, errorCatcher, errorHandle, filter)
+// 导出
+export const export1 = appRx.get(API_POST_EXPORT)

+ 45 - 0
src/views/contractManagement/component/routers/route.js

@@ -55,6 +55,36 @@ const contractManagementRouter = {
       },
       hidden: true
     },
+    {
+      path: 'purchaseContractEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/purchaseContractEdit'),
+      name: 'purchaseContractEdit',
+      meta: {
+        title: 'purchaseContractEdit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract.purchaseContractEdit',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    {
+      path: 'purchaseContractAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/purchaseContractAdd'),
+      name: 'purchaseContractAdd',
+      meta: {
+        title: 'purchaseContractAdd',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract.purchaseContractAdd',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
     {
       path: 'salesContractExamine',
       component: () =>
@@ -84,6 +114,21 @@ const contractManagementRouter = {
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
+    },
+    {
+      path: 'salesContractAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContractAdd'),
+      name: 'salesContractAdd',
+      meta: {
+        title: 'salesContractAdd',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.salesContract.salesContractAdd',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
     }
 
   ],

+ 236 - 8
src/views/contractManagement/purchaseContract.vue

@@ -2,7 +2,77 @@
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
   <div>
-    <el-table :data="tableData" style="width: 100%">
+    <BaseHeaderLayout :leftSpan="10">
+      <template slot="left">
+        <ws-button
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >添加</ws-button
+        >
+        <ws-button
+          @click="exportlist()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+        <ws-select
+          v-model="deptBudgetList.crtDutyId"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+        <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.birthday"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+        <span>至</span>
+        <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.birthday"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="截止日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+        <ws-input
+          v-model="deptBudgetList.interviewOpinion"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          type="primary"
+          @click="enquiry(3)"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >查找</ws-button
+        >
+      </template>
+    </BaseHeaderLayout>
+    <el-table :data="tableData" style="width: 100%; margin-top: 10px">
       <el-table-column type="index" />
       <el-table-column prop="date" label="合同编号" width="80">
       </el-table-column>
@@ -17,7 +87,11 @@
       <el-table-column prop="address" label="状态"> </el-table-column>
       <el-table-column prop="address" label="签订日期"> </el-table-column>
       <el-table-column prop="address" label="已付款(元)"> </el-table-column>
-      <el-table-column prop="address" label="附件"> </el-table-column>
+      <el-table-column prop="address" label="附件">
+        <template slot-scope="scope">
+          <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i>
+        </template>
+      </el-table-column>
       <el-table-column prop="address" label="操作" width="300">
         <template slot-scope="scope">
           <el-button
@@ -26,10 +100,7 @@
             @click="handleExamine(scope.row)"
             >查看</el-button
           >
-          <el-button
-            type="primary"
-            size="small"
-            @click="handleUpdate(scope.row)"
+          <el-button type="primary" size="small" @click="handleEdit(scope.row)"
             >编辑</el-button
           >
           <el-button type="danger" size="small" @click="handleDelete(scope.row)"
@@ -38,11 +109,33 @@
         </template>
       </el-table-column>
     </el-table>
+    <!-- 附件弹框 -->
+    <!-- <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <ws-upload
+        ref="uploads"
+        table-name="ism_circular_management_info "
+        :vesselId="my_vesselId ? my_vesselId : ''"
+        oss-key="circularLetter"
+        :editable="false"
+        :appendix-ids="appendixIdss"
+        :comp-id="compId"
+      />
+      <template slot="footer" class="dialog-footer">
+        <ws-button @click="hiddenHistory">{{
+          $t('crew.interviewManagement.button.cancel')
+        }}</ws-button>
+      </template>
+    </WinseaContentModal> -->
   </div>
 </template>
 <script>
-import { getVesselOne } from '@/model/procurement/basic'
-import { dayjs } from 'base-core-lib'
+import { getList, export1 } from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import { dayjs, fmoney } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   watch: {
@@ -66,29 +159,164 @@ export default {
       showType: true,
       // 年
       year: '',
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 0,
+      searchKeyWord: '',
+      startDate: null,
+      endDate: null,
       // 提交类型
       submitType: true,
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
       tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      deptBudgetList: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成(默认)' },
+        { value: '已完成' },
+        { value: '待回款' },
+        { value: '全部合同' },
+      ],
     }
   },
   created() {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
+    this.getList()
     this.showType = this.isShow
   },
   methods: {
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+      })
+        .toPromise()
+        .then((response) => {
+          console.log(response)
+          this.contractList = response
+        })
+    },
+    selectCrtDuty() {},
+    fujian() {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
     handleExamine(row) {
       this.$router.push({ path: 'purchaseContractExamine' })
     },
+    handleAdd() {
+      console.log(11111)
+      this.$router.push({ path: 'purchaseContractAdd' })
+    },
+    handleEdit(row) {
+      this.$router.push({ path: 'purchaseContractEdit' })
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false
     },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
   },
 }
 </script>
 <style lang="scss" scoped>
+.typeselect {
+  width: 500px;
+}
+.padding-xs {
+  padding: 15px;
+  text-align: right;
+}
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.el-table {
+  font-size: 16px;
+}
+.taskType {
+  width: 100%;
+  background-color: #fff;
+  margin-top: 2px;
+  margin-bottom: 10px;
+  list-style: none;
+  // padding-bottom: 20px;
+  li {
+    float: left;
+    border: 1px solid #6ea0f3;
+    border-radius: 5px;
+    max-width: 190px;
+    padding: 0 5px;
+    text-align: center;
+    margin: 10px 20px;
+    cursor: pointer;
+    font-size: 14px;
+
+    p {
+      margin: 8px 0px;
+      span {
+        color: #e74c3c;
+      }
+    }
+  }
+  li:hover {
+    background-color: #e4eeff;
+    color: #1d6ced;
+  }
+}
+.el-date-editor--date {
+  margin: 0 10px;
+}
+.findValue {
+  margin: 0 10px;
+}
 .button-container {
   display: flex;
   flex-wrap: nowrap;

+ 885 - 0
src/views/contractManagement/purchaseContractAdd.vue

@@ -0,0 +1,885 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class='container'>
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left">创建销售合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+   
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="remark">
+      <h3>基本信息</h3>
+      <p>注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。</p>
+    </div>
+        <ws-info-table>
+          <ws-form-item
+            label="合同编号"
+            span="1"
+            prop="contractNo"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractNo"
+              maxlength="100"
+              size="small"
+            />
+            <span class='unchangeable'>*</span>
+          </ws-form-item>
+          <ws-form-item
+            label="运输方式"
+            span="1"
+            prop="shippingType"
+          >
+          <ws-input
+              v-model="deptBudgetList.shippingType"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="买方"
+            span="1"
+            prop="buyer"
+          >
+          <ws-input
+              v-model="deptBudgetList.buyer"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="结算方式"
+            span="1"
+            prop="settlementMethod"
+          >
+          <ws-input
+              v-model="deptBudgetList.settlementMethod"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="卖方"
+            span="1"
+            prop="seller"
+          >
+          <ws-input
+              v-model="deptBudgetList.seller"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="货源地"
+            span="1"
+            prop="sourceGoods"
+          >
+          <ws-input
+              v-model="deptBudgetList.sourceGoods"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="买方电话"
+            span="1"
+            prop="buyerPhone"
+           
+          >
+          <ws-input
+              v-model="deptBudgetList.buyerPhone"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货地"
+            span="1"
+            prop="placeDelivery"
+          >
+          <ws-input
+              v-model="deptBudgetList.placeDelivery"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="卖方电话"
+            span="1"
+            prop="sellerPhone"
+          >
+          <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="包装方式"
+            span="1"
+            prop="packingMethod"
+          >
+          <ws-select
+          v-model="deptBudgetList.packingMethod"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in packtypeList"
+            :key="item.constKey"
+            :label="item.constValue"
+            :value="item.constValue"
+          />
+        </ws-select>
+          </ws-form-item>
+          <ws-form-item
+            label="重量(吨)"
+            span="1"
+            prop="weight"
+          >
+          <ws-input
+              v-model="deptBudgetList.weight"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="验收方式"
+            span="1"
+            prop="acceptanceMethod"
+          >
+            <el-select v-model="pleaseChoose" :placeholder="getPleaseChoose"  style="width: 100%;" filterable @change="selectContract">
+              <el-option v-for="(item,index) in unitList"
+               :key="item.constValue"
+               :label="getLanguage !== 'en' ? item.constValue : item.constValueEn"
+               :value="item.constValue">
+                <span class="unit-left" style="float: left">
+                  <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                  <!-- 新增文本框 -->
+                  <div style="width:160px" v-if="item.flag !== 'delete'" @click.stop>
+                    <ws-input v-model="item.constValue"
+                    clearable
+                    maxlength="10"
+                    style="width:100%;"></ws-input>
+                  </div>
+                </span>
+                <span style="float: right; color: #8492a6; font-size: 13px">
+                  <!-- 对号 -->
+                  <i class="el-icon-check" style="line-height: 29px;margin-left:10px" v-if="item.flag !== 'delete'" @click.stop="saveClick(item, index)"></i>
+                  <!-- 编辑 -->
+                  <i class="el-icon-edit" style="line-height: 29px;margin-left:10px" v-if="item.flag == 'delete'" @click.stop="editClick(item, index)"></i>
+                  <!-- 删除 -->
+                  <i class="el-icon-delete" style="line-height: 29px;" @click.stop="deleteClick(item, index)"></i>
+                </span>
+              </el-option>
+              <!-- 新增按钮 -->
+              <el-option value="" label="">
+                <div style="text-align: center">
+                  <ws-button type="primary" @click.stop="addClick">{{$t('button.add')}}</ws-button>
+                </div>
+              </el-option>
+            </el-select>
+          </ws-form-item>
+          <ws-form-item
+            label="溢短装(%)"
+            span="1"
+            prop="overShort"
+          >
+          <ws-input
+              v-model="deptBudgetList.weight"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.deliveryDateStart"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+          <ws-form-item
+            label="合同单价(元/吨)"
+            span="1"
+            prop="unitContractPrice"
+          >
+          <ws-input
+              v-model="deptBudgetList.unitContractPrice"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货日期(止)"
+            span="1"
+            prop="deliveryDateEnd"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.deliveryDateEnd"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+          <ws-form-item
+            label="合同总价(元)"
+            span="1"
+            prop="totalContractPrice"
+          >
+          <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="签订日期"
+            span="1"
+            prop="signingDate"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.signingDate"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+        </ws-info-table>
+      </base-card>
+      <!--面试信息-->
+      <div class="remark">
+      <h3>货物信息</h3>
+    </div>
+        <ws-info-table>
+          <ws-form-item
+            label="货名"
+            span="1"
+            prop="goodsName"
+          >
+            <ws-select
+          v-model="deptBudgetList.contractGoodsInfo.goodsName"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in goodnameList"
+            :key="item.constKey"
+            :label="item.constValue"
+            :value="item.constValue"
+          />
+        </ws-select>
+          </ws-form-item>
+          <ws-form-item
+            label="水分(%)<="
+            span="1"
+            prop="waterContent"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="品级"
+            span="1"
+            prop="grade"
+          >
+          <ws-select
+          v-model="deptBudgetList.contractGoodsInfo.grade"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in gradeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+          </ws-form-item>
+          <ws-form-item
+            label="杂质(%)<="
+            span="1"
+            prop="interviewDates"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="容重(克/升)<="
+            span="1"
+            prop="interviewType"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="霉变粒(%)<="
+            span="1"
+            prop="mildewGrain"
+            class="result"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="热损伤(%)<="
+            span="1"
+            prop="jiaorenli"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="不完善粒(%)<="
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+             <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item
+            label="合同收入(元)"
+            span="1"
+            prop="goodsNameKey"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="已开发票(元)"
+            span="1"
+            prop="goodsName"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="费用支出(元)"
+            span="1"
+            prop="waterContent"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="未开发票(元)"
+            span="1"
+            prop="impurity"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="未回款(元)"
+            span="1"
+            prop="mildewGrain"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="Prettier"
+            class="imperfectGrain"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="双章原件回收情况"
+            span="1"
+            prop="grade"
+          >
+          <ws-select
+          v-model="deptBudgetList.contractProcessInfo.grade"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+        </div>
+            <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字" maxlength="200" />
+            <ws-upload ref="upload"
+                   table-name="maintain_work_order"
+                   oss-key="mainPlan"
+                   :comp-id="compId"
+                   :appendix-ids="appendixIdsAdd"
+                   :vesselId="deptBudgetList.addressUrl"
+                   :size-limit='size'
+                   accept='.jpg, .jpeg, .png, .pdf, .doc, .zip, .rar' />
+      </base-card>
+    </ws-form>
+    <div style='text-align:right;padding:10px;'>
+      <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { EventBus, dayjs } from 'base-core-lib'
+import {
+  packList,
+  addList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+} from '@/model/contarct/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      size: 10,
+      pleaseChoose: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractGoodsInfo: {
+          goodsName: '',
+        },
+        contractProcessInfo: {},
+      },
+      mainReportAdd: {},
+      trainingMethods: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      packtypeList: [],
+      goodnameList: [],
+      unitList: [],
+      gradeList: [],
+      taskTypeList: [
+        { value: '未完成(默认)' },
+        { value: '已完成' },
+        { value: '待回款' },
+        { value: '全部合同' },
+      ],
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    loaddata() {
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+    },
+    submit() {
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          console.log(this.deptBudgetList)
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    selectContract(val) {
+      let key = this.unitList.find((item) => item.constValue === val).constKey
+      this.pleaseChoose = val
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'purchaseContract' })
+    },
+    selectCrtDuty() {},
+    addClick() {
+      this.unitList.push({
+        flag: 'add',
+        constValue: '',
+        constKey: '',
+      })
+    },
+    saveClick(item, index) {
+      console.log(item)
+
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        this.$set(this.unitList, index, { flag: 'check' })
+      } else {
+        this.$set(this.unitList, index, { flag: 'delete' })
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      if (item.flag == 'add') {
+        item.constKey = Math.random() * 20
+        this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+        this.trainingMethods.constKey = item.constKey
+        this.trainingMethods.constCode = 'TYPEYAN'
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        addxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      } else {
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        editxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      }
+    },
+    // 编辑
+    editClick(item, index) {
+      const map = JSON.parse(JSON.stringify(item))
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        map.flag = 'check'
+        this.$set(this.unitList, index, map)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    deleteClick(item, index) {
+      if (Object.is(item.constKey, 1)) {
+        return
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      delxiala({ id: this.unitList[index].id })
+        .toPromise()
+        .then((response) => {
+          this.getUnitList()
+          this.pleaseChoose = ''
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.ws-upload {
+  margin-top: 20px;
+}
+.el-form {
+  padding: 0 20%;
+}
+.el-form-item {
+  width: 50%;
+}
+.unchangeable {
+  color: #1d6ced;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 10px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 20px 0px;
+}
+.remark h3 {
+  display: inline-block;
+  margin-right: 20px;
+}
+.remark p {
+  display: inline-block;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

+ 719 - 0
src/views/contractManagement/purchaseContractEdit.vue

@@ -0,0 +1,719 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class='container'>
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left">创建销售合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+   
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="remark">
+      <h3>基本信息</h3>
+      <p>注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。</p>
+    </div>
+        <ws-info-table>
+          <ws-form-item
+            label="合同编号"
+            span="1"
+            prop="contractNo"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractNo"
+              maxlength="100"
+              size="small"
+            />
+            <span class='unchangeable'>*</span>
+          </ws-form-item>
+          <ws-form-item
+            label="运输方式"
+            span="1"
+            prop="shippingType"
+          >
+          <ws-input
+              v-model="deptBudgetList.shippingType"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="买方"
+            span="1"
+            prop="buyer"
+          >
+          <ws-input
+              v-model="deptBudgetList.buyer"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="结算方式"
+            span="1"
+            prop="settlementMethod"
+          >
+          <ws-input
+              v-model="deptBudgetList.settlementMethod"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="卖方"
+            span="1"
+            prop="seller"
+          >
+          <ws-input
+              v-model="deptBudgetList.seller"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="货源地"
+            span="1"
+            prop="sourceGoods"
+          >
+          <ws-input
+              v-model="deptBudgetList.sourceGoods"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="买方电话"
+            span="1"
+            prop="buyerPhone"
+           
+          >
+          <ws-input
+              v-model="deptBudgetList.buyerPhone"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货地"
+            span="1"
+            prop="placeDelivery"
+          >
+          <ws-input
+              v-model="deptBudgetList.placeDelivery"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="卖方电话"
+            span="1"
+            prop="sellerPhone"
+          >
+          <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="包装方式"
+            span="1"
+            prop="packingMethod"
+          >
+          <ws-select
+          v-model="deptBudgetList.crtDutyId"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+          </ws-form-item>
+          <ws-form-item
+            label="重量(吨)"
+            span="1"
+            prop="weight"
+          >
+          <ws-input
+              v-model="deptBudgetList.weight"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="验收方式"
+            span="1"
+            prop="acceptanceMethod"
+          >
+          </ws-form-item>
+          <ws-form-item
+            label="溢短装(%)"
+            span="1"
+            prop="overShort"
+          >
+          <ws-input
+              v-model="deptBudgetList.weight"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.deliveryDateStart"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+          <ws-form-item
+            label="合同单价(元/吨)"
+            span="1"
+            prop="unitContractPrice"
+          >
+          <ws-input
+              v-model="deptBudgetList.unitContractPrice"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货日期(止)"
+            span="1"
+            prop="deliveryDateEnd"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.deliveryDateEnd"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+          <ws-form-item
+            label="合同总价(元)"
+            span="1"
+            prop="totalContractPrice"
+          >
+          <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="签订日期"
+            span="1"
+            prop="signingDate"
+          >
+          <ws-date-picker
+          :picker-options="pickerBeginDateBefore"
+          v-model="deptBudgetList.signingDate"
+          type="date"
+          default-value="1980-01-01"
+          placeholder="起始日期"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+        />
+          </ws-form-item>
+        </ws-info-table>
+      </base-card>
+      <!--面试信息-->
+      <div class="remark">
+      <h3>货物信息</h3>
+    </div>
+        <ws-info-table>
+          <ws-form-item
+            label="货名"
+            span="1"
+            prop="goodsName"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.goodsName"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="水分(%)<="
+            span="1"
+            prop="waterContent"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="品级"
+            span="1"
+            prop="grade"
+          >
+          <ws-select
+          v-model="deptBudgetList.contractGoodsInfo.grade"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+          </ws-form-item>
+          <ws-form-item
+            label="杂质(%)<="
+            span="1"
+            prop="interviewDates"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="容重(克/升)<="
+            span="1"
+            prop="interviewType"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="霉变粒(%)<="
+            span="1"
+            prop="mildewGrain"
+            class="result"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="热损伤(%)<="
+            span="1"
+            prop="jiaorenli"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="不完善粒(%)<="
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+             <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item
+            label="合同收入(元)"
+            span="1"
+            prop="goodsNameKey"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="已开发票(元)"
+            span="1"
+            prop="goodsName"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="费用支出(元)"
+            span="1"
+            prop="waterContent"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="未开发票(元)"
+            span="1"
+            prop="impurity"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="未回款(元)"
+            span="1"
+            prop="mildewGrain"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="Prettier"
+            class="imperfectGrain"
+          >
+          <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           <ws-form-item
+            label="双章原件回收情况"
+            span="1"
+            prop="grade"
+          >
+          <ws-select
+          v-model="deptBudgetList.contractProcessInfo.grade"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+        </div>
+            <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字" maxlength="200" />
+            <ws-upload ref="upload"
+                   table-name="maintain_work_order"
+                   oss-key="mainPlan"
+                   :comp-id="compId"
+                   :appendix-ids="appendixIdsAdd"
+                   :vesselId="deptBudgetList.addressUrl"
+                   :size-limit='size'
+                   accept='.jpg, .jpeg, .png, .pdf, .doc, .zip, .rar' />
+      </base-card>
+    </ws-form>
+    <div style='text-align:right;padding:10px;'>
+      <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { EventBus, dayjs } from 'base-core-lib'
+import { packList, addList } from '@/model/contarct/index'
+import WsUpload from '@/components/WsUpload'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      size: 10,
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractGoodsInfo: {
+          goodsName: '',
+        },
+        contractProcessInfo: {},
+      },
+      mainReportAdd: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      taskTypeList: [
+        { value: '未完成(默认)' },
+        { value: '已完成' },
+        { value: '待回款' },
+        { value: '全部合同' },
+      ],
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    loaddata() {
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          console.log(response)
+        })
+    },
+    submit() {
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          console.log(this.deptBudgetList)
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'purchaseContract' })
+    },
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.ws-upload {
+  margin-top: 20px;
+}
+.el-form {
+  padding: 0 20%;
+}
+.el-form-item {
+  width: 50%;
+}
+.unchangeable {
+  color: #1d6ced;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 10px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 20px 0px;
+}
+.remark h3 {
+  display: inline-block;
+  margin-right: 20px;
+}
+.remark p {
+  display: inline-block;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

+ 71 - 135
src/views/contractManagement/purchaseContractExamine.vue

@@ -24,181 +24,118 @@
     >
       <div class="remark">
       <h3>基本信息</h3>
-      <p>注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。</p>
     </div>
         <ws-info-table>
           <ws-form-item
             label="合同编号"
             span="1"
-            prop="seafarerName"
+            prop="contractNo"
           >
+          {{deptBudgetList.contractNo}}
           </ws-form-item>
           <ws-form-item
             label="运输方式"
             span="1"
-            prop="crtDutyId"
-            key=""
+            prop="shippingType"
           >
+          {{deptBudgetList.shippingType}}
           </ws-form-item>
           <ws-form-item
             label="买方"
             span="1"
-            prop="registered"
-            :key=""
+            prop="buyer"
           >
+          {{deptBudgetList.buyer}}
           </ws-form-item>
           <ws-form-item
             label="结算方式"
             span="1"
-            prop="registered"
-            :key=""
-          >
+            prop="settlementMethod"
+          >{{deptBudgetList.settlementMethod}}
           </ws-form-item>
           <ws-form-item
             label="卖方"
             span="1"
-            prop="registered"
-            :key=""
-          >
+            prop="seller"
+          >{{deptBudgetList.seller}}
           </ws-form-item>
           <ws-form-item
             label="货源地"
             span="1"
-            prop="registered"
-            :key=""
-          >
+            prop="sourceGoods"
+          >{{deptBudgetList.sourceGoods}}
           </ws-form-item>
           <ws-form-item
             label="买方电话"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="buyerPhone"
+          >{{deptBudgetList.buyerPhone}}
           </ws-form-item>
           <ws-form-item
             label="交货地"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="placeDelivery">
+            {{deptBudgetList.placeDelivery}}
           </ws-form-item>
            <ws-form-item
             label="卖方电话"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="sellerPhone">
+            {{deptBudgetList.sellerPhone}}
           </ws-form-item>
           <ws-form-item
             label="包装方式"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="packingMethod">
+            {{deptBudgetList.packingMethod}}
           </ws-form-item>
           <ws-form-item
             label="重量(吨)"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="weight">
+            {{deptBudgetList.weight}}
           </ws-form-item>
           <ws-form-item
             label="验收方式"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="acceptanceMethod">
+            {{deptBudgetList.acceptanceMethod}}
           </ws-form-item>
           <ws-form-item
-            label="短溢装(%)"
-            span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            label="溢短装(%)"
+            span="1"
+            prop="overShort">
+            {{deptBudgetList.overShort}}
           </ws-form-item>
           <ws-form-item
             label="交货日期(起)"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="deliveryDateStart">
+            {{deptBudgetList.deliveryDateStart}}
           </ws-form-item>
           <ws-form-item
             label="合同单价(元/吨)"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="unitContractPrice">
+            {{deptBudgetList.unitContractPrice}}
           </ws-form-item>
           <ws-form-item
             label="交货日期(止)"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="deliveryDateEnd">
+            {{deptBudgetList.deliveryDateEnd}}
           </ws-form-item>
           <ws-form-item
             label="合同总价(元)"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="totalContractPrice">
+            {{deptBudgetList.totalContractPrice}}
           </ws-form-item>
           <ws-form-item
             label="签订日期"
             span="1"
-            :prop="!deptBudgetList.add && registered != 1 ? 'birthday' : ''"
-            :key="
-              !deptBudgetList.add || registered != 1
-                ? 'birthday_haveProp'
-                : 'birthday_noProp'
-            "
-          >
+            prop="signingDate">
+            {{deptBudgetList.signingDate}}
           </ws-form-item>
         </ws-info-table>
       </base-card>
@@ -210,55 +147,60 @@
           <ws-form-item
             label="货名"
             span="1"
-            prop="dutyId"
+            prop="waterContent"
           >
+          {{deptBudgetList.contractGoodsInfo.goodsName}}
           </ws-form-item>
           <ws-form-item
             label="水分(%)<="
             span="1"
             prop="intendedShipId"
           >
+          {{deptBudgetList.contractGoodsInfo.waterContent}}
           </ws-form-item>
           <ws-form-item
             label="品级"
             span="1"
-            prop="interviewPersons"
+            prop="grade"
           >
+           {{deptBudgetList.contractGoodsInfo.grade}}
           </ws-form-item>
           <ws-form-item
             label="杂质(%)<="
             span="1"
-            prop="interviewDates"
+            prop="impurity"
           >
+          {{deptBudgetList.contractGoodsInfo.impurity}}
           </ws-form-item>
           <ws-form-item
             label="容重(克/升)<="
             span="1"
-            prop="interviewType"
+            prop="bulkDensity"
           >
+          {{deptBudgetList.contractGoodsInfo.bulkDensity}}
           </ws-form-item>
           <ws-form-item
             label="霉变粒(%)<="
             span="1"
-            prop="interviewResult"
+            prop="mildewGrain"
             class="result"
           >
-            
+            {{deptBudgetList.contractGoodsInfo.mildewGrain}}
           </ws-form-item>
            <ws-form-item
-            label="焦糊粒(%)<="
+            label="热损伤(%)<="
             span="1"
-            prop="interviewType"
+            prop="jiaorenli"
           >
-            
+            {{deptBudgetList.contractGoodsInfo.jiaorenli}}
           </ws-form-item>
           <ws-form-item
             label="不完善粒(%)<="
             span="1"
-            prop="interviewResult"
+            prop="imperfectGrain"
             class="result"
           >
-            
+            {{deptBudgetList.contractGoodsInfo.imperfectGrain}}
           </ws-form-item>
         </ws-info-table>
         <div class="remark">
@@ -268,60 +210,54 @@
           <ws-form-item
             label="合同收入(元)"
             span="1"
-            prop="dutyId"
+            prop="goodsNameKey"
           >
+          {{deptBudgetList.contractProcessInfo.goodsNameKey}}
           </ws-form-item>
           <ws-form-item
             label="已开发票(元)"
             span="1"
-            prop="intendedShipId"
+            prop="goodsName"
           >
+          {{deptBudgetList.contractProcessInfo.goodsName}}
           </ws-form-item>
           <ws-form-item
-            label="合同外支出(元)"
+            label="费用支出(元)"
             span="1"
-            prop="interviewPersons"
-          >
+            prop="waterContent"
+          >{{deptBudgetList.contractProcessInfo.waterContent}}
           </ws-form-item>
           <ws-form-item
             label="未开发票(元)"
             span="1"
-            prop="interviewDates"
-          >
+            prop="impurity"
+          >{{deptBudgetList.contractProcessInfo.impurity}}
           </ws-form-item>
           <ws-form-item
             label="未回款(元)"
             span="1"
-            prop="interviewType"
-          >
+            prop="mildewGrain"
+          >{{deptBudgetList.contractProcessInfo.mildewGrain}}
           </ws-form-item>
           <ws-form-item
             label="已完成发运量(吨)"
             span="1"
-            prop="interviewResult"
+            prop="imperfectGrain"
             class="result"
-          >
+          >{{deptBudgetList.contractProcessInfo.imperfectGrain}}
           </ws-form-item>
            <ws-form-item
             label="双章原件回收情况"
             span="1"
-            prop="interviewType"
-          >
-          </ws-form-item>
-          <ws-form-item
-            label="不完善粒(%)<="
-            span="1"
-            prop="interviewResult"
-            class="result"
-          >
+            prop="grade"
+          >{{deptBudgetList.contractProcessInfo.grade}}
           </ws-form-item>
         </ws-info-table>
         <div class="remark">
           <h3>备注信息</h3>
         </div>
-        <ws-info-table>
-          
-        </ws-info-table>
+        {{deptBudgetList.contractProcessInfo.remarks}}
+        <img :src="deptBudgetList.contractProcessInfo.addressUrl" alt="">
       </base-card>
     </ws-form>
     <div style='text-align:right;padding:10px;'>

+ 40 - 43
src/views/contractManagement/salesContract.vue

@@ -2,8 +2,40 @@
 <!--2019年5月30日 20:25:16 by jlx-->
 <template>
   <div>
-    <BaseHeaderLayout :leftSpan="18">
+    <BaseHeaderLayout :leftSpan="10">
       <template slot="left">
+        <ws-button
+          type="primary"
+          :disable="checkBtn"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >添加</ws-button
+        >
+        <ws-button
+          :disable="checkBtn"
+          @click="enquiry(3)"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+        <ws-select
+          v-model="deptBudgetList.crtDutyId"
+          placeholder=""
+          class="typeselect"
+          @change="selectCrtDuty"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+          />
+        </ws-select>
         <ws-date-picker
           :picker-options="pickerBeginDateBefore"
           v-model="deptBudgetList.birthday"
@@ -42,49 +74,8 @@
           >查找</ws-button
         >
       </template>
-      <template slot="right">
-        <ws-button
-          :disable="checkBtn"
-          @click="enquiry(3)"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          >导出</ws-button
-        >
-      </template>
     </BaseHeaderLayout>
-    <div>
-      <el-row>
-        <el-col :span="12">
-          <ul class="taskType clearfix" ref="taskTypeShow">
-            <li
-              v-for="(item, index) in taskTypeList"
-              :key="index"
-              @click="clickSearch(item, index)"
-              :class="{ active: categoryIndex == index }"
-            >
-              <p>
-                <!-- 类型名称 -->
-                {{ item.value }}
-              </p>
-            </li>
-            <div class="clear-both"></div>
-          </ul>
-        </el-col>
-        <el-col :span="12" class="padding-xs">
-          <ws-button
-            type="primary"
-            :disable="checkBtn"
-            @click="enquiry(3)"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >添加</ws-button
-          >
-        </el-col>
-      </el-row>
-    </div>
-    <el-table :data="tableData" style="width: 100%">
+    <el-table :data="tableData" style="width: 100%; margin-top: 10px">
       <el-table-column type="index" />
       <el-table-column prop="date" label="合同编号" width="80">
       </el-table-column>
@@ -199,6 +190,9 @@ export default {
     handleExamine(row) {
       this.$router.push({ path: 'salesContractExamine' })
     },
+    handleAdd() {
+      this.$router.push({ path: 'salesContractAdd' })
+    },
     filtlistQuery() {},
     searchDialog() {},
     vesselIdSelected() {},
@@ -291,6 +285,9 @@ export default {
     }
   }
 }
+/deep/.el-table .el-table__header .cell, /deep/.el-table .el-table__body .cell{
+    text-align: center;
+}
 .box-app {
   display: inline-block;
   float: left;

+ 867 - 0
src/views/contractManagement/salesContractAdd.vue

@@ -0,0 +1,867 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left">创建销售合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <div class="wenzi">
+      <h3>基本信息</h3>
+      <p>
+        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+        标记的条目提交后不可修改。
+      </p>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--基本信息-->
+
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item label="合同编号" span="1" prop="seafarerName">
+            <ws-input v-model="deptBudgetList.seafarerName" size="small" />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--买方-->
+          <ws-form-item label="卖方" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--结算方式-->
+          <ws-form-item label="结算方式" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--卖方-->
+          <ws-form-item label="卖方" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--货源地-->
+          <ws-form-item label="货源地" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="50"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--买方电话-->
+          <ws-form-item
+            label="买方电话"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'mobilePhone' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'mobilePhone_haveProp'
+                : 'mobilePhone_noProp'
+            "
+          >
+            <ws-input
+              v-model="deptBudgetList.mobilePhone"
+              oninput="value=value.replace(/[^\d]/g,'')"
+              maxlength="50"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--交货地-->
+          <ws-form-item label="交货地" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--卖方电话-->
+          <ws-form-item
+            label="卖方电话"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'sellerPhone' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'sellerPhone_haveProp'
+                : 'sellerPhone_noProp'
+            "
+          >
+            <ws-input
+              v-model="deptBudgetList.mobilePhone"
+              oninput="value=value.replace(/[^\d]/g,'')"
+              maxlength="50"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--包装方式-->
+          <ws-form-item
+            label="包装方式"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'crtDutyId' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'crtDutyId_haveProp'
+                : 'crtDutyId_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--验收方式-->
+          <ws-form-item
+            label="验收方式"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'Acceptance' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'Acceptance_method'
+                : 'Acceptance_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--溢短装(%)-->
+          <ws-form-item label="溢短装(%)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--交货日期(起)-->
+          <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'Delivery' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'Delivery_date_from'
+                : 'Delivery_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--合同单价(元/吨)-->
+          <ws-form-item label="合同单价(元/吨)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--交货日期(止)-->
+          <ws-form-item
+            label="交货日期(止)"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'cDelivery' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'Delivery_date_to'
+                : 'Delivery_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--合同总价-->
+          <ws-form-item label="合同总价" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--签订日期-->
+          <ws-form-item
+            label="签订日期"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'signing' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'Date_signing'
+                : 'signing_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <div class="wenzi">
+      <h3>货物信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--货物信息-->
+
+        <ws-info-table>
+          <!--货名-->
+          <ws-form-item label="货名" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--品级-->
+          <ws-form-item label="品级" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--容量(克/升)>=-->
+          <ws-form-item label="容量(克/升)>=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--焦糊粒(%)<=-->
+          <ws-form-item label="焦糊粒(%)<=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)<=" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>流程信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--流程信息-->
+
+        <ws-info-table>
+          <!--合同收入(元)-->
+          <ws-form-item label="合同收入(元)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--已开发票(元)-->
+          <ws-form-item label="已开发票(元)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--合同外支出(元)-->
+          <ws-form-item label="合同外支出(元)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--未开发票(元)-->
+          <ws-form-item label="未开发票(元)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--未回款(元)-->
+          <ws-form-item label="未回款(元)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+
+          <!--已完成发货量(吨)-->
+          <ws-form-item label="已完成发货量(吨)" span="1" prop="seafarerName">
+            <ws-input
+              v-model="deptBudgetList.seafarerName"
+              maxlength="100"
+              size="small"
+            />
+            <i
+              v-if="isEdited && registered == '1'"
+              class="iconfont iconaddy1 ml10"
+              style="cursor: pointer"
+              @click="dialogFormVisible = true"
+            />
+          </ws-form-item>
+          <!--双章原件回收情况-->
+          <ws-form-item
+            label="双章原件回收情况"
+            span="1"
+            :prop="!deptBudgetList.add && registered != 1 ? 'crtDutyId' : ''"
+            :key="
+              !deptBudgetList.add || registered != 1
+                ? 'crtDutyId_haveProp'
+                : 'crtDutyId_noProp'
+            "
+          >
+            <ws-select
+              v-model="deptBudgetList.crtDutyId"
+              :placeholder="$t('common.selected')"
+              @change="selectCrtDuty"
+            >
+              <ws-option
+                v-for="item in dutyList"
+                :key="item.dutyId"
+                :label="item.aliasName"
+                :value="item.dutyId"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>备注信息</h3>
+    </div>
+    <div class="ce">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--备注信息-->
+
+        <ws-info-table>
+          <ws-input
+            v-model="deptBudgetList.seafarerName"
+            maxlength="100"
+            type="textarea"
+            height="100"
+          />
+          <!-- <el-form-item label="备注信息">
+    <el-input type="textarea" v-model="form.desc"></el-input>
+  </el-form-item> -->
+        </ws-info-table>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+import { getVesselOne } from '@/model/procurement/basic'
+import { dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      deptBudgetList: {},
+      ruleDeptBudget: {},
+      isEdited: false,
+      registered: {},
+      selectCrtDuty: {},
+      dutyList: {},
+      sexList: {},
+      pickerBeginDateBefore: {},
+      selectDuty: {},
+
+      selectIntendedShip: {},
+      interviewTypeList: {},
+    }
+  },
+  created() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    returnsales() {
+      this.$router.push({ path: 'salesContract' })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 20px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

文件差异内容过多而无法显示
+ 631 - 574
src/views/contractManagement/salesContractEdit.vue


+ 58 - 34
src/views/contractManagement/salesContractExamine.vue

@@ -3,7 +3,21 @@
 <!--2019年5月30日 20:25:16 by jlx-->
 
 <template>
-  <div class="First">
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >返回</el-button
+        >
+      </el-col>
+    </el-row>
     <ws-form ref="deptBudgetList"
                :rules="ruleDeptBudget"
                :model="deptBudgetList">
@@ -16,10 +30,10 @@
             <ws-form-item label="合同编号"
                           span="1"
                           prop="seafarerName">
-              <!-- <ws-input 
+               <ws-input 
                         v-model="deptBudgetList.seafarerName"
                         maxlength="100"
-                        size="small" /> -->
+                        size="small" /> 
 
               <span v-if="!isEdited || deptBudgetList.add || registered === '1'"
                    
@@ -414,7 +428,7 @@
                          @change="selectDuty">
                 <ws-option v-for="item in dutyList"
                            :key="item.dutyId"
-                           v-if="item.enabled"
+                           
                            :label="item.chineseName"
                            :value="item.dutyId" />
               </ws-select>
@@ -679,7 +693,7 @@
 </template>
 
 <script>
-import { getInquiry } from '@\model\procurement'
+import { getInquiry } from '@/model/contarct/index'
 
   export default {
     data() {
@@ -705,26 +719,36 @@ import { getInquiry } from '@\model\procurement'
     },
     handleExamine() {},
     approve() {},
-    
     getInquiry(){
+      getInquiry({}).toPromise().then(response => {
+        this.contractForm = response
+      })
+      // }).then(response => {
+      //   this.getInquiry = response
+    } 
 
-       // 获取数据
-      this.getInquiry({
-        
-        
-      }).then(response => {
-        this.getInquiry = response
-    }
-     
- 
+      //  // 获取数据
+      // this.getInquiry({  
+      // }).then(response => {
+      //   this.getInquiry = response
+    },
+  }  
 </script>
 
 <style lang="scss" scoped>
-.title h3,.title span{
- display:inline-block;
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding: 10px;
+  text-align: right;
 }
-.title h3{
- margin-right:10px;
+.title h3,
+.title span {
+  display: inline-block;
+}
+.title h3 {
+  margin-right: 10px;
 }
 .button-container {
   display: flex;
@@ -742,10 +766,8 @@ import { getInquiry } from '@\model\procurement'
     flex-direction: row;
     & > span {
       line-height: 50px;
-      
     }
   }
-  
 
   /deep/.auditFlow-box {
     position: unset;
@@ -768,7 +790,7 @@ import { getInquiry } from '@\model\procurement'
 /deep/.el-dialog {
   .el-form-item {
     margin-bottom: 0 !important;
-    
+
     .el-input--medium {
       textarea {
         min-height: 100px !important;
@@ -784,20 +806,16 @@ import { getInquiry } from '@\model\procurement'
   width: 100%;
   z-index: 1;
 }
- .el-form-item {
-    width: 50%;
-    
-}
-.First{
-  width: 950px;
-  margin-left: 20%;
-  
+.el-form-item {
+  width: 50%;
 }
 .el-form-item__label {
-    line-height: 32px;
-    text-align: center;
+  line-height: 32px;
+  text-align: center;
+}
+.el-form {
+  padding: 0 20%;
 }
-
 /*.crt-main .textarea /deep/ .el-form-item__label {*/
 /*  height: 82px;*/
 /*}*/
@@ -835,7 +853,6 @@ import { getInquiry } from '@\model\procurement'
       border: 0;
       color: #606266;
     }
-    
   }
 }
 // 控制select为只读的时候显示样式
@@ -860,4 +877,11 @@ import { getInquiry } from '@\model\procurement'
     padding: 0 !important;
   }
 }
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
 </style>

+ 3 - 1
vue.config.js

@@ -142,7 +142,9 @@ module.exports = {
 
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
-        target: 'http:/192.168.1.124:8090/',
+        // target: 'http://localhost:8090/',
+        // target: 'http://192.168.1.124:8090/',
+        target: 'http://192.168.1.110:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址

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