|
|
@@ -10,24 +10,24 @@
|
|
|
:show="show"
|
|
|
@handleClick="handleClick"
|
|
|
/>
|
|
|
- <div style="width:40%;margin-left:60%;margin-bottom: -10%">
|
|
|
- <el-button
|
|
|
- type="cyan"
|
|
|
- icon="el-icon-search"
|
|
|
- size="mini"
|
|
|
- @click="handleQuery"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
- >重置</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- @click="handleClick"
|
|
|
- :icon="arrow"
|
|
|
- size="mini"
|
|
|
- >展开</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
+<!-- <div style="width:40%;margin-left:60%;margin-bottom: -10%">-->
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- type="cyan"-->
|
|
|
+<!-- icon="el-icon-search"-->
|
|
|
+<!-- size="mini"-->
|
|
|
+<!-- @click="handleQuery"-->
|
|
|
+<!-- >搜索</el-button-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"-->
|
|
|
+<!-- >重置</el-button-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- @click="handleClick"-->
|
|
|
+<!-- :icon="arrow"-->
|
|
|
+<!-- size="mini"-->
|
|
|
+<!-- >展开</el-button-->
|
|
|
+<!-- >-->
|
|
|
+<!-- </div>-->
|
|
|
<listComponent
|
|
|
style="clear:both"
|
|
|
v-if="waitFor"
|
|
|
@@ -41,18 +41,27 @@
|
|
|
@getList="getList"
|
|
|
:customButton="customButton"
|
|
|
:arrow="arrow"
|
|
|
+ :seachButton="seachButton"
|
|
|
:listStyle="listStyle"
|
|
|
:queryList="queryList"/>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParms.pageNum"
|
|
|
+ :limit.sync="queryParms.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div v-if="MainTable == true">
|
|
|
<MainForm
|
|
|
- ref="MainForm"
|
|
|
+ ref="detailForm"
|
|
|
:searchdata="detailOption"
|
|
|
:hidedata="hideDetail"
|
|
|
:display="display"
|
|
|
- :form="queryParms"
|
|
|
+ :form="detailForm"
|
|
|
:show="show = true"
|
|
|
@handleClick="handleClick"
|
|
|
+ @verificationRules="verificationRules"
|
|
|
/>
|
|
|
<list-component
|
|
|
v-if="waitFor"
|
|
|
@@ -64,8 +73,13 @@
|
|
|
@buttonList="buttonList"
|
|
|
@showSearch="showSearch"
|
|
|
@getList="getList"
|
|
|
+ @listTotal="listTotal"
|
|
|
+ @deletRows="deletRows"
|
|
|
+ :seachButton="confirmButton"
|
|
|
:customButton="detailButton"
|
|
|
:listStyle="mainStyle"
|
|
|
+ :setRowList="detailStyle"
|
|
|
+ :tatolLabel="tatolLabel"
|
|
|
:queryList="detailList"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -73,11 +87,18 @@
|
|
|
|
|
|
<script>
|
|
|
import { select } from '@/api/system/set'
|
|
|
+import MainForm from '@/combination/MainForm'
|
|
|
+import { listInStock, addSave, getSave, getArea,
|
|
|
+ getustomer,getEntry, getwarehouse, getGoodName,
|
|
|
+ canBedelet, delRows, getWarehousekeeper} from '@/api/warehouse/inStock'
|
|
|
import Cookies from 'js-cookie'
|
|
|
export default {
|
|
|
name: 'inStock',
|
|
|
data(){
|
|
|
return{
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ tatolLabel:['单价','数量','金额'],
|
|
|
MainTable:false,
|
|
|
show: false,
|
|
|
arrow:'el-icon-arrow-up',
|
|
|
@@ -92,12 +113,19 @@ export default {
|
|
|
//判断自定义列是否有值再渲染组件
|
|
|
waitFor:false,
|
|
|
display:3,
|
|
|
- queryParms:{},
|
|
|
+ queryParms:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ fBilltype:'RK'
|
|
|
+ },
|
|
|
+ detailForm:{
|
|
|
+
|
|
|
+ },
|
|
|
//主页面默认显示4个表单数据
|
|
|
formOption:[
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fBillno',
|
|
|
name:"系统编号",
|
|
|
form:2,
|
|
|
width:200,
|
|
|
@@ -106,27 +134,29 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fGoodsid',
|
|
|
name:"项目名称",
|
|
|
- form:2,
|
|
|
+ form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:''
|
|
|
+ rules:'',
|
|
|
+ data:[]
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fCorpid',
|
|
|
name:"客户名称",
|
|
|
form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:''
|
|
|
+ rules:'',
|
|
|
+ data:[]
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'moneys',
|
|
|
name:"金额",
|
|
|
- form:2,
|
|
|
+ form:5,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
rules:''
|
|
|
@@ -137,7 +167,7 @@ export default {
|
|
|
hidedata:[
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'cLoadDate',
|
|
|
name:"申请日期",
|
|
|
form:3,
|
|
|
width:200,
|
|
|
@@ -146,7 +176,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'createBy',
|
|
|
name:"申请人",
|
|
|
form:2,
|
|
|
width:200,
|
|
|
@@ -155,7 +185,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'remark',
|
|
|
name:"备注",
|
|
|
form:2,
|
|
|
width:200,
|
|
|
@@ -173,27 +203,27 @@ export default {
|
|
|
listStyle: [
|
|
|
{
|
|
|
surface: "1",
|
|
|
- label: "fLineNumber",
|
|
|
+ label: "serialNumber",
|
|
|
name: "序号",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort:''
|
|
|
},{
|
|
|
surface: "2",
|
|
|
- label: "fMaterial1",
|
|
|
+ label: "fBillno",
|
|
|
name: "申请编号",
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
},{
|
|
|
surface: "3",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "projectName",
|
|
|
name: "项目名称",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1
|
|
|
},{
|
|
|
surface: "4",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "corpName",
|
|
|
name: "客户名称",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -207,21 +237,21 @@ export default {
|
|
|
operation:1
|
|
|
},{
|
|
|
surface: "6",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "cLoadDate",
|
|
|
name: "申请日期",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1
|
|
|
},{
|
|
|
surface: "7",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "createBy",
|
|
|
name: "申请人",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1
|
|
|
},{
|
|
|
surface: "8",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "fBillstatus",
|
|
|
name: "状态",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -235,7 +265,7 @@ export default {
|
|
|
operation:1
|
|
|
},{
|
|
|
surface: "10",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "remark",
|
|
|
name: "备注",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -261,15 +291,15 @@ export default {
|
|
|
onabort:''
|
|
|
},{
|
|
|
surface: "2",
|
|
|
- label: "fMaterial1",
|
|
|
+ label: "fFeeid",
|
|
|
name: "品名",
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 200,
|
|
|
changeable:1,
|
|
|
data:[]
|
|
|
},{
|
|
|
surface: "3",
|
|
|
- label: "fMaterial2",
|
|
|
+ label: "fUnitprice",
|
|
|
name: "单价",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -277,7 +307,7 @@ export default {
|
|
|
changeable:2,
|
|
|
},{
|
|
|
surface: "4",
|
|
|
- label: "fMaterial3",
|
|
|
+ label: "fQty",
|
|
|
name: "数量",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -285,23 +315,25 @@ export default {
|
|
|
changeable:2,
|
|
|
},{
|
|
|
surface: "5",
|
|
|
- label: "fMaterial4",
|
|
|
+ label: "fFeeunitid",
|
|
|
name: "计量单位",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
changeable:1,
|
|
|
- operation:2
|
|
|
+ operation:2,
|
|
|
+ data:[]
|
|
|
},{
|
|
|
surface: "6",
|
|
|
- label: "fMaterial5",
|
|
|
+ label: "fWarehouseid",
|
|
|
name: "库区",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:2,
|
|
|
- changeable:1
|
|
|
+ changeable:1,
|
|
|
+ data:[]
|
|
|
},{
|
|
|
surface: "7",
|
|
|
- label: "fMaterial6",
|
|
|
+ label: "fAmount",
|
|
|
name: "金额",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
@@ -309,40 +341,40 @@ export default {
|
|
|
changeable: 2
|
|
|
},{
|
|
|
surface: "8",
|
|
|
- label: "fMaterial7",
|
|
|
- name: "状态",
|
|
|
+ label: "fStltypeid",
|
|
|
+ name: "付费方式",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1,
|
|
|
changeable: 1,
|
|
|
- data:[
|
|
|
- {
|
|
|
- label:'正常',
|
|
|
- value:'0'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '停用',
|
|
|
- value: '1'
|
|
|
- }
|
|
|
- ]
|
|
|
+ data:[]
|
|
|
},{
|
|
|
surface: "9",
|
|
|
- label: "fMaterial8",
|
|
|
- name: "审核日期",
|
|
|
+ label: "remark",
|
|
|
+ name: "备注",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1,
|
|
|
- changeable: 3
|
|
|
+ changeable: 2
|
|
|
},{
|
|
|
surface: "10",
|
|
|
- label: "fMaterial9",
|
|
|
- name: "备注",
|
|
|
+ label: "fReviewDate",
|
|
|
+ name: "审核日期",
|
|
|
checked: 0,
|
|
|
width: 200,
|
|
|
operation:1,
|
|
|
+ changeable: 3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: "11",
|
|
|
+ label: "createBy",
|
|
|
+ name: "申请人",
|
|
|
+ checked: 0,
|
|
|
+ width: 200,
|
|
|
+ operation:2,
|
|
|
changeable: 2
|
|
|
},{
|
|
|
- surface: "11",
|
|
|
+ surface: "12",
|
|
|
label: "fMaterial10",
|
|
|
name: "操作",
|
|
|
checked: 0,
|
|
|
@@ -355,7 +387,7 @@ export default {
|
|
|
detailOption:[
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fBillno',
|
|
|
name:"系统编号",
|
|
|
form:2,
|
|
|
width:200,
|
|
|
@@ -364,41 +396,37 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fCorpid',
|
|
|
name:"供应商",
|
|
|
form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:'',
|
|
|
- data:[{
|
|
|
- label:'盛源嘉',
|
|
|
- value:1
|
|
|
- }]
|
|
|
+ rules:{required: false},
|
|
|
+ data:[]
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fStorekeeper',
|
|
|
name:"库管员",
|
|
|
- form:2,
|
|
|
+ form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:''
|
|
|
+ rules:'',
|
|
|
+ data:[]
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fWarehouseid',
|
|
|
name:"仓库",
|
|
|
form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:''
|
|
|
+ rules:{ required: true, message: ' 1asdad', trigger: 'blur' },
|
|
|
+ data:[]
|
|
|
},
|
|
|
- ],
|
|
|
- //详情主表隐藏
|
|
|
- hideDetail:[
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fBsdate',
|
|
|
name:"入库日期",
|
|
|
form:3,
|
|
|
width:200,
|
|
|
@@ -407,63 +435,273 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'fSbu',
|
|
|
name:"付款单位",
|
|
|
form:1,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
- rules:''
|
|
|
+ rules:{required: false},
|
|
|
+ data:[]
|
|
|
},
|
|
|
{
|
|
|
span:6,
|
|
|
- label: 'fNumber',
|
|
|
+ label: 'remark',
|
|
|
name:"备注",
|
|
|
form:4,
|
|
|
width:200,
|
|
|
labelSize:'80',
|
|
|
rules:''
|
|
|
},
|
|
|
-
|
|
|
+ ],
|
|
|
+ //详情主表隐藏
|
|
|
+ hideDetail:[
|
|
|
+ // {
|
|
|
+ // span:6,
|
|
|
+ // label: 'fBsdate',
|
|
|
+ // name:"入库日期",
|
|
|
+ // form:3,
|
|
|
+ // width:200,
|
|
|
+ // labelSize:'80',
|
|
|
+ // rules:''
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // span:6,
|
|
|
+ // label: 'fSbu',
|
|
|
+ // name:"付款单位",
|
|
|
+ // form:1,
|
|
|
+ // width:200,
|
|
|
+ // labelSize:'80',
|
|
|
+ // rules:'',
|
|
|
+ // data:[]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // span:6,
|
|
|
+ // label: 'remark',
|
|
|
+ // name:"备注",
|
|
|
+ // form:4,
|
|
|
+ // width:200,
|
|
|
+ // labelSize:'80',
|
|
|
+ // rules:''
|
|
|
+ // },
|
|
|
+ //
|
|
|
],
|
|
|
//按钮
|
|
|
customButton:[
|
|
|
{
|
|
|
type:'primary',
|
|
|
- size:'small',
|
|
|
- icon:'el-icon-edit',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-plus',
|
|
|
name:'新增',
|
|
|
disabled:false,
|
|
|
},{
|
|
|
- type:'danger',
|
|
|
- size:'small',
|
|
|
+ type:'success',
|
|
|
+ size:'mini',
|
|
|
icon:'el-icon-edit',
|
|
|
name:'修改',
|
|
|
disabled:true
|
|
|
+ },{
|
|
|
+ type:'danger',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-delete',
|
|
|
+ name:'删除',
|
|
|
+ disabled:true
|
|
|
+ },{
|
|
|
+ type:'info',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-plus',
|
|
|
+ name:'复制新增',
|
|
|
+ disabled:false
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ seachButton:[
|
|
|
+ {
|
|
|
+ type:'',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-search',
|
|
|
+ name:'搜索',
|
|
|
+ disabled:false,
|
|
|
+ },{
|
|
|
+ type:'',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-refresh',
|
|
|
+ name:'重置',
|
|
|
+ disabled:false,
|
|
|
+ },{
|
|
|
+ type:'',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-arrow-up',
|
|
|
+ name:'展开',
|
|
|
+ disabled:false
|
|
|
}
|
|
|
],
|
|
|
detailButton:[
|
|
|
{
|
|
|
+ type:'danger',
|
|
|
+ size:'mini',
|
|
|
+ icon:'el-icon-refresh-left',
|
|
|
+ name:'返回列表',
|
|
|
+ disabled:false,
|
|
|
+ },{
|
|
|
type:'primary',
|
|
|
- size:'small',
|
|
|
+ size:'mini',
|
|
|
icon:'el-icon-edit',
|
|
|
name:'录入',
|
|
|
disabled:false,
|
|
|
},{
|
|
|
- type:'danger',
|
|
|
- size:'small',
|
|
|
+ type:'success',
|
|
|
+ size:'mini',
|
|
|
icon:'el-icon-edit',
|
|
|
- name:'修改',
|
|
|
- disabled:true
|
|
|
+ name:'保存',
|
|
|
+ disabled:false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ confirmButton:[
|
|
|
+ {
|
|
|
+ type:'cyan',
|
|
|
+ size:'mini',
|
|
|
+ icon:'',
|
|
|
+ name:'打印',
|
|
|
+ disabled:false,
|
|
|
+ },{
|
|
|
+ type:'info',
|
|
|
+ size:'mini',
|
|
|
+ icon:'',
|
|
|
+ name:'入库确认',
|
|
|
+ disabled:false
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getRow()
|
|
|
+ this.getList()
|
|
|
+ this.selectMethods()
|
|
|
},
|
|
|
methods:{
|
|
|
+ selectMethods(){
|
|
|
+ this.mainMethods()
|
|
|
+ this.detailMethods()
|
|
|
+ },
|
|
|
+ //主页面下拉获取名称
|
|
|
+ mainMethods(){
|
|
|
+ for(let li in this.formOption){
|
|
|
+ if(this.formOption[li].name == '项目名称'){
|
|
|
+ let queryParams = { pageNum: 1,}
|
|
|
+ getEntry(queryParams).then(res=>{
|
|
|
+ for(let item in res.data){
|
|
|
+ this.formOption[li].data.push({
|
|
|
+ label:res.data[item].projectName,
|
|
|
+ value:res.data[item].fId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(this.formOption[li].name == '客户名称'){
|
|
|
+ let queryParams = { pageNum: 1, fTypeid: 1}
|
|
|
+ getustomer(queryParams).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ for(let item in res.data){
|
|
|
+ this.formOption[li].data.push({
|
|
|
+ label:res.data[item].fName,
|
|
|
+ value:res.data[item].fId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //弹窗页获取下拉名称
|
|
|
+ detailMethods(){
|
|
|
+ for(let li in this.detailOption){
|
|
|
+ if(this.detailOption[li].name == '仓库'){
|
|
|
+ //获取仓库
|
|
|
+ let queryParams = { pageNum: 1 }
|
|
|
+ getwarehouse(queryParams).then(res=>{
|
|
|
+ for(let item in res.rows){
|
|
|
+ this.detailOption[li].data.push({
|
|
|
+ label:res.rows[item].fName,
|
|
|
+ value:res.rows[item].fId
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(this.detailOption[li].name == '供应商'){
|
|
|
+ //获取供应商
|
|
|
+ let queryParams = { pageNum: 1, fTypeid: 1}
|
|
|
+ getustomer(queryParams).then(res => {
|
|
|
+ for(let item in res.data){
|
|
|
+ this.detailOption[li].data.push({
|
|
|
+ label:res.data[item].fName,
|
|
|
+ value:res.data[item].fId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(this.detailOption[li].name == '付款单位'){
|
|
|
+ //获取付款单位
|
|
|
+ let queryParams = { pageNum: 1, fTypeid: 1}
|
|
|
+ getustomer(queryParams).then(res => {
|
|
|
+ for(let item in res.data){
|
|
|
+ this.detailOption[li].data.push({
|
|
|
+ label:res.data[item].fName,
|
|
|
+ value:res.data[item].fId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(this.detailOption[li].name == '库管员'){
|
|
|
+ let queryParams = { pageNum: 1,roleName:'库管'}
|
|
|
+ getWarehousekeeper(queryParams).then(res=>{
|
|
|
+ for(let item in res.rows){
|
|
|
+ this.detailOption[li].data.push({
|
|
|
+ label:res.rows[item].userName,
|
|
|
+ value:res.rows[item].userId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //获取计量单位字典表
|
|
|
+ for(let li in this.detailStyle) {
|
|
|
+ if (this.detailStyle[li].name == '计量单位') {
|
|
|
+ this.getDicts('data_unitfees').then((response) => {
|
|
|
+ if (response.data) {
|
|
|
+ for (let item in response.data) {
|
|
|
+ this.detailStyle[li].data.push({
|
|
|
+ label: response.data[item].dictLabel,
|
|
|
+ value: response.data[item].dictValue
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (this.detailStyle[li].name == '付费方式') {
|
|
|
+ this.getDicts('f_paymode').then((response) => {
|
|
|
+ if (response.data) {
|
|
|
+ for (let item in response.data) {
|
|
|
+ this.detailStyle[li].data.push({
|
|
|
+ label: response.data[item].dictLabel,
|
|
|
+ value: response.data[item].dictValue
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(this.detailStyle[li].name == '品名'){
|
|
|
+ let queryParams = { pageNum: 1 }
|
|
|
+ getGoodName(queryParams).then(res=>{
|
|
|
+ for(let item in res.rows){
|
|
|
+ this.detailStyle[li].data.push({
|
|
|
+ label:res.rows[item].fName,
|
|
|
+ value:res.rows[item].fId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClick(){
|
|
|
this.show = !this.show
|
|
|
+ if(this.show){
|
|
|
+ this.arrow = 'el-icon-arrow-down'
|
|
|
+ }else{
|
|
|
+ this.arrow = 'el-icon-arrow-up'
|
|
|
+ }
|
|
|
},
|
|
|
handleQuery(){
|
|
|
|
|
|
@@ -478,7 +716,6 @@ export default {
|
|
|
userId: Cookies.get("userName"),
|
|
|
};
|
|
|
select(this.data).then((res) => {
|
|
|
- console.log(res)
|
|
|
if (res.data.length != 0) {
|
|
|
this.queryList.columnList = res.data.filter((e) => e.checked == 0);
|
|
|
this.queryList.columnList = res.data;
|
|
|
@@ -498,7 +735,6 @@ export default {
|
|
|
this.waitFor = true
|
|
|
this.queryList.columnList = this.listStyle
|
|
|
}
|
|
|
- console.log(this.getRowList)
|
|
|
});
|
|
|
},
|
|
|
//选择框
|
|
|
@@ -508,6 +744,20 @@ export default {
|
|
|
//查看
|
|
|
viewMethod(scope){
|
|
|
console.log(scope)
|
|
|
+ this.detailList.columnList = this.detailStyle
|
|
|
+ getSave(scope.row.fId).then(res=>{
|
|
|
+ if(res.data.warehouseBills){
|
|
|
+ this.detailForm = res.data.warehouseBills
|
|
|
+ }
|
|
|
+ if(res.data.tWarehousebillsfees){
|
|
|
+ this.detailData = res.data.tWarehousebillsfees
|
|
|
+ for(let li in this.detailData){
|
|
|
+ this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
|
|
|
+ this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.MainTable = true
|
|
|
+ })
|
|
|
},
|
|
|
//修改
|
|
|
modification(scope){
|
|
|
@@ -517,27 +767,91 @@ export default {
|
|
|
deletion(scope){
|
|
|
console.log(scope)
|
|
|
},
|
|
|
+ //删除从表行
|
|
|
+ deletRows(index,rows){
|
|
|
+ console.log(this.detailForm.fId)
|
|
|
+ console.log(this.detailData)
|
|
|
+ console.log(index)
|
|
|
+ console.log(rows[index].fId)
|
|
|
+ if(rows[index].fId){
|
|
|
+ let formData = {
|
|
|
+ fId:this.detailForm.fId,
|
|
|
+ fDateChanged:this.detailForm.fDateChanged
|
|
|
+ }
|
|
|
+ canBedelet(formData).then(res=>{
|
|
|
+ return delRows(rows[index].fId)
|
|
|
+ })
|
|
|
+ .then(()=>{
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(res=>{
|
|
|
+ this.$message.error(res)
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ rows.splice(index, 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ verificationRules(valid){
|
|
|
+ console.log(valid)
|
|
|
+ if(valid){
|
|
|
+ this.detailData.push({
|
|
|
+ serialNumber:null,
|
|
|
+ fFeeid:null,
|
|
|
+ fUnitprice:null,
|
|
|
+ fQty:null,
|
|
|
+ fFeeunitid:null,
|
|
|
+ fWarehouseid:null,
|
|
|
+ fAmount:null,
|
|
|
+ fStltypeid:null,
|
|
|
+ remark:null,
|
|
|
+ fReviewDate:null,
|
|
|
+ createBy:null,
|
|
|
+ })
|
|
|
+ for(let li in this.detailStyle){
|
|
|
+ if(this.detailStyle[li].name == '库区'){
|
|
|
+ getArea(this.detailForm.fWarehouseid).then(res=>{
|
|
|
+ for(let item in res.data){
|
|
|
+ this.detailStyle[li].data.push({
|
|
|
+ label:res.data[item].fWarehouseInformation,
|
|
|
+ value:res.data[item].id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//所以按钮
|
|
|
buttonList(row){
|
|
|
console.log(row)
|
|
|
console.log(this.detailStyle)
|
|
|
if(row.name == '新增'){
|
|
|
this.detailList.columnList = this.detailStyle
|
|
|
- console.log(this.detailStyle)
|
|
|
+ this.detailForm = {}
|
|
|
+ this.detailData = []
|
|
|
this.MainTable = true
|
|
|
}else if(row.name == '录入'){
|
|
|
- this.detailData.push({
|
|
|
- fLineNumber:null,
|
|
|
- fMaterial1:null,
|
|
|
- fMaterial2:null,
|
|
|
- fMaterial3:null,
|
|
|
- fMaterial4:null,
|
|
|
- fMaterial5:null,
|
|
|
- fMaterial6:null,
|
|
|
- fMaterial7:null,
|
|
|
- fMaterial8:null,
|
|
|
- fMaterial9:null,
|
|
|
- fMaterial10:null,
|
|
|
+ this.$refs.detailForm.rules()
|
|
|
+ }else if(row.name == '返回列表'){
|
|
|
+ this.show = false
|
|
|
+ row.icon = 'el-icon-arrow-up'
|
|
|
+ this.MainTable = false
|
|
|
+ }else if(row.name == '展开'){
|
|
|
+ this.show = !this.show
|
|
|
+ if(this.show){
|
|
|
+ row.icon = 'el-icon-arrow-down'
|
|
|
+ }else{
|
|
|
+ row.icon = 'el-icon-arrow-up'
|
|
|
+ }
|
|
|
+ }else if(row.name == '保存'){
|
|
|
+ console.log(this.detailForm)
|
|
|
+ console.log(this.detailData)
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append('tWarehousebills', JSON.stringify(this.detailForm))
|
|
|
+ formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
|
|
|
+ formData.append('fBilltype', 'RK')
|
|
|
+ addSave(formData).then(res=>{
|
|
|
+ this.$message.error("操作成功")
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -548,7 +862,39 @@ export default {
|
|
|
//点击刷新会调用此方法
|
|
|
getList(){
|
|
|
console.log('到我了2')
|
|
|
- }
|
|
|
+ listInStock(this.queryParms).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ this.tableData = res.rows
|
|
|
+ this.total = res.total
|
|
|
+ })
|
|
|
+ },
|
|
|
+ listTotal(param) {
|
|
|
+ // const { columns, data } = param
|
|
|
+ // const sums = []
|
|
|
+ // console.log(this.detailData)
|
|
|
+ // for(let item in this.detailData){
|
|
|
+ // columns.forEach((column, index) => {
|
|
|
+ // console.log(index)
|
|
|
+ // if (index === 0) {
|
|
|
+ // sums[index] = '合计'
|
|
|
+ // } else if (column.label == '单价' || column.label == '数量') {
|
|
|
+ // const values = data.map((item) => Number(item[column.property]))
|
|
|
+ // if (!values.every((value) => isNaN(value))) {
|
|
|
+ // sums[index] = values.reduce((prev, curr) => {
|
|
|
+ // const value = Number(curr)
|
|
|
+ // if (!isNaN(value)) {
|
|
|
+ // return prev + curr
|
|
|
+ // } else {
|
|
|
+ // return prev
|
|
|
+ // }
|
|
|
+ // }, 0)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ return sums
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|